소스 검색

Merge pull request #424 from qnzhou/master

Some miscellaneous minor changes

Former-commit-id: 8c6c2ab3b50a647fc4068edb92d5978b7740e574
Alec Jacobson 8 년 전
부모
커밋
5e85fbd06a
3개의 변경된 파일13개의 추가작업 그리고 12개의 파일을 삭제
  1. 2 1
      include/igl/copyleft/cgal/mesh_boolean.cpp
  2. 10 10
      include/igl/flip_edge.cpp
  3. 1 1
      include/igl/lexicographic_triangulation.cpp

+ 2 - 1
include/igl/copyleft/cgal/mesh_boolean.cpp

@@ -113,7 +113,8 @@ IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
   {
     for(int d = 0;d<3;d++) VV(VA.rows()+b,d) = VB(b,d);
   }
-  FF << FA, FB.array() + VA.rows();
+  FF.block(0, 0, FA.rows(), 3) = FA;
+  FF.block(FA.rows(), 0, FB.rows(), 3) = FB.array() + VA.rows();
   return mesh_boolean(VV,FF,sizes,wind_num_op,keep,VC,FC,J);
 }
 

+ 10 - 10
include/igl/flip_edge.cpp

@@ -72,10 +72,10 @@ IGL_INLINE void igl::flip_edge(
   assert(E(e_32, 0) == v3);
   assert(E(e_32, 1) == v2);
 
-  const size_t ue_24 = EMAP[e_24];
-  const size_t ue_41 = EMAP[e_41];
-  const size_t ue_13 = EMAP[e_13];
-  const size_t ue_32 = EMAP[e_32];
+  const size_t ue_24 = EMAP(e_24);
+  const size_t ue_41 = EMAP(e_41);
+  const size_t ue_13 = EMAP(e_13);
+  const size_t ue_32 = EMAP(e_32);
 
   F(f1, 0) = v1;
   F(f1, 1) = v3;
@@ -107,12 +107,12 @@ IGL_INLINE void igl::flip_edge(
   E(new_e_24, 0) = v2;
   E(new_e_24, 1) = v4;
 
-  EMAP[new_e_34] = uei;
-  EMAP[new_e_43] = uei;
-  EMAP[new_e_41] = ue_41;
-  EMAP[new_e_13] = ue_13;
-  EMAP[new_e_32] = ue_32;
-  EMAP[new_e_24] = ue_24;
+  EMAP(new_e_34) = uei;
+  EMAP(new_e_43) = uei;
+  EMAP(new_e_41) = ue_41;
+  EMAP(new_e_13) = ue_13;
+  EMAP(new_e_32) = ue_32;
+  EMAP(new_e_24) = ue_24;
 
   auto replace = [](std::vector<Index>& array, Index old_v, Index new_v) {
     std::replace(array.begin(), array.end(), old_v, new_v);

+ 1 - 1
include/igl/lexicographic_triangulation.cpp

@@ -35,7 +35,7 @@ IGL_INLINE void igl::lexicographic_triangulation(
   igl::sortrows(P, true, ordered_P, order);
 
   std::vector<Eigen::Vector3i> faces;
-  std::list<size_t> boundary;
+  std::list<int> boundary;
   const Scalar p0[] = {ordered_P(0, 0), ordered_P(0, 1)};
   const Scalar p1[] = {ordered_P(1, 0), ordered_P(1, 1)};
   for (size_t i=2; i<num_pts; i++) {