Browse Source

fixed python compilation error
added python to autobuild on mac/linux


Former-commit-id: 6a649ed40c8236b85d56afdb6b5377458bca7c2d

Daniele Panozzo 9 years ago
parent
commit
fb819ab4f7

+ 12 - 0
.travis.yml

@@ -8,6 +8,12 @@ matrix:
         - git submodule update --init --recursive
         - mkdir external/nanogui/ext/glfw/include/GL
         - wget -P external/nanogui/ext/glfw/include/GL http://www.opengl.org/registry/api/GL/glcorearb.h
+        - cd python
+        - mkdir build
+        - cd build
+        - cmake ../
+        - make -j 2
+        - cd ../../
         - cd tutorial
         - mkdir build
         - cd build
@@ -40,6 +46,12 @@ matrix:
         - brew upgrade cmake
         - brew upgrade cgal
         - git submodule update --init --recursive
+        - cd python
+        - mkdir build
+        - cd build
+        - cmake ../
+        - make -j 2
+        - cd ../../
         - cd tutorial
         - mkdir build
         - cd build

+ 5 - 5
include/igl/cross_field_missmatch.cpp

@@ -19,7 +19,7 @@
 #include <igl/rotation_matrix_from_directions.h>
 
 namespace igl {
-  template <typename DerivedV, typename DerivedF>
+  template <typename DerivedV, typename DerivedF, typename DerivedM>
   class MissMatchCalculator
   {
   public:
@@ -93,7 +93,7 @@ public:
     igl::triangle_triangle_adjacency(F,TT,TTi);
   }
 
-  inline void calculateMissmatch(Eigen::PlainObjectBase<DerivedF> &Handle_MMatch)
+  inline void calculateMissmatch(Eigen::PlainObjectBase<DerivedM> &Handle_MMatch)
   {
     Handle_MMatch.setConstant(F.rows(),3,-1);
     for (size_t i=0;i<F.rows();i++)
@@ -110,13 +110,13 @@ public:
 
 };
 }
-template <typename DerivedV, typename DerivedF>
+template <typename DerivedV, typename DerivedF, typename DerivedM>
 IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
                                            const Eigen::PlainObjectBase<DerivedF> &F,
                                            const Eigen::PlainObjectBase<DerivedV> &PD1,
                                            const Eigen::PlainObjectBase<DerivedV> &PD2,
                                            const bool isCombed,
-                                           Eigen::PlainObjectBase<DerivedF> &missmatch)
+                                           Eigen::PlainObjectBase<DerivedM> &missmatch)
 {
   DerivedV PD1_combed;
   DerivedV PD2_combed;
@@ -128,7 +128,7 @@ IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV
     PD1_combed = PD1;
     PD2_combed = PD2;
   }
-  igl::MissMatchCalculator<DerivedV, DerivedF> sf(V, F, PD1_combed, PD2_combed);
+  igl::MissMatchCalculator<DerivedV, DerivedF, DerivedM> sf(V, F, PD1_combed, PD2_combed);
   sf.calculateMissmatch(missmatch);
 }
 

+ 2 - 2
include/igl/cross_field_missmatch.h

@@ -28,13 +28,13 @@ namespace igl
   //                    across all face edges
   //
 
-  template <typename DerivedV, typename DerivedF>
+  template <typename DerivedV, typename DerivedF, typename DerivedM>
   IGL_INLINE void cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
                                         const Eigen::PlainObjectBase<DerivedF> &F,
                                         const Eigen::PlainObjectBase<DerivedV> &PD1,
                                         const Eigen::PlainObjectBase<DerivedV> &PD2,
                                         const bool isCombed,
-                                        Eigen::PlainObjectBase<DerivedF> &missmatch);
+                                        Eigen::PlainObjectBase<DerivedM> &missmatch);
 }
 #ifndef IGL_STATIC_LIBRARY
 #include "cross_field_missmatch.cpp"

+ 2 - 6
include/igl/find_cross_field_singularities.cpp

@@ -68,13 +68,9 @@ IGL_INLINE void igl::find_cross_field_singularities(const Eigen::PlainObjectBase
                                                     Eigen::PlainObjectBase<DerivedO> &singularityIndex,
                                                     bool isCombed)
 {
-  // Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > Handle_MMatch;
-  // Eigen::PlainObjectBase<Eigen::Matrix<int,  Eigen::Dynamic, 3> > Handle_MMatch;
-  // Eigen::Matrix<int, Eigen::Dynamic, 3> Handle_MMatch;
   Eigen::Matrix<typename DerivedF::Scalar, Eigen::Dynamic, 3> Handle_MMatch;
-  // Eigen::Matrix<typename DerivedF::Scalar, Eigen::Dynamic, 3> Handle_MMatch;
-  // Eigen::Matrix<typename DerivedF::Scalar, Eigen::Dynamic, Eigen::Dynamic> Handle_MMatch;
-  igl::cross_field_missmatch<DerivedV, DerivedF>(V, F, PD1, PD2, isCombed, Handle_MMatch);
+
+  igl::cross_field_missmatch(V, F, PD1, PD2, isCombed, Handle_MMatch);
   igl::find_cross_field_singularities(V, F, Handle_MMatch, isSingularity, singularityIndex);
 }
 

+ 0 - 1
python/py_igl_viewer.cpp

@@ -145,7 +145,6 @@ py::class_<igl::viewer::ViewerCore> viewercore_class(me, "ViewerCore");
     .def("draw",&igl::viewer::ViewerCore::draw)
     .def("draw_buffer",&igl::viewer::ViewerCore::draw_buffer)
 
-    .def_readwrite("textrenderer",&igl::viewer::ViewerCore::textrenderer)
     .def_readwrite("shininess",&igl::viewer::ViewerCore::shininess)
 
     .def_property("background_color",