Răsfoiți Sursa

templates

Former-commit-id: 113d8a7505e9610ca46236462604787375f6fff9
Olga Diamanti 10 ani în urmă
părinte
comite
ecf9a8f580

+ 2 - 2
build/Makefile.conf

@@ -112,7 +112,7 @@ ifeq ($(IGL_USERNAME),daniele)
 endif
 
 ifeq ($(IGL_USERNAME),olkido)
-    IGL_WITH_MATLAB=0
+    IGL_WITH_MATLAB=1
 		IGL_WITH_COMISO=1
 		IGL_WITH_XML=1
 		COMISO=/Users/olkido/Documents/igl/MIQ/src/CoMISo
@@ -121,7 +121,7 @@ ifeq ($(IGL_USERNAME),olkido)
     IGL_WITH_EMBREE=1
     IGL_WITH_PNG=1
 		IGL_WITH_VIEWER=1
-		MATLAB=/Applications/MATLAB_R2013a.app/
+		MATLAB=/Applications/MATLAB_R2014b.app/
 endif
 
 ifeq ($(IGL_USERNAME),chrsch)

+ 3 - 3
build/Makefile_matlab

@@ -16,7 +16,7 @@ OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 # include igl headers
 INC+=-I../include/
 
-# EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
+# EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY
 
 # Eigen dependency
 EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
@@ -24,14 +24,14 @@ INC+=$(EIGEN3_INC)
 
 # Matlab dependency
 ifndef MATLAB
-  MATLAB=/Applications/MATLAB_R2013b.app/
+  MATLAB=/Applications/MATLAB_R2014b.app/
   $(warning MATLAB undefined. Setting MATLAB=${MATLAB})
 endif
 MATLAB_INC=-I$(MATLAB)/extern/include/
 MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -leng
 INC+=$(MATLAB_INC)
 
-obj: 
+obj:
 	mkdir -p obj
 
 ../lib/libiglmatlab.a: $(OBJ_FILES)

+ 5 - 4
include/igl/matlab_format.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@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 "matlab_format.h"
 #include "STR.h"
@@ -119,4 +119,5 @@ template Eigen::WithFormat<Eigen::Matrix<float, 2, 1, 0, 2, 1> > const igl::matl
 template Eigen::WithFormat<Eigen::Matrix<float, 2, 2, 1, 2, 2> > const igl::matlab_format<Eigen::Matrix<float, 2, 2, 1, 2, 2> >(Eigen::PlainObjectBase<Eigen::Matrix<float, 2, 2, 1, 2, 2> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >);
 template Eigen::WithFormat<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const igl::matlab_format<Eigen::Matrix<float, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >);
 template Eigen::WithFormat<Eigen::Matrix<double, 3, 3, 1, 3, 3> > const igl::matlab_format<Eigen::Matrix<double, 3, 3, 1, 3, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 1, 3, 3> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >);
+template Eigen::WithFormat<Eigen::Array<double, -1, 1, 0, -1, 1> > const igl::matlab_format<Eigen::Array<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Array<double, -1, 1, 0, -1, 1> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >);
 #endif

+ 1 - 0
include/igl/n_polyvector.cpp

@@ -15,6 +15,7 @@
 #include <igl/igl_inline.h>
 #include <Eigen/Sparse>
 
+#include <Eigen/Geometry>
 #include <iostream>
 
 namespace igl {

+ 4 - 2
include/igl/n_polyvector_general.cpp

@@ -227,7 +227,10 @@ IGL_INLINE bool igl::GeneralPolyVectorFieldFinder<DerivedV, DerivedF>::
     computeCoefficientLaplacian(degree, DD);
     Eigen::SparseMatrix<std::complex<typename DerivedV::Scalar> > f; f.resize(numF,1);
 
-    minQuadWithKnownMini(DD, f, isConstrained, Ck, coeffs[i]);
+    if (isConstrained.sum() == numF)
+      coeffs[i] = Ck;
+    else
+      minQuadWithKnownMini(DD, f, isConstrained, Ck, coeffs[i]);
   }
 
   std::vector<Eigen::Matrix<typename DerivedV::Scalar, Eigen::Dynamic, 2> > pv;
@@ -479,7 +482,6 @@ IGL_INLINE void igl::n_polyvector_general(const Eigen::MatrixXd &V,
     isConstrained(b(i)) = 1;
     cfW.row(b(i)) << bc.row(i);
   }
-
   int n = I.rows();
   igl::GeneralPolyVectorFieldFinder<Eigen::MatrixXd, Eigen::MatrixXi> pvff(V,F,n);
   pvff.solve(isConstrained, cfW, I, output);

+ 5 - 4
include/igl/slice_into.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@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 "slice_into.h"
 #include "colon.h"
@@ -134,4 +134,5 @@ template void igl::slice_into<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::
 template void igl::slice_into<Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 template void igl::slice_into<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);
 template void igl::slice_into<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::slice_into<Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int, Eigen::Matrix<double, -1, 1, 0, -1, 1>&);
 #endif