diff --git a/include/igl/biharmonic_coordinates.cpp b/include/igl/biharmonic_coordinates.cpp index b3a5fbdcd..56063ef39 100644 --- a/include/igl/biharmonic_coordinates.cpp +++ b/include/igl/biharmonic_coordinates.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 "biharmonic_coordinates.h" #include "cotmatrix.h" @@ -42,7 +42,7 @@ IGL_INLINE bool igl::biharmonic_coordinates( using namespace Eigen; using namespace std; // This is not the most efficient way to build A, but follows "Linear - // Subspace Design for Real-Time Shape Deformation" [Wang et al. 2015]. + // Subspace Design for Real-Time Shape Deformation" [Wang et al. 2015]. SparseMatrix A; { SparseMatrix N,Z,L,K,M; @@ -75,7 +75,7 @@ IGL_INLINE bool igl::biharmonic_coordinates( massmatrix(V,T,MASSMATRIX_TYPE_DEFAULT,M); // normalize M /= ((VectorXd)M.diagonal()).array().abs().maxCoeff(); - DiagonalMatrix Minv = + DiagonalMatrix Minv = ((VectorXd)M.diagonal().array().inverse()).asDiagonal(); switch(k) { @@ -92,7 +92,7 @@ IGL_INLINE bool igl::biharmonic_coordinates( } } // Vertices in point handles - const size_t mp = + const size_t mp = count_if(S.begin(),S.end(),[](const vector & h){return h.size()==1;}); // number of region handles const size_t r = S.size()-mp; @@ -139,8 +139,13 @@ IGL_INLINE bool igl::biharmonic_coordinates( } } } - // minimize ½ W' A W' + // minimize ½ W' A W' // subject to W(b,:) = J return min_quad_with_fixed( A,VectorXd::Zero(A.rows()).eval(),b,J,{},VectorXd(),true,W); } + +#ifdef IGL_STATIC_LIBRARY +// Explicit template specialization +template bool igl::biharmonic_coordinates, Eigen::Matrix, int, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector >, std::__1::allocator > > > const&, int, Eigen::PlainObjectBase >&); +#endif diff --git a/include/igl/eigs.cpp b/include/igl/eigs.cpp index 0d37b7540..facdd3d02 100755 --- a/include/igl/eigs.cpp +++ b/include/igl/eigs.cpp @@ -149,3 +149,8 @@ IGL_INLINE bool igl::eigs( sU /= sqrt(rescale); return true; } + +#ifdef IGL_STATIC_LIBRARY +// Explicit template specialization +template bool igl::eigs, Eigen::Matrix >(Eigen::SparseMatrix const&, Eigen::SparseMatrix const&, unsigned long, igl::EigsType, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +#endif diff --git a/include/igl/list_to_matrix.cpp b/include/igl/list_to_matrix.cpp index ffa2f9665..2693a4ad9 100644 --- a/include/igl/list_to_matrix.cpp +++ b/include/igl/list_to_matrix.cpp @@ -167,4 +167,6 @@ template bool igl::list_to_matrix > >(std::vector > const&, Eigen::PlainObjectBase >&); template bool igl::list_to_matrix >(std::vector >, std::allocator > > > const&, Eigen::Matrix&); 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 >, std::allocator > > > const&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/matrix_to_list.cpp b/include/igl/matrix_to_list.cpp index ceecb981e..3cc081642 100644 --- a/include/igl/matrix_to_list.cpp +++ b/include/igl/matrix_to_list.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 "matrix_to_list.h" @@ -11,7 +11,7 @@ template IGL_INLINE void igl::matrix_to_list( - const Eigen::MatrixBase & M, + const Eigen::MatrixBase & M, std::vector > & V) { using namespace std; @@ -29,7 +29,7 @@ IGL_INLINE void igl::matrix_to_list( template IGL_INLINE void igl::matrix_to_list( - const Eigen::MatrixBase & M, + const Eigen::MatrixBase & M, std::vector & V) { using namespace std; @@ -66,4 +66,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> >&); +template void igl::matrix_to_list >(Eigen::MatrixBase > const&, std::vector::Scalar, std::allocator::Scalar> >, std::allocator::Scalar, std::allocator::Scalar> > > >&); #endif diff --git a/include/igl/min_quad_with_fixed.cpp b/include/igl/min_quad_with_fixed.cpp index d47efebaa..28ec8ba60 100644 --- a/include/igl/min_quad_with_fixed.cpp +++ b/include/igl/min_quad_with_fixed.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 "min_quad_with_fixed.h" @@ -107,7 +107,7 @@ IGL_INLINE bool igl::min_quad_with_fixed_precompute( data.Auu_sym = true; // This is an annoying assertion unless EPS can be chosen in a nicer way. //assert(is_symmetric(Auu,EPS())); - assert(is_symmetric(Auu,1.0) && + assert(is_symmetric(Auu,1.0) && "Auu should be symmetric if positive definite"); }else { @@ -127,9 +127,9 @@ IGL_INLINE bool igl::min_quad_with_fixed_precompute( #endif // QR decomposition to determine row rank in Aequ slice(Aeq,data.unknown,2,data.Aequ); - assert(data.Aequ.rows() == neq && + assert(data.Aequ.rows() == neq && "#Rows in Aequ should match #constraints"); - assert(data.Aequ.cols() == data.unknown.size() && + assert(data.Aequ.cols() == data.unknown.size() && "#cols in Aequ should match #unknowns"); data.AeqTQR.compute(data.Aequ.transpose().eval()); #ifdef MIN_QUAD_WITH_FIXED_CPP_DEBUG @@ -150,7 +150,7 @@ IGL_INLINE bool igl::min_quad_with_fixed_precompute( return false; } nc = data.AeqTQR.rank(); - assert(nc<=neq && + assert(nc<=neq && "Rank of reduced constraints should be <= #original constraints"); data.Aeq_li = nc == neq; //cout<<"data.Aeq_li: "<::QR_LLT); PlainObjectBase eff_Beq; // Adjust Aeq rhs to include known parts - eff_Beq = + eff_Beq = //data.AeqTQR.colsPermutation().transpose() * (-data.Aeqk * Y + Beq); data.AeqTET * (-data.Aeqk * Y + Beq); // Where did this -0.5 come from? Probably the same place as above. @@ -571,5 +571,8 @@ template bool igl::min_quad_with_fixed_solve >(Eigen::SparseMatrix const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix const&, bool, igl::min_quad_with_fixed_data&); template bool igl::min_quad_with_fixed_solve, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(igl::min_quad_with_fixed_data const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template bool igl::min_quad_with_fixed_solve, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(igl::min_quad_with_fixed_data const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, 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_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 >&); #endif - diff --git a/include/igl/normal_derivative.cpp b/include/igl/normal_derivative.cpp index d10700e60..ab5a8e1ca 100644 --- a/include/igl/normal_derivative.cpp +++ b/include/igl/normal_derivative.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 "normal_derivative.h" #include "cotmatrix_entries.h" @@ -11,8 +11,8 @@ #include template < - typename DerivedV, - typename DerivedEle, + typename DerivedV, + typename DerivedEle, typename Scalar> IGL_INLINE void igl::normal_derivative( const Eigen::PlainObjectBase & V, @@ -21,7 +21,7 @@ IGL_INLINE void igl::normal_derivative( { using namespace Eigen; using namespace std; - // Element simplex-size + // Element simplex-size const size_t ss = Ele.cols(); assert( ((ss==3) || (ss==4)) && "Only triangles or tets"); // cotangents @@ -39,7 +39,7 @@ IGL_INLINE void igl::normal_derivative( return; case 4: { - const MatrixXi DDJ = + const MatrixXi DDJ = slice( Ele, (VectorXi(24)<< @@ -54,9 +54,9 @@ IGL_INLINE void igl::normal_derivative( DDI.col(f*6+r) = I; } } - const DiagonalMatrix S = + const DiagonalMatrix S = (Matrix(1,-1).template replicate<12,1>()).asDiagonal(); - Matrix DDV = + Matrix DDV = slice( C, (VectorXi(24)<< @@ -78,7 +78,7 @@ IGL_INLINE void igl::normal_derivative( } case 3: { - const MatrixXi DDJ = + const MatrixXi DDJ = slice(Ele,(VectorXi(12)<<2,0,1,0,0,1,2,1,1,2,0,2).finished(),2); MatrixXi DDI(m,12); for(size_t f = 0;f<3;f++) @@ -89,9 +89,9 @@ IGL_INLINE void igl::normal_derivative( DDI.col(f*4+r) = I; } } - const DiagonalMatrix S = + const DiagonalMatrix S = (Matrix(1,-1).template replicate<6,1>()).asDiagonal(); - Matrix DDV = + Matrix DDV = slice(C,(VectorXi(12)<<1,1,2,2,2,2,0,0,0,0,1,1).finished(),2); DDV *= S; @@ -111,3 +111,7 @@ IGL_INLINE void igl::normal_derivative( } +#ifdef IGL_STATIC_LIBRARY +// Explicit template specialization +template void igl::normal_derivative, Eigen::Matrix, double>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::SparseMatrix&); +#endif diff --git a/include/igl/on_boundary.cpp b/include/igl/on_boundary.cpp index abc7aae87..b00b3220a 100644 --- a/include/igl/on_boundary.cpp +++ b/include/igl/on_boundary.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 "on_boundary.h" @@ -137,6 +137,5 @@ IGL_INLINE void igl::on_boundary( #ifdef IGL_STATIC_LIBRARY // Explicit template specialization template void igl::on_boundary, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::on_boundary, Eigen::Array, Eigen::Array >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif - - diff --git a/include/igl/slice.cpp b/include/igl/slice.cpp index a3f97290f..0bb12b490 100644 --- a/include/igl/slice.cpp +++ b/include/igl/slice.cpp @@ -80,7 +80,7 @@ IGL_INLINE void igl::slice( // handled here (although it's not clear if there is a performance gain when // the #removals >> #remains). If this is sufficiently faster than the // correct code above, one could test whether all entries in R and C are - // unique and apply the permutation version if appropriate. + // unique and apply the permutation version if appropriate. // int xm = X.rows(); @@ -249,4 +249,12 @@ template Eigen::PlainObjectBase > igl::sl template Eigen::PlainObjectBase > igl::slice >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, int); template Eigen::PlainObjectBase > igl::slice >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, int); template Eigen::PlainObjectBase > igl::slice >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, int); +template void igl::slice, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, Eigen::PlainObjectBase >&); +template void igl::slice, Eigen::SparseMatrix >(Eigen::SparseMatrix const&, Eigen::Matrix const&, int, Eigen::SparseMatrix&); +template void igl::slice, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, Eigen::PlainObjectBase >&); +template void igl::slice, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, Eigen::PlainObjectBase >&); +template void igl::slice, std::complex >(Eigen::SparseMatrix, 0, int> const&, Eigen::Matrix const&, Eigen::Matrix const&, Eigen::SparseMatrix, 0, int>&); +template void igl::slice >, Eigen::PlainObjectBase > >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, int, Eigen::PlainObjectBase >&); +template void igl::slice, Eigen::Matrix >(Eigen::Matrix const&, Eigen::Matrix const&, int, Eigen::Matrix&); +template Eigen::PlainObjectBase > igl::slice >(Eigen::PlainObjectBase > const&, Eigen::Matrix const&, int); #endif diff --git a/include/igl/snap_to_canonical_view_quat.cpp b/include/igl/snap_to_canonical_view_quat.cpp index f8f84ebd0..3d801a6b5 100644 --- a/include/igl/snap_to_canonical_view_quat.cpp +++ b/include/igl/snap_to_canonical_view_quat.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 "snap_to_canonical_view_quat.h" @@ -36,7 +36,7 @@ IGL_INLINE bool igl::snap_to_canonical_view_quat( // Normalize input quaternion Q_type qn[4]; - bool valid_len = + bool valid_len = igl::normalize_quat(q,qn); // If normalizing valid then don't bother if(!valid_len) @@ -59,7 +59,7 @@ IGL_INLINE bool igl::snap_to_canonical_view_quat( for(int j = 0;j<4;j++) { // Double cast because of bug in llvm version 4.2 with -O3 - distance += + distance += (qn[j]-sign*igl::CANONICAL_VIEW_QUAT(i,j))* (qn[j]-sign*igl::CANONICAL_VIEW_QUAT(i,j)); } @@ -102,7 +102,7 @@ IGL_INLINE bool igl::snap_to_canonical_view_quat( const double threshold, Eigen::Quaternion & s) { - return snap_to_canonical_view_quat( + return snap_to_canonical_view_quat( q.coeffs().data(),threshold,s.coeffs().data()); } @@ -112,5 +112,5 @@ IGL_INLINE bool igl::snap_to_canonical_view_quat( template bool igl::snap_to_canonical_view_quat(const double*, double, double*); // generated by autoexplicit.sh template bool igl::snap_to_canonical_view_quat(const float*, float, float*); +template bool igl::snap_to_canonical_view_quat(Eigen::Quaternion const&, double, Eigen::Quaternion&); #endif - diff --git a/include/igl/trackball.cpp b/include/igl/trackball.cpp index 00c8dbd29..e30385063 100644 --- a/include/igl/trackball.cpp +++ b/include/igl/trackball.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 "trackball.h" @@ -52,9 +52,9 @@ IGL_INLINE void igl::trackball( { assert(speed_factor > 0); - double original_x = + double original_x = _QuatIX(speed_factor*(down_mouse_x-w/2)+w/2, w, h); - double original_y = + double original_y = _QuatIY(speed_factor*(down_mouse_y-h/2)+h/2, w, h); double x = _QuatIX(speed_factor*(mouse_x-w/2)+w/2, w, h); @@ -163,4 +163,5 @@ IGL_INLINE void igl::trackball( template void igl::trackball(double, double, double, double const*, double, double, double, double, double*); // generated by autoexplicit.sh template void igl::trackball(double, double, float, float const*, double, double, double, double, float*); +template void igl::trackball(double, double, double, Eigen::Quaternion const&, double, double, double, double, Eigen::Quaternion&); #endif diff --git a/include/igl/two_axis_valuator_fixed_up.cpp b/include/igl/two_axis_valuator_fixed_up.cpp index 3645980c0..9c19325b4 100644 --- a/include/igl/two_axis_valuator_fixed_up.cpp +++ b/include/igl/two_axis_valuator_fixed_up.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 "two_axis_valuator_fixed_up.h" #include "PI.h" @@ -22,7 +22,7 @@ IGL_INLINE void igl::two_axis_valuator_fixed_up( { using namespace Eigen; Matrix axis(0,1,0); - quat = down_quat * + quat = down_quat * Quaternion( AngleAxis( PI*((Scalarquat)(mouse_x-down_x))/(Scalarquat)w*speed/2.0, @@ -32,7 +32,7 @@ IGL_INLINE void igl::two_axis_valuator_fixed_up( Matrix axis(1,0,0); if(axis.norm() != 0) { - quat = + quat = Quaternion( AngleAxis( PI*(mouse_y-down_y)/(Scalarquat)h*speed/2.0, @@ -42,3 +42,9 @@ IGL_INLINE void igl::two_axis_valuator_fixed_up( } } +#ifdef IGL_STATIC_LIBRARY +// Explicit template specialization + +template void igl::two_axis_valuator_fixed_up(int, int, double, Eigen::Quaternion const&, int, int, int, int, Eigen::Quaternion&); + +#endif diff --git a/tutorial/106_ViewerMenu/main.cpp b/tutorial/106_ViewerMenu/main.cpp index d9988a3f6..bb0df0283 100755 --- a/tutorial/106_ViewerMenu/main.cpp +++ b/tutorial/106_ViewerMenu/main.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include Eigen::MatrixXd V; Eigen::MatrixXi F; @@ -32,7 +34,7 @@ int main(int argc, char *argv[]) },"bool",true); // Add a button - viewer.ngui->addButton("Print Hello",[](){ cout << "Hello\n"; }); + viewer.ngui->addButton("Print Hello",[](){ std::cout << "Hello\n"; }); // Add an additional bar viewer.ngui->addNewWindow(Eigen::Vector2i(220,10),"New Window"); diff --git a/tutorial/306_EigenDecomposition/main.cpp b/tutorial/306_EigenDecomposition/main.cpp index b77d78ba8..d148c1f33 100644 --- a/tutorial/306_EigenDecomposition/main.cpp +++ b/tutorial/306_EigenDecomposition/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -40,13 +41,13 @@ int main(int argc, char * argv[]) { switch(key) { - default: + default: return false; case ' ': { U = U.rightCols(k).eval(); // Rescale eigen vectors for visualization - VectorXd Z = + VectorXd Z = bbd*0.5*U.col(c); Eigen::MatrixXd C; igl::parula(U.col(c).eval(),false,C); diff --git a/tutorial/609_Boolean/main.cpp b/tutorial/609_Boolean/main.cpp index a0de657c7..41fa9be05 100755 --- a/tutorial/609_Boolean/main.cpp +++ b/tutorial/609_Boolean/main.cpp @@ -1,5 +1,6 @@ #include #define IGL_NO_CORK +#undef IGL_STATIC_LIBRARY #include #include @@ -12,7 +13,7 @@ Eigen::MatrixXi FA,FB,FC; igl::boolean::MeshBooleanType boolean_type( igl::boolean::MESH_BOOLEAN_TYPE_UNION); -const char * MESH_BOOLEAN_TYPE_NAMES[] = +const char * MESH_BOOLEAN_TYPE_NAMES[] = { "Union", "Intersect", @@ -47,12 +48,12 @@ bool key_down(igl::viewer::Viewer &viewer, unsigned char key, int mods) default: return false; case '.': - boolean_type = + boolean_type = static_cast( (boolean_type+1)% igl::boolean::NUM_MESH_BOOLEAN_TYPES); break; case ',': - boolean_type = + boolean_type = static_cast( (boolean_type+igl::boolean::NUM_MESH_BOOLEAN_TYPES-1)% igl::boolean::NUM_MESH_BOOLEAN_TYPES);