ソースを参照

Merge branch 'master' of https://github.com/libigl/libigl

Conflicts:
	include/igl/boundary_loop.cpp

Former-commit-id: 4a317c6605bb8cb8808d28d6cddb958ecc6782ef
schuellc 10 年 前
コミット
3440cf3df1

+ 9 - 9
include/igl/boundary_loop.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2014 Stefan Brugger <stefanbrugger@gmail.com>
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "boundary_loop.h"
 #include "slice.h"
@@ -14,7 +14,7 @@
 
 template <typename DerivedF, typename Index>
 IGL_INLINE void igl::boundary_loop(
-    const Eigen::PlainObjectBase<DerivedF> & F, 
+    const Eigen::PlainObjectBase<DerivedF> & F,
     std::vector<std::vector<Index> >& L)
 {
   using namespace std;
@@ -92,7 +92,7 @@ IGL_INLINE void igl::boundary_loop(
 
 template <typename DerivedF, typename Index>
 IGL_INLINE void igl::boundary_loop(
-  const Eigen::PlainObjectBase<DerivedF>& F, 
+  const Eigen::PlainObjectBase<DerivedF>& F,
   std::vector<Index>& L)
 {
   using namespace Eigen;
@@ -113,7 +113,7 @@ IGL_INLINE void igl::boundary_loop(
       maxLen = Lall[i].size();
       idxMax = i;
     }
-  }   
+  }
 
   L.resize(Lall[idxMax].size());
   for (int i = 0; i < Lall[idxMax].size(); ++i)
@@ -122,7 +122,7 @@ IGL_INLINE void igl::boundary_loop(
 
 template <typename DerivedF, typename DerivedL>
 IGL_INLINE void igl::boundary_loop(
-  const Eigen::PlainObjectBase<DerivedF>& F, 
+  const Eigen::PlainObjectBase<DerivedF>& F,
   Eigen::PlainObjectBase<DerivedL>& L)
 {
   using namespace Eigen;
@@ -137,4 +137,4 @@ IGL_INLINE void igl::boundary_loop(
   L.resize(Lvec.size());
   for (int i = 0; i < Lvec.size(); ++i)
     L(i) = Lvec[i];
-}
+}

+ 15 - 4
include/igl/cgal/remesh_self_intersections.h

@@ -29,12 +29,12 @@ namespace igl
     RemeshSelfIntersectionsParam():detect_only(false),first_only(false){};
   };
   
-  // Given a triangle mesh (V,F) compute a new mesh (VV,FF) which is the same as
-  // (V,F) except that any self-intersecting triangles in (V,F) have been
+  // Given a triangle mesh (V,F) compute a new mesh (VV,FF) which is the same
+  // as (V,F) except that any self-intersecting triangles in (V,F) have been
   // subdivided (new vertices and face created) so that the self-intersection
   // contour lies exactly on edges in (VV,FF). New vertices will appear in
-  // original faces or on original edges. New vertices on edges are "merged" only
-  // across original faces sharing that edge. This means that if the input
+  // original faces or on original edges. New vertices on edges are "merged"
+  // only across original faces sharing that edge. This means that if the input
   // triangle mesh is a closed manifold the output will be too.
   //
   // Inputs:
@@ -53,6 +53,17 @@ namespace igl
   // any resulting additional vertices along that edge may not get properly
   // connected so that the output mesh has the same global topology. This is
   // because 
+  //
+  // Example:
+  //     // resolve intersections
+  //     igl::remesh_self_intersections(V,F,params,VV,FF,IF,J,IM);
+  //     // _apply_ duplicate vertex mapping IM to FF
+  //     for_each(FF.data(),FF.data()+FF.size(),[&IM](int & a){a=IM(a);});
+  //     // remove any vertices now unreferenced after duplicate mapping.
+  //     igl::remove_unreferenced(VV,FF,SV,SF,UIM);
+  //     // Now (SV,SF) is ready to extract outer hull
+  //     igl::outer_hull(SV,SF,G,J,flip);
+  //
   template <
     typename DerivedV,
     typename DerivedF,

+ 5 - 2
tutorial/CMakeLists.shared

@@ -65,8 +65,11 @@ link_directories(
 
 # Disable deprecated opengl code from libigl
 add_definitions(-DIGL_OPENGL_4)
-add_definitions(-DNDEBUG)
-add_definitions(-O3)
+
+IF(CMAKE_BUILD_TYPE MATCHES RELEASE)
+    add_definitions(-DNDEBUG)
+ENDIF(CMAKE_BUILD_TYPE MATCHES RELEASE)
+
 #add_definitions(-DENABLE_XML_SERIALIZATION)
 
 

+ 1 - 1
tutorial/tutorial.html.REMOVED.git-id

@@ -1 +1 @@
-2e5cd62765c38c507481d1880609faab4f97a9a9
+e7693c2b991564ae8692d7ec89a150095b200c32