Przeglądaj źródła

fixes for the static build

Former-commit-id: d20cc7a7c181270852704a129f05c4a003cdab88
Daniele Panozzo 10 lat temu
rodzic
commit
9e79ae39cf

+ 2 - 4
include/igl/angles.cpp

@@ -13,8 +13,8 @@ template <
   typename DerivedF,
   typename Derivedtheta>
 void igl::angles(
-  Eigen::PlainObjectBase<DerivedV>& V,
-  Eigen::PlainObjectBase<DerivedF>& F,
+  const Eigen::PlainObjectBase<DerivedV>& V,
+  const Eigen::PlainObjectBase<DerivedF>& F,
   Eigen::PlainObjectBase<Derivedtheta>& theta)
 {
   theta.resize(F.rows(),F.cols());
@@ -40,8 +40,6 @@ void igl::angles(
   }
 }
 
-
-}
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 #endif

+ 4 - 2
include/igl/angles.h

@@ -24,10 +24,12 @@ namespace igl
   typename DerivedF,
   typename Derivedtheta>
   IGL_INLINE void angles(
-  Eigen::PlainObjectBase<DerivedV>& V,
-  Eigen::PlainObjectBase<DerivedF>& F,
+  const Eigen::PlainObjectBase<DerivedV>& V,
+  const Eigen::PlainObjectBase<DerivedF>& F,
   Eigen::PlainObjectBase<Derivedtheta>& theta);
 
+}
+
 #ifndef IGL_STATIC_LIBRARY
 #  include "angles.cpp"
 #endif

+ 3 - 3
include/igl/doublearea.cpp

@@ -19,7 +19,7 @@ IGL_INLINE void igl::doublearea(
 {
   if (F.cols() == 4) // quads are handled by a specialized function
     return doublearea_quad(V,F,dblA);
-  
+
   const int dim = V.cols();
   // Only support triangles
   assert(F.cols() == 3);
@@ -174,9 +174,9 @@ Eigen::PlainObjectBase<DeriveddblA> & dblA)
   Eigen::VectorXd doublearea_tri;
   igl::doublearea(V,Ft,doublearea_tri);
 
-  dblA.resize(F.rows());
+  dblA.resize(F.rows(),1);
   for(unsigned i=0; i<F.rows();++i)
-    dblA[i] = doublearea_tri[i*2] + doublearea_tri[i*2 + 1];
+    dblA(i) = doublearea_tri(i*2) + doublearea_tri(i*2 + 1);
 
 }
 

+ 1 - 0
tutorial/CMakeLists.txt

@@ -77,3 +77,4 @@ add_subdirectory("608_LIM")
 if(CGAL_FOUND)
 add_subdirectory("609_Boolean")
 endif()
+add_subdirectory("610_Statistics")