瀏覽代碼

edge topology clean up and mexErrMsgTxt

Former-commit-id: ac967f261fae9b70feaf361f0a83748ca5f68ab9
Alec Jacobson (jalec 11 年之前
父節點
當前提交
9a5a4b544a

+ 1 - 0
RELEASE_HISTORY.txt

@@ -1,3 +1,4 @@
+0.2.1  Bug fixes in barycenter and doublearea found by Martin Bisson
 0.2.0  XML serializer more stable and fixed bug in remove_duplicate_vertices
 0.2.0  XML serializer more stable and fixed bug in remove_duplicate_vertices
 0.1.8  Embree and xml (windows only) extras
 0.1.8  Embree and xml (windows only) extras
 0.1.5  Compilation on windows, bug fix for compilation with cygwin
 0.1.5  Compilation on windows, bug fix for compilation with cygwin

+ 1 - 1
VERSION.txt

@@ -3,4 +3,4 @@
 # Anyone may increment Minor to indicate a small change.
 # Anyone may increment Minor to indicate a small change.
 # Major indicates a large change or large number of changes (upload to website)
 # Major indicates a large change or large number of changes (upload to website)
 # World indicates a substantial change or release
 # World indicates a substantial change or release
-0.2.0
+0.2.1

+ 1 - 5
include/igl/edgetopology.cpp

@@ -1,8 +1,3 @@
-//
-//  IGL Lib - Simple C++ mesh library 
-//
-//  Copyright 2011, Daniele Panozzo. All rights reserved.
-
 #include "edgetopology.h"
 #include "edgetopology.h"
 #include <algorithm>
 #include <algorithm>
 #include "is_manifold.h"
 #include "is_manifold.h"
@@ -15,6 +10,7 @@ IGL_INLINE void igl::edgetopology(
   Eigen::MatrixXi& FE, 
   Eigen::MatrixXi& FE, 
   Eigen::MatrixXi& EF)
   Eigen::MatrixXi& EF)
 {
 {
+  // Only needs to be edge-manifold
   assert(igl::is_manifold(V,F));
   assert(igl::is_manifold(V,F));
   std::vector<std::vector<int> > ETT;
   std::vector<std::vector<int> > ETT;
   for(int f=0;f<F.rows();++f)
   for(int f=0;f<F.rows();++f)

+ 0 - 5
include/igl/edgetopology.h

@@ -1,8 +1,3 @@
-//
-//  IGL Lib - Simple C++ mesh library 
-//
-//  Copyright 2011, Daniele Panozzo. All rights reserved.
-
 #ifndef IGL_EDGETOPOLOGY_H
 #ifndef IGL_EDGETOPOLOGY_H
 #define IGL_EDGETOPOLOGY_H
 #define IGL_EDGETOPOLOGY_H
 
 

+ 13 - 0
include/igl/matlab/mexErrMsgTxt.cpp

@@ -0,0 +1,13 @@
+#include "mexErrMsgTxt.h"
+
+// Overload mexErrMsgTxt to check an assertion then print text only if
+// assertion fails
+#include "mex.h"
+IGL_INLINE void igl::mexErrMsgTxt(bool assertion, const char * text)
+{
+  if(!assertion)
+  {
+    ::mexErrMsgTxt(text);
+  }
+}
+

+ 6 - 0
include/igl/matlab/mexErrMsgTxt.h

@@ -0,0 +1,6 @@
+#include "../igl_inline.h"
+namespace igl
+{
+  // Wrapper for mexErrMsgTxt that only calls error if test fails
+  IGL_INLINE void mexErrMsgTxt(bool test, const char * message);
+}