diff --git a/include/igl/active_set.cpp b/include/igl/active_set.cpp index 69e7beba0..21ef0435a 100755 --- a/include/igl/active_set.cpp +++ b/include/igl/active_set.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2013 Alec Jacobson -// -// 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 "active_set.h" #include "min_quad_with_fixed.h" @@ -17,9 +17,9 @@ #include template < - typename AT, + typename AT, typename DerivedB, - typename Derivedknown, + typename Derivedknown, typename DerivedY, typename AeqT, typename DerivedBeq, @@ -172,7 +172,7 @@ IGL_INLINE igl::SolverStatus igl::active_set( const int as_lx_count = count(as_lx.data(),as_lx.data()+n,TRUE); const int as_ux_count = count(as_ux.data(),as_ux.data()+n,TRUE); - const int as_ieq_count = + const int as_ieq_count = count(as_ieq.data(),as_ieq.data()+as_ieq.size(),TRUE); #ifndef NDEBUG { @@ -261,7 +261,7 @@ IGL_INLINE igl::SolverStatus igl::active_set( } } #endif - + Eigen::PlainObjectBase sol; if(known_i.size() == A.rows()) { @@ -315,7 +315,7 @@ IGL_INLINE igl::SolverStatus igl::active_set( slice(B,known_i,Bk); MatrixXd Lambda_known_i = -(0.5*Ak*Z + 0.5*Bk); // reverse the lambda values for lx - Lambda_known_i.block(nk,0,as_lx_count,1) = + Lambda_known_i.block(nk,0,as_lx_count,1) = (-1*Lambda_known_i.block(nk,0,as_lx_count,1)).eval(); // Extract Lagrange multipliers for Aieq_i (always at back of sol) @@ -324,7 +324,7 @@ IGL_INLINE igl::SolverStatus igl::active_set( { Lambda_Aieq_i(Aieq_i.rows()-1-l) = sol(sol.rows()-1-l); } - + // Remove from active set for(int l = 0;l, Eigen::Matrix, Eigen::Matrix, double, Eigen::Matrix, double, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::active_set_params const&, Eigen::PlainObjectBase >&); +template igl::SolverStatus igl::active_set, Eigen::Matrix, Eigen::Matrix, double, Eigen::Matrix, double, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::active_set_params const&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/colon.cpp b/include/igl/colon.cpp index 1c6d7ecd6..8937a6221 100644 --- a/include/igl/colon.cpp +++ b/include/igl/colon.cpp @@ -45,6 +45,7 @@ IGL_INLINE Eigen::Matrix igl::colon( template Eigen::Matrix igl::colon(int, int); template Eigen::Matrix igl::colon(int,long); template Eigen::Matrix igl::colon(int,long long int); +template Eigen::Matrix igl::colon(double, double); // generated by autoexplicit.sh template void igl::colon(int, long, int, Eigen::Matrix&); template void igl::colon(int, int, long, Eigen::Matrix&); diff --git a/include/igl/cross_field_missmatch.cpp b/include/igl/cross_field_missmatch.cpp index fcf6f46fc..5c53e410a 100644 --- a/include/igl/cross_field_missmatch.cpp +++ b/include/igl/cross_field_missmatch.cpp @@ -136,5 +136,6 @@ IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&); template void igl::cross_field_missmatch, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&); +template void igl::cross_field_missmatch, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/doublearea.cpp b/include/igl/doublearea.cpp index ca6c65ce7..be9ef1086 100644 --- a/include/igl/doublearea.cpp +++ b/include/igl/doublearea.cpp @@ -101,7 +101,7 @@ IGL_INLINE void igl::doublearea( } default: { - Eigen::Matrix + Eigen::Matrix uL(A.rows(),3); uL.col(0) = (B-C).rowwise().norm(); uL.col(1) = (C-A).rowwise().norm(); @@ -218,4 +218,7 @@ template Eigen::Matrix::Scalar igl::doublearea_single, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::doublearea, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::doublearea, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::doublearea, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::doublearea, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template Eigen::Matrix::Scalar igl::doublearea_single, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&); #endif diff --git a/include/igl/find_cross_field_singularities.cpp b/include/igl/find_cross_field_singularities.cpp index 3c7628c15..8b508b347 100644 --- a/include/igl/find_cross_field_singularities.cpp +++ b/include/igl/find_cross_field_singularities.cpp @@ -80,4 +80,6 @@ template void igl::find_cross_field_singularities, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, bool); template void igl::find_cross_field_singularities, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::find_cross_field_singularities, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, bool); +template void igl::find_cross_field_singularities, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/floor.cpp b/include/igl/floor.cpp index 0da1e4d34..a8ce414e0 100644 --- a/include/igl/floor.cpp +++ b/include/igl/floor.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2013 Alec Jacobson -// -// 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 "floor.h" #include @@ -32,4 +32,5 @@ IGL_INLINE void igl::floor( // Explicit instanciation template void igl::floor, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::floor, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::floor, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/harmonic.cpp b/include/igl/harmonic.cpp index 6aecdd7b5..be48f6183 100644 --- a/include/igl/harmonic.cpp +++ b/include/igl/harmonic.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2014 Alec Jacobson -// -// 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 "harmonic.h" #include "cotmatrix.h" @@ -66,6 +66,7 @@ IGL_INLINE bool igl::harmonic( #ifdef IGL_STATIC_LIBRARY // Explicit template specialization -template bool igl::harmonic, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase >&); +template bool igl::harmonic, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase >&); template bool igl::harmonic, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase >&); +template bool igl::harmonic, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/list_to_matrix.cpp b/include/igl/list_to_matrix.cpp index 88f3dae53..d90aae267 100644 --- a/include/igl/list_to_matrix.cpp +++ b/include/igl/list_to_matrix.cpp @@ -135,7 +135,16 @@ template bool igl::list_to_matrix >( template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); + #ifdef WIN32 template bool igl::list_to_matrix >(class std::vector > const &,class Eigen::PlainObjectBase > &); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); +template bool igl::list_to_matrix >(std::vector > const&, Eigen::PlainObjectBase >&); #endif #endif diff --git a/include/igl/matrix_to_list.cpp b/include/igl/matrix_to_list.cpp index ef1a130ec..62cbfdb87 100644 --- a/include/igl/matrix_to_list.cpp +++ b/include/igl/matrix_to_list.cpp @@ -67,4 +67,5 @@ template void igl::matrix_to_list >(Eigen template void igl::matrix_to_list >(Eigen::MatrixBase > const&, std::vector::Scalar, std::allocator::Scalar> >&); template void igl::matrix_to_list >(Eigen::MatrixBase > const&, std::vector::Scalar, std::allocator::Scalar> >&); template void igl::matrix_to_list >(Eigen::MatrixBase > const&, std::vector::Scalar, std::allocator::Scalar> >, std::allocator::Scalar, std::allocator::Scalar> > > >&); +template void igl::matrix_to_list >(Eigen::MatrixBase > const&, std::vector::Scalar, std::allocator::Scalar> >&); #endif diff --git a/include/igl/min_quad_with_fixed.cpp b/include/igl/min_quad_with_fixed.cpp index fe7ad0b19..ba971baef 100644 --- a/include/igl/min_quad_with_fixed.cpp +++ b/include/igl/min_quad_with_fixed.cpp @@ -573,4 +573,6 @@ template bool igl::min_quad_with_fixed_solve, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(igl::min_quad_with_fixed_data const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template bool igl::min_quad_with_fixed_solve, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(igl::min_quad_with_fixed_data const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template bool igl::min_quad_with_fixed, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&); +template bool igl::min_quad_with_fixed, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&); +template bool igl::min_quad_with_fixed_solve, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(igl::min_quad_with_fixed_data const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/parula.cpp b/include/igl/parula.cpp index 6c590152d..85bd46a7d 100644 --- a/include/igl/parula.cpp +++ b/include/igl/parula.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2015 Alec Jacobson -// -// 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 "parula.h" @@ -63,4 +63,5 @@ IGL_INLINE void igl::parula( // Explicit template specialization template void igl::parula(double, double*); template void igl::parula, Eigen::Matrix >(Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&); +template void igl::parula, Eigen::Matrix >(Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/per_face_normals.cpp b/include/igl/per_face_normals.cpp index 940653a0c..05c58a70e 100644 --- a/include/igl/per_face_normals.cpp +++ b/include/igl/per_face_normals.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2013 Alec Jacobson -// -// 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 "per_face_normals.h" #include @@ -75,7 +75,7 @@ IGL_INLINE void igl::per_face_normals_stable( { // This is a little _silly_ in terms of complexity, but its recursive // implementation is clean looking... - const std::function sum3 = + const std::function sum3 = [&sum3](Scalar a, Scalar b, Scalar c)->Scalar { if(fabs(c)>fabs(a)) @@ -116,4 +116,6 @@ template void igl::per_face_normals, Eig template void igl::per_face_normals, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::per_face_normals_stable, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::per_face_normals_stable, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::per_face_normals, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::per_face_normals_stable, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/principal_curvature.cpp b/include/igl/principal_curvature.cpp index 342b1d01b..3298a3526 100644 --- a/include/igl/principal_curvature.cpp +++ b/include/igl/principal_curvature.cpp @@ -856,4 +856,5 @@ IGL_INLINE void igl::principal_curvature( // generated by autoexplicit.sh template void igl::principal_curvature, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, unsigned int, bool); template void igl::principal_curvature, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, unsigned int, bool); +template void igl::principal_curvature, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, unsigned int, bool); #endif diff --git a/include/igl/readOFF.cpp b/include/igl/readOFF.cpp index c38f85485..95451b407 100644 --- a/include/igl/readOFF.cpp +++ b/include/igl/readOFF.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2013 Alec Jacobson -// -// 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 "readOFF.h" #include "list_to_matrix.h" @@ -11,17 +11,17 @@ template IGL_INLINE bool igl::readOFF( - const std::string off_file_name, + const std::string off_file_name, std::vector > & V, std::vector > & F, std::vector > & N) { using namespace std; - FILE * off_file = fopen(off_file_name.c_str(),"r"); + FILE * off_file = fopen(off_file_name.c_str(),"r"); if(NULL==off_file) { printf("IOError: %s could not be opened...\n",off_file_name.c_str()); - return false; + return false; } V.clear(); F.clear(); @@ -32,12 +32,12 @@ IGL_INLINE bool igl::readOFF( const std::string NOFF("NOFF"); if(fscanf(off_file,"%s\n",header)!=1 || !( - string(header).compare(0, OFF.length(), OFF)==0 || + string(header).compare(0, OFF.length(), OFF)==0 || string(header).compare(0,NOFF.length(),NOFF)==0)) { printf("Error: %s's first line should be OFF or NOFF not %s...",off_file_name.c_str(),header); fclose(off_file); - return false; + return false; } bool has_normals = string(header).compare(0,NOFF.length(),NOFF)==0; // Second line is #vertices #faces #edges @@ -114,7 +114,7 @@ IGL_INLINE bool igl::readOFF( }else{ fscanf(off_file,"%d%*[^\n]",&index); } - + face[j] = index; } F[i] = face; @@ -144,7 +144,7 @@ IGL_INLINE bool igl::readOFF( Eigen::PlainObjectBase& F) { std::vector > vV; - std::vector > vN; + std::vector > vN; std::vector > vF; bool success = igl::readOFF(str,vV,vF,vN); if(!success) @@ -177,7 +177,7 @@ IGL_INLINE bool igl::readOFF( Eigen::PlainObjectBase& N) { std::vector > vV; - std::vector > vN; + std::vector > vN; std::vector > vF; bool success = igl::readOFF(str,vV,vF,vN); if(!success) @@ -198,7 +198,7 @@ IGL_INLINE bool igl::readOFF( // igl::list_to_matrix(vF,F) already printed error message to std err return false; } - + if (vN.size()) { bool N_rect = igl::list_to_matrix(vN,N); @@ -221,4 +221,5 @@ template bool igl::readOFF, Eigen::Matrix template bool igl::readOFF, Eigen::Matrix >(std::basic_string, std::allocator >, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template bool igl::readOFF, Eigen::Matrix >(std::basic_string, std::allocator >, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template bool igl::readOFF, Eigen::Matrix >(std::string, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template bool igl::readOFF, Eigen::Matrix >(std::basic_string, std::allocator >, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/setdiff.cpp b/include/igl/setdiff.cpp index 8517c7cfe..2c389bf07 100644 --- a/include/igl/setdiff.cpp +++ b/include/igl/setdiff.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2014 Alec Jacobson -// -// 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 "setdiff.h" #include "colon.h" @@ -81,4 +81,5 @@ IGL_INLINE void igl::setdiff( // Explicit template specialization template void igl::setdiff, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::setdiff, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::setdiff, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/slice.cpp b/include/igl/slice.cpp index 15a98ad78..099118afb 100644 --- a/include/igl/slice.cpp +++ b/include/igl/slice.cpp @@ -169,7 +169,7 @@ IGL_INLINE void igl::slice( } template < - typename DerivedX, + typename DerivedX, typename DerivedR, typename DerivedC, typename DerivedY> @@ -273,4 +273,8 @@ template void igl::slice, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::slice, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template Eigen::Matrix igl::slice >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&); +template void igl::slice, Eigen::Matrix, Eigen::SparseMatrix >(Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, int, Eigen::SparseMatrix&); +template void igl::slice, Eigen::Matrix, Eigen::SparseMatrix >(Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, int, Eigen::SparseMatrix&); +template Eigen::Matrix igl::slice >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&); +template void igl::slice, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/slice_into.cpp b/include/igl/slice_into.cpp index bb5aa0aa1..7d230d185 100644 --- a/include/igl/slice_into.cpp +++ b/include/igl/slice_into.cpp @@ -138,4 +138,9 @@ template void igl::slice_into >(Eigen::Ma template void igl::slice_into >(Eigen::SparseMatrix const&, Eigen::Matrix const&, int, Eigen::SparseMatrix&); template void igl::slice_into >(Eigen::Matrix const&, Eigen::Matrix const&, int, Eigen::Matrix&); template void igl::slice_into > >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, int, Eigen::PlainObjectBase >&); +template void igl::slice_into > >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, int, Eigen::PlainObjectBase >&); +template void igl::slice_into >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, Eigen::PlainObjectBase >&); +template void igl::slice_into >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, Eigen::PlainObjectBase >&); +template void igl::slice_into >(Eigen::Matrix const&, Eigen::Matrix const&, int, Eigen::Matrix&); +template void igl::slice_into(Eigen::SparseMatrix const&, Eigen::Matrix const&, Eigen::Matrix const&, Eigen::SparseMatrix&); #endif diff --git a/include/igl/sort.cpp b/include/igl/sort.cpp index c989b33b5..4710b4094 100644 --- a/include/igl/sort.cpp +++ b/include/igl/sort.cpp @@ -238,5 +238,6 @@ template void igl::sort, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, int, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::sort, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, int, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::sort, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, int, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::sort, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, int, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/sortrows.cpp b/include/igl/sortrows.cpp index 7edb5993f..12a673b8c 100644 --- a/include/igl/sortrows.cpp +++ b/include/igl/sortrows.cpp @@ -1,9 +1,9 @@ // This file is part of libigl, a simple c++ geometry processing library. -// +// // Copyright (C) 2013 Alec Jacobson -// -// 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 "sortrows.h" #include "get_seconds.h" @@ -90,4 +90,5 @@ template void igl::sortrows, Eigen::Mat template void igl::sortrows, Eigen::Matrix >(Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::sortrows, Eigen::Matrix >(Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::sortrows, Eigen::Matrix >(Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::sortrows, Eigen::Matrix >(Eigen::PlainObjectBase > const&, bool, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/unique.cpp b/include/igl/unique.cpp index aac14b8b8..5f09e8695 100644 --- a/include/igl/unique.cpp +++ b/include/igl/unique.cpp @@ -260,4 +260,11 @@ template void igl::unique_rows, Eigen::Mat template void igl::unique(std::vector > const&, std::vector >&); template void igl::unique(std::vector > const&, std::vector >&, std::vector >&, std::vector >&); template void igl::unique_rows, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::unique_rows, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::unique, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::unique, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::unique, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::unique(std::vector > const&, std::vector >&); +template void igl::unique, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::unique, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 0c81013e7..1e5d8fedf 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -82,7 +82,7 @@ include_directories(${LIBIGL_INCLUDE_DIRS}) add_definitions(${LIBIGL_DEFINITIONS}) ## Optional modules -if (LIBIGL_WITH_OPENGL) +if (LIBIGL_WITH_VIEWER) add_definitions(-DPY_VIEWER) list(APPEND SHARED_SOURCES "py_igl_viewer.cpp") endif () diff --git a/python/py_igl_viewer.cpp b/python/py_igl_viewer.cpp index 2b60f2849..f263de5f2 100644 --- a/python/py_igl_viewer.cpp +++ b/python/py_igl_viewer.cpp @@ -6,6 +6,7 @@ #include #include #include +#include void python_export_igl_viewer(py::module &m) {