diff --git a/include/igl/barycenter.h b/include/igl/barycenter.h index 1ef908d80..b5743408c 100644 --- a/include/igl/barycenter.h +++ b/include/igl/barycenter.h @@ -11,17 +11,14 @@ #include namespace igl { - // BARYCENTER - // - // B = barycenter(V,F) - // - // Compute the barycenter of every simplex + // Computes the barycenter of every simplex // // Inputs: - // V #V x dim matrix of vertex coordinates - // F #F x simplex_size matrix of indices of simplex corners + // V #V x dim matrix of vertex coordinates + // F #F x simplex_size matrix of indices of simplex corners into V // Output: - // BC a #F x dim matrix of 3d vertices + // BC #F x dim matrix of 3d vertices + // template < typename DerivedV, typename DerivedF, diff --git a/include/igl/boolean/mesh_boolean.cpp b/include/igl/boolean/mesh_boolean.cpp index 79b10366f..9e079745e 100644 --- a/include/igl/boolean/mesh_boolean.cpp +++ b/include/igl/boolean/mesh_boolean.cpp @@ -8,15 +8,17 @@ // obtain one at http://mozilla.org/MPL/2.0/. // #include "mesh_boolean.h" -#include -#include -#include -#include -#include +#include "BinaryWindingNumberOperations.h" +#include "../cgal/assign_scalar.h" +#include "../cgal/propagate_winding_numbers.h" +#include "../cgal/remesh_self_intersections.h" +#include "../remove_unreferenced.h" +#include "../unique_simplices.h" +#include "../slice.h" #include +#include -#include "BinaryWindingNumberOperations.h" namespace igl { namespace boolean { @@ -366,4 +368,11 @@ IGL_INLINE void igl::boolean::mesh_boolean( #ifdef IGL_STATIC_LIBRARY // Explicit template specialization template void igl::boolean::mesh_boolean, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::boolean::MeshBooleanType const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::boolean::mesh_boolean, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, igl::boolean::MeshBooleanType const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::boolean::mesh_boolean, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::boolean::MeshBooleanType const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +#undef IGL_STATIC_LIBRARY +#include "../remove_unreferenced.cpp" +template void igl::remove_unreferenced, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +#include "../slice.cpp" +template void igl::slice, -1, 3, 0, -1, 3> >, Eigen::Matrix, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, int, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&); #endif diff --git a/include/igl/cgal/closest_facet.cpp b/include/igl/cgal/closest_facet.cpp index c101a7d71..01fb91413 100644 --- a/include/igl/cgal/closest_facet.cpp +++ b/include/igl/cgal/closest_facet.cpp @@ -354,3 +354,7 @@ IGL_INLINE void igl::cgal::closest_facet( I.setLinSpaced(num_faces, 0, num_faces-1); igl::cgal::closest_facet(V, F, I, P, R, S); } + +#ifdef IGL_STATIC_LIBRARY +template void igl::cgal::closest_facet, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +#endif diff --git a/include/igl/cgal/complex_to_mesh.cpp b/include/igl/cgal/complex_to_mesh.cpp index d4ea42484..eace8f1db 100644 --- a/include/igl/cgal/complex_to_mesh.cpp +++ b/include/igl/cgal/complex_to_mesh.cpp @@ -140,8 +140,10 @@ IGL_INLINE bool igl::cgal::complex_to_mesh( } // CGAL code somehow can end up with unreferenced vertices - VectorXi _1; - remove_unreferenced( MatrixXd(V), MatrixXi(F), V,F,_1); + { + VectorXi _1; + remove_unreferenced( MatrixXd(V), MatrixXi(F), V,F,_1); + } return success; } diff --git a/include/igl/cgal/extract_cells.cpp b/include/igl/cgal/extract_cells.cpp index 4e5da6b63..0b7caec77 100644 --- a/include/igl/cgal/extract_cells.cpp +++ b/include/igl/cgal/extract_cells.cpp @@ -338,3 +338,8 @@ IGL_INLINE size_t igl::cgal::extract_cells( } return num_cells; } + +#ifdef IGL_STATIC_LIBRARY +#include +template unsigned long igl::cgal::extract_cells, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, unsigned long, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector >, std::__1::allocator > > > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +#endif diff --git a/include/igl/cgal/mesh_to_cgal_triangle_list.cpp b/include/igl/cgal/mesh_to_cgal_triangle_list.cpp index a7ef870a4..886ca3285 100644 --- a/include/igl/cgal/mesh_to_cgal_triangle_list.cpp +++ b/include/igl/cgal/mesh_to_cgal_triangle_list.cpp @@ -60,4 +60,6 @@ template void igl::cgal::mesh_to_cgal_triangle_list, Eigen::Matrix, CGAL::Epick>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::vector, std::allocator > >&); template void igl::cgal::mesh_to_cgal_triangle_list, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epeck>(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::vector, std::allocator > >&); template void igl::cgal::mesh_to_cgal_triangle_list, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epick>(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::vector, std::allocator > >&); +template void igl::cgal::mesh_to_cgal_triangle_list, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epick>(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > >&); +template void igl::cgal::mesh_to_cgal_triangle_list, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epeck>(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > >&); #endif diff --git a/include/igl/cgal/order_facets_around_edge.cpp b/include/igl/cgal/order_facets_around_edge.cpp index 32238d6fa..04513c68b 100644 --- a/include/igl/cgal/order_facets_around_edge.cpp +++ b/include/igl/cgal/order_facets_around_edge.cpp @@ -419,8 +419,8 @@ void igl::cgal::order_facets_around_edge( template void igl::cgal::order_facets_around_edge, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, unsigned long, unsigned long, std::vector > const&, Eigen::PlainObjectBase >&, bool); template void igl::cgal::order_facets_around_edge, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, unsigned long, unsigned long, std::vector > const&, Eigen::PlainObjectBase >&, bool); -template void igl::cgal::order_facets_around_edge, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, unsigned long, unsigned long, std::vector > const&, Eigen::PlainObjectBase >&); template void igl::cgal::order_facets_around_edge, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, unsigned long, unsigned long, std::vector > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase >&); template void igl::cgal::order_facets_around_edge, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, unsigned long, unsigned long, std::vector > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::cgal::order_facets_around_edge, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, unsigned long, unsigned long, std::vector > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +template void igl::cgal::order_facets_around_edge, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, unsigned long, unsigned long, std::__1::vector > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/cgal/outer_element.cpp b/include/igl/cgal/outer_element.cpp new file mode 100644 index 000000000..f06df0156 --- /dev/null +++ b/include/igl/cgal/outer_element.cpp @@ -0,0 +1,283 @@ +// This file is part of libigl, a simple c++ geometry processing library. +// +// Copyright (C) 2015 Qingnan Zhou +// +// 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 "outer_element.h" +#include +#include + +template < + typename DerivedV, + typename DerivedF, + typename DerivedI, + typename IndexType, + typename DerivedA + > +IGL_INLINE void igl::cgal::outer_vertex( + const Eigen::PlainObjectBase & V, + const Eigen::PlainObjectBase & F, + const Eigen::PlainObjectBase & I, + IndexType & v_index, + Eigen::PlainObjectBase & A) +{ + // Algorithm: + // Find an outer vertex (i.e. vertex reachable from infinity) + // Return the vertex with the largest X value. + // If there is a tie, pick the one with largest Y value. + // If there is still a tie, pick the one with the largest Z value. + // If there is still a tie, then there are duplicated vertices within the + // mesh, which violates the precondition. + typedef typename DerivedF::Scalar Index; + const Index INVALID = std::numeric_limits::max(); + const size_t num_selected_faces = I.rows(); + std::vector candidate_faces; + Index outer_vid = INVALID; + typename DerivedV::Scalar outer_val = 0; + for (size_t i=0; i outer_val) + { + outer_val = vx; + outer_vid = v; + candidate_faces = {f}; + } else if (v == outer_vid) + { + candidate_faces.push_back(f); + } else if (vx == outer_val) + { + // Break tie. + auto vy = V(v,1); + auto vz = V(v, 2); + auto outer_y = V(outer_vid, 1); + auto outer_z = V(outer_vid, 2); + assert(!(vy == outer_y && vz == outer_z)); + bool replace = (vy > outer_y) || + ((vy == outer_y) && (vz > outer_z)); + if (replace) + { + outer_val = vx; + outer_vid = v; + candidate_faces = {f}; + } + } + } + } + + assert(outer_vid != INVALID); + assert(candidate_faces.size() > 0); + v_index = outer_vid; + A.resize(candidate_faces.size()); + std::copy(candidate_faces.begin(), candidate_faces.end(), A.data()); +} + +template< + typename DerivedV, + typename DerivedF, + typename DerivedI, + typename IndexType, + typename DerivedA + > +IGL_INLINE void igl::cgal::outer_edge( + const Eigen::PlainObjectBase & V, + const Eigen::PlainObjectBase & F, + const Eigen::PlainObjectBase & I, + IndexType & v1, + IndexType & v2, + Eigen::PlainObjectBase & A) { + // Algorithm: + // Find an outer vertex first. + // Find the incident edge with largest abs slope when projected onto XY plane. + // If there is a tie, check the signed slope and use the positive one. + // If there is still a tie, break it using the projected slope onto ZX plane. + // If there is still a tie, again check the signed slope and use the positive one. + // If there is still a tie, then there are multiple overlapping edges, + // which violates the precondition. + typedef typename DerivedV::Scalar Scalar; + typedef typename DerivedV::Index Index; + typedef typename Eigen::Matrix ScalarArray3; + typedef typename Eigen::Matrix IndexArray3; + const Index INVALID = std::numeric_limits::max(); + + Index outer_vid; + Eigen::Matrix candidate_faces; + outer_vertex(V, F, I, outer_vid, candidate_faces); + const ScalarArray3& outer_v = V.row(outer_vid); + assert(candidate_faces.size() > 0); + + auto get_vertex_index = [&](const IndexArray3& f, Index vid) -> Index + { + if (f[0] == vid) return 0; + if (f[1] == vid) return 1; + if (f[2] == vid) return 2; + assert(false); + return -1; + }; + + auto unsigned_value = [](Scalar v) -> Scalar { + if (v < 0) return v * -1; + else return v; + }; + + Scalar outer_slope_YX = 0; + Scalar outer_slope_ZX = 0; + Index outer_opp_vid = INVALID; + bool infinite_slope_detected = false; + std::vector incident_faces; + auto check_and_update_outer_edge = [&](Index opp_vid, Index fid) { + if (opp_vid == outer_opp_vid) + { + incident_faces.push_back(fid); + return; + } + + const ScalarArray3 opp_v = V.row(opp_vid); + if (!infinite_slope_detected && outer_v[0] != opp_v[0]) + { + // Finite slope + const ScalarArray3 diff = opp_v - outer_v; + const Scalar slope_YX = diff[1] / diff[0]; + const Scalar slope_ZX = diff[2] / diff[0]; + const Scalar u_slope_YX = unsigned_value(slope_YX); + const Scalar u_slope_ZX = unsigned_value(slope_ZX); + bool update = false; + if (outer_opp_vid == INVALID) { + update = true; + } else { + const Scalar u_outer_slope_YX = unsigned_value(outer_slope_YX); + if (u_slope_YX > u_outer_slope_YX) { + update = true; + } else if (u_slope_YX == u_outer_slope_YX && + slope_YX > outer_slope_YX) { + update = true; + } else if (slope_YX == outer_slope_YX) { + const Scalar u_outer_slope_ZX = + unsigned_value(outer_slope_ZX); + if (u_slope_ZX > u_outer_slope_ZX) { + update = true; + } else if (u_slope_ZX == u_outer_slope_ZX && + slope_ZX > outer_slope_ZX) { + update = true; + } else if (slope_ZX == u_outer_slope_ZX) { + assert(false); + } + } + } + + if (update) { + outer_opp_vid = opp_vid; + outer_slope_YX = slope_YX; + outer_slope_ZX = slope_ZX; + incident_faces = {fid}; + } + } else if (!infinite_slope_detected) + { + // Infinite slope + outer_opp_vid = opp_vid; + infinite_slope_detected = true; + incident_faces = {fid}; + } + }; + + const size_t num_candidate_faces = candidate_faces.size(); + for (size_t i=0; i +IGL_INLINE void igl::cgal::outer_facet( + const Eigen::PlainObjectBase & V, + const Eigen::PlainObjectBase & F, + const Eigen::PlainObjectBase & N, + const Eigen::PlainObjectBase & I, + IndexType & f, + bool & flipped) { + // Algorithm: + // Find an outer edge. + // Find the incident facet with the largest absolute X normal component. + // If there is a tie, keep the one with positive X component. + // If there is still a tie, pick the face with the larger signed index + // (flipped face has negative index). + typedef typename DerivedV::Scalar Scalar; + typedef typename DerivedV::Index Index; + const size_t INVALID = std::numeric_limits::max(); + + Index v1,v2; + Eigen::Matrix incident_faces; + outer_edge(V, F, I, v1, v2, incident_faces); + assert(incident_faces.size() > 0); + + auto generic_fabs = [&](const Scalar& val) -> const Scalar { + if (val >= 0) return val; + else return -val; + }; + + Scalar max_nx = 0; + size_t outer_fid = INVALID; + const size_t num_incident_faces = incident_faces.size(); + for (size_t i=0; i generic_fabs(max_nx)) { + max_nx = nx; + outer_fid = fid; + } else if (nx == -max_nx && nx > 0) { + max_nx = nx; + outer_fid = fid; + } else if (nx == max_nx) { + if ((max_nx >= 0 && outer_fid < fid) || + (max_nx < 0 && outer_fid > fid)) { + max_nx = nx; + outer_fid = fid; + } + } + } + } + + assert(outer_fid != INVALID); + f = outer_fid; + flipped = max_nx < 0; +} + + +#ifdef IGL_STATIC_LIBRARY +// Explicit template specialization +#include +template void igl::cgal::outer_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int&, bool&); +template void igl::cgal::outer_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, unsigned long>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, unsigned long&, bool&); +template void igl::cgal::outer_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int&, bool&); +template void igl::cgal::outer_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int&, bool&); +template void igl::cgal::outer_edge, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, long, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, long&, long&, Eigen::PlainObjectBase >&); +template void igl::cgal::outer_edge, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, long, Eigen::Matrix >(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, long&, long&, Eigen::PlainObjectBase >&); +#endif diff --git a/include/igl/cgal/outer_element.h b/include/igl/cgal/outer_element.h new file mode 100644 index 000000000..6107cf482 --- /dev/null +++ b/include/igl/cgal/outer_element.h @@ -0,0 +1,112 @@ +// This file is part of libigl, a simple c++ geometry processing library. +// +// Copyright (C) 2015 Qingan Zhou +// +// 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/. +#ifndef IGL_CGAL_OUTER_ELEMENT_H +#define IGL_CGAL_OUTER_ELEMENT_H +#include "../igl_inline.h" +#include +namespace igl +{ + namespace cgal + { + // Find a vertex that is reachable from infinite without crossing any faces. + // Such vertex is called "outer vertex." + // + // Precondition: The input mesh must have all self-intersection resolved and + // no duplicated vertices. See cgal::remesh_self_intersections.h for how to + // obtain such input. + // + // Inputs: + // V #V by 3 list of vertex positions + // F #F by 3 list of triangle indices into V + // I #I list of facets to consider + // Outputs: + // v_index index of outer vertex + // A #A list of facets incident to the outer vertex + template < + typename DerivedV, + typename DerivedF, + typename DerivedI, + typename IndexType, + typename DerivedA + > + IGL_INLINE void outer_vertex( + const Eigen::PlainObjectBase & V, + const Eigen::PlainObjectBase & F, + const Eigen::PlainObjectBase & I, + IndexType & v_index, + Eigen::PlainObjectBase & A); + // Find an edge that is reachable from infinity without crossing any faces. + // Such edge is called "outer edge." + // + // Precondition: The input mesh must have all self-intersection resolved + // and no duplicated vertices. The correctness of the output depends on + // the fact that there is no edge overlap. See + // cgal::remesh_self_intersections.h for how to obtain such input. + // + // Inputs: + // V #V by 3 list of vertex positions + // F #F by 3 list of triangle indices into V + // I #I list of facets to consider + // Outputs: + // v1 index of the first end point of outer edge + // v2 index of the second end point of outer edge + // A #A list of facets incident to the outer edge + template< + typename DerivedV, + typename DerivedF, + typename DerivedI, + typename IndexType, + typename DerivedA + > + IGL_INLINE void outer_edge( + const Eigen::PlainObjectBase & V, + const Eigen::PlainObjectBase & F, + const Eigen::PlainObjectBase & I, + IndexType & v1, + IndexType & v2, + Eigen::PlainObjectBase & A); + + + // Find a facet that is reachable from infinity without crossing any faces. + // Such facet is called "outer facet." + // + // Precondition: The input mesh must have all self-intersection resolved. + // I.e there is no duplicated vertices, no overlapping edge and no + // intersecting faces (the only exception is there could be topologically + // duplicated faces). See cgal::remesh_self_intersections.h for how to + // obtain such input. + // + // Inputs: + // V #V by 3 list of vertex positions + // F #F by 3 list of triangle indices into V + // N #N by 3 list of face normals + // I #I list of facets to consider + // Outputs: + // f Index of the outer facet. + // flipped true iff the normal of f points inwards. + template< + typename DerivedV, + typename DerivedF, + typename DerivedN, + typename DerivedI, + typename IndexType + > + IGL_INLINE void outer_facet( + const Eigen::PlainObjectBase & V, + const Eigen::PlainObjectBase & F, + const Eigen::PlainObjectBase & N, + const Eigen::PlainObjectBase & I, + IndexType & f, + bool & flipped); + } +} + +#ifndef IGL_STATIC_LIBRARY +# include "outer_element.cpp" +#endif +#endif diff --git a/include/igl/cgal/outer_facet.cpp b/include/igl/cgal/outer_facet.cpp index 0e237dd4a..9b17e2bfc 100644 --- a/include/igl/cgal/outer_facet.cpp +++ b/include/igl/cgal/outer_facet.cpp @@ -7,7 +7,7 @@ // obtain one at http://mozilla.org/MPL/2.0/. #include "outer_facet.h" -#include "../outer_element.h" +#include "outer_element.h" #include "order_facets_around_edge.h" #include #include @@ -86,4 +86,6 @@ IGL_INLINE void igl::cgal::outer_facet( template void igl::cgal::outer_facet, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int&, bool&); template void igl::cgal::outer_facet, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int&, bool&); template void igl::cgal::outer_facet, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int&, bool&); +template void igl::cgal::outer_facet, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, unsigned long>(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, unsigned long&, bool&); +template void igl::cgal::outer_facet, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, int&, bool&); #endif diff --git a/include/igl/cgal/propagate_winding_numbers.cpp b/include/igl/cgal/propagate_winding_numbers.cpp index e28c6923b..c2b6118c8 100644 --- a/include/igl/cgal/propagate_winding_numbers.cpp +++ b/include/igl/cgal/propagate_winding_numbers.cpp @@ -255,3 +255,7 @@ IGL_INLINE void igl::cgal::propagate_winding_numbers( //} } + +#ifdef IGL_STATIC_LIBRARY +template void igl::cgal::propagate_winding_numbers, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); +#endif diff --git a/include/igl/cgal/remesh_intersections.cpp b/include/igl/cgal/remesh_intersections.cpp index 751539a03..5aa223336 100644 --- a/include/igl/cgal/remesh_intersections.cpp +++ b/include/igl/cgal/remesh_intersections.cpp @@ -7,6 +7,7 @@ // obtain one at http://mozilla.org/MPL/2.0/. // #include "remesh_intersections.h" +#include "assign_scalar.h" #include #include @@ -336,3 +337,26 @@ IGL_INLINE void igl::cgal::remesh_intersections( } } +#ifdef IGL_STATIC_LIBRARY +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, -1, 3, 0, -1, 3>, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epick, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_intersections, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector, std::__1::allocator > > const&, std::__1::map::Index, std::__1::pair::Index, std::__1::vector > >, std::__1::less::Index>, std::__1::allocator::Index const, std::__1::pair::Index, std::__1::vector > > > > > const&, std::__1::map::Index, Eigen::Matrix::Index>, std::__1::vector::Index, std::__1::allocator::Index> >, std::__1::less::Index, Eigen::Matrix::Index> >, std::__1::allocator::Index, Eigen::Matrix::Index> const, std::__1::vector::Index, std::__1::allocator::Index> > > > > const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +#endif + diff --git a/include/igl/cgal/remesh_self_intersections.cpp b/include/igl/cgal/remesh_self_intersections.cpp index b42bb3c23..fe37225b7 100644 --- a/include/igl/cgal/remesh_self_intersections.cpp +++ b/include/igl/cgal/remesh_self_intersections.cpp @@ -89,4 +89,7 @@ template void igl::cgal::remesh_self_intersections, Eigen::Matrix, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::cgal::RemeshSelfIntersectionsParam const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::cgal::remesh_self_intersections, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, igl::cgal::RemeshSelfIntersectionsParam const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::cgal::remesh_self_intersections, Eigen::Matrix, Eigen::Matrix, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::cgal::RemeshSelfIntersectionsParam const&, Eigen::PlainObjectBase, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_self_intersections, -1, 3, 0, -1, 3>, Eigen::Matrix, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase > const&, igl::cgal::RemeshSelfIntersectionsParam const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_self_intersections, Eigen::Matrix, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::cgal::RemeshSelfIntersectionsParam const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::cgal::remesh_self_intersections, Eigen::Matrix, Eigen::Matrix, -1, -1, 0, -1, -1>, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, igl::cgal::RemeshSelfIntersectionsParam const&, Eigen::PlainObjectBase, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/cgal/signed_distance_isosurface.cpp b/include/igl/cgal/signed_distance_isosurface.cpp index 417b06b4d..ef7ee81d9 100644 --- a/include/igl/cgal/signed_distance_isosurface.cpp +++ b/include/igl/cgal/signed_distance_isosurface.cpp @@ -16,7 +16,6 @@ #include "../centroid.h" #include "../WindingNumberAABB.h" #include "../matlab_format.h" -#include "../remove_unreferenced.h" #include #include diff --git a/include/igl/copyleft/marching_cubes.h b/include/igl/copyleft/marching_cubes.h index 1d9065b1d..9bb66b8f3 100644 --- a/include/igl/copyleft/marching_cubes.h +++ b/include/igl/copyleft/marching_cubes.h @@ -7,7 +7,7 @@ // obtain one at http://mozilla.org/MPL/2.0/. #ifndef IGL_COPYLEFT_MARCHINGCUBES_H #define IGL_COPYLEFT_MARCHINGCUBES_H -#include "igl_inline.h" +#include "../igl_inline.h" #include namespace igl diff --git a/include/igl/extract_manifold_patches.cpp b/include/igl/extract_manifold_patches.cpp index b1c81f2e7..64b1d3661 100644 --- a/include/igl/extract_manifold_patches.cpp +++ b/include/igl/extract_manifold_patches.cpp @@ -66,3 +66,7 @@ IGL_INLINE size_t igl::extract_manifold_patches( return num_patches; } + +#ifdef IGL_STATIC_LIBRARY +template unsigned long igl::extract_manifold_patches, Eigen::Matrix, unsigned long, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector >, std::__1::allocator > > > const&, Eigen::PlainObjectBase >&); +#endif diff --git a/include/igl/facet_components.cpp b/include/igl/facet_components.cpp index 6ad474c95..4c3285780 100644 --- a/include/igl/facet_components.cpp +++ b/include/igl/facet_components.cpp @@ -87,4 +87,5 @@ IGL_INLINE void igl::facet_components( #ifdef IGL_STATIC_LIBRARY // Explicit template specialization template void igl::facet_components, Eigen::Matrix >(std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::facet_components, Eigen::Matrix >(std::__1::vector >, std::__1::allocator > > >, std::__1::allocator >, std::__1::allocator > > > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/remove_unreferenced.cpp b/include/igl/remove_unreferenced.cpp index a811a6556..cc3addb80 100644 --- a/include/igl/remove_unreferenced.cpp +++ b/include/igl/remove_unreferenced.cpp @@ -102,4 +102,5 @@ IGL_INLINE void igl::remove_unreferenced( template void igl::remove_unreferenced, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::remove_unreferenced, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::remove_unreferenced, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::remove_unreferenced, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif diff --git a/include/igl/triangle_triangle_adjacency.cpp b/include/igl/triangle_triangle_adjacency.cpp index da70e5aa9..a59bc2eef 100644 --- a/include/igl/triangle_triangle_adjacency.cpp +++ b/include/igl/triangle_triangle_adjacency.cpp @@ -241,4 +241,5 @@ template void igl::triangle_triangle_adjacency, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::triangle_triangle_adjacency, Eigen::Matrix, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::triangle_triangle_adjacency, Eigen::Matrix, long, long, long>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::vector >, std::allocator > > > const&, bool, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&, std::vector >, std::allocator > > >, std::allocator >, std::allocator > > > > >&); +template void igl::triangle_triangle_adjacency, Eigen::Matrix, unsigned long, int, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase > const&, std::__1::vector >, std::__1::allocator > > > const&, bool, std::__1::vector >, std::__1::allocator > > >, std::__1::allocator >, std::__1::allocator > > > > >&, std::__1::vector >, std::__1::allocator > > >, std::__1::allocator >, std::__1::allocator > > > > >&); #endif diff --git a/include/igl/unique_edge_map.cpp b/include/igl/unique_edge_map.cpp index e2fc5367f..81243d69b 100644 --- a/include/igl/unique_edge_map.cpp +++ b/include/igl/unique_edge_map.cpp @@ -51,4 +51,5 @@ template void igl::unique_edge_map, Eigen: template void igl::unique_edge_map, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::vector >, std::allocator > > >&); template void igl::unique_edge_map, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, long>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::vector >, std::allocator > > >&); template void igl::unique_edge_map, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, int>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::vector >, std::allocator > > >&); +template void igl::unique_edge_map, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, unsigned long>(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, std::__1::vector >, std::__1::allocator > > >&); #endif diff --git a/tutorial/609_Boolean/main.cpp b/tutorial/609_Boolean/main.cpp index 39fe52bae..73e88c95b 100755 --- a/tutorial/609_Boolean/main.cpp +++ b/tutorial/609_Boolean/main.cpp @@ -26,7 +26,7 @@ const char * MESH_BOOLEAN_TYPE_NAMES[] = void update(igl::viewer::Viewer &viewer) { - igl::boolean::mesh_boolean(VA,FA,VB,FB,boolean_type,VC,FC,J,I); + igl::boolean::mesh_boolean(VA,FA,VB,FB,boolean_type,VC,FC,J); Eigen::MatrixXd C(FC.rows(),3); for(size_t f = 0;f +#include #include #include #include @@ -55,8 +55,8 @@ int main(int argc, char * argv[]) cout<<"Marching cubes..."<