Browse Source

missing headers and warnings

Former-commit-id: a91547caa1b0a31a158bd21e71fd9e7be2d2c755
Alec Jacobson 10 years ago
parent
commit
78637ab62a

+ 14 - 13
include/igl/cgal/outer_hull.cpp

@@ -48,16 +48,17 @@ IGL_INLINE void igl::outer_hull(
   typedef Matrix<typename DerivedN::Scalar,1,3> RowVector3N;
   const Index m = F.rows();
 
-  const auto & duplicate_simplex = [&F](const int f, const int g)->bool
-  {
-    return 
-      (F(f,0) == F(g,0) && F(f,1) == F(g,1) && F(f,2) == F(g,2)) ||
-      (F(f,1) == F(g,0) && F(f,2) == F(g,1) && F(f,0) == F(g,2)) ||
-      (F(f,2) == F(g,0) && F(f,0) == F(g,1) && F(f,1) == F(g,2)) ||
-      (F(f,0) == F(g,2) && F(f,1) == F(g,1) && F(f,2) == F(g,0)) ||
-      (F(f,1) == F(g,2) && F(f,2) == F(g,1) && F(f,0) == F(g,0)) ||
-      (F(f,2) == F(g,2) && F(f,0) == F(g,1) && F(f,1) == F(g,0));
-  };
+  // UNUSED:
+  //const auto & duplicate_simplex = [&F](const int f, const int g)->bool
+  //{
+  //  return 
+  //    (F(f,0) == F(g,0) && F(f,1) == F(g,1) && F(f,2) == F(g,2)) ||
+  //    (F(f,1) == F(g,0) && F(f,2) == F(g,1) && F(f,0) == F(g,2)) ||
+  //    (F(f,2) == F(g,0) && F(f,0) == F(g,1) && F(f,1) == F(g,2)) ||
+  //    (F(f,0) == F(g,2) && F(f,1) == F(g,1) && F(f,2) == F(g,0)) ||
+  //    (F(f,1) == F(g,2) && F(f,2) == F(g,1) && F(f,0) == F(g,0)) ||
+  //    (F(f,2) == F(g,2) && F(f,0) == F(g,1) && F(f,1) == F(g,0));
+  //};
 
 #ifdef IGL_OUTER_HULL_DEBUG
   cout<<"outer hull..."<<endl;
@@ -117,7 +118,7 @@ IGL_INLINE void igl::outer_hull(
   vector<MatrixXG> vG(ncc);
   vector<MatrixXJ> vJ(ncc);
   vector<MatrixXJ> vIM(ncc);
-  size_t face_count = 0;
+  //size_t face_count = 0;
   for(size_t id = 0;id<ncc;id++)
   {
     vIM[id].resize(counts[id],1);
@@ -456,8 +457,8 @@ IGL_INLINE void igl::outer_hull(
   };
 
   Eigen::MatrixXd Vcol(V.rows(), V.cols());
-  for (size_t i=0; i<V.rows(); i++) {
-      for (size_t j=0; j<V.cols(); j++) {
+  for (size_t i=0; i<(size_t)V.rows(); i++) {
+      for (size_t j=0; j<(size_t)V.cols(); j++) {
           Vcol(i, j) = CGAL::to_double(V(i, j));
       }
   }

+ 1 - 1
include/igl/cgal/point_mesh_squared_distance.h

@@ -28,7 +28,7 @@ namespace igl
   //   C  #P by 3 list of closest points
   //
   // Known bugs: This only computes distances to triangles. So unreferenced
-  // vertices are ignored.
+  // vertices and degenerate triangles (segments) are ignored.
   template <typename Kernel>
   IGL_INLINE void point_mesh_squared_distance(
     const Eigen::MatrixXd & P,

+ 1 - 1
include/igl/cgal/signed_distance.h

@@ -40,7 +40,7 @@ namespace igl
   //     sign_type=SIGNED_DISTANCE_TYPE_PSEUDONORMAL)
   //
   // Known bugs: This only computes distances to triangles. So unreferenced
-  // vertices are ignored.
+  // vertices and degenerate triangles are ignored.
   template <typename Kernel>
   IGL_INLINE void signed_distance(
     const Eigen::MatrixXd & P,

+ 2 - 2
include/igl/outer_facet.cpp

@@ -61,13 +61,13 @@ IGL_INLINE void igl::outer_facet(
                         max_f = f;
                         max_nd = nd;
                         flip = false;
-                    } else if (f > max_f){
+                    } else if (f > (Index)max_f){
                         max_f = f;
                         max_nd = nd;
                         flip = false;
                     }
                 } else {
-                    if (flip && f < max_f) {
+                    if (flip && f < (Index)max_f) {
                         max_f = f;
                         max_nd = generic_fabs(nd);
                         flip = true;

+ 1 - 0
include/igl/sort_angles.h

@@ -2,6 +2,7 @@
 #define SORT_ANGLES_H
 
 #include "igl_inline.h"
+#include <Eigen/Core>
 
 namespace igl {
     // Sort angles in ascending order in a numerically robust way.

+ 0 - 1
include/igl/winding_number.cpp

@@ -211,7 +211,6 @@ IGL_INLINE void igl::winding_number_2(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
-template void igl::winding_number_3<int>(double const*, int, int const*, int, double const*, int, double*);
 template void igl::winding_number_2<double>(double const*, int, double const*, int, double const*, int, double*);
 template void igl::winding_number_3<double>(double const*, int, double const*, int, double const*, int, double*);
 #endif