libigl v2.5.0
|
Classes | |
class | BinaryWindingNumberOperations |
Binary winding number operations. More... | |
class | BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_INTERSECT > |
A ∩ B ∩ ... ∩ Z. More... | |
class | BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_MINUS > |
A \ B \ ... \ Z = A \ (B ∪ ... ∪ Z) More... | |
class | BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_RESOLVE > |
Resolve all intersections without removing non-coplanar faces. More... | |
class | BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_UNION > |
A ∪ B ∪ ... ∪ Z. More... | |
class | BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_XOR > |
A ∆ B ∆ ... ∆ Z (equivalent to set inside odd number of objects) More... | |
class | CSGTree |
Class for defining and computing a constructive solid geometry result out of a tree of boolean operations on "solid" triangle meshes. More... | |
struct | RemeshSelfIntersectionsParam |
Parameters for SelfIntersectMesh, remesh_self_intersections and remesh_intersections, and intersect_other. More... | |
class | SelfIntersectMesh |
Class for computing the self-intersections of a mesh. More... | |
class | WindingNumberFilter |
Filter winding numbers according to keep policy. More... | |
class | WindingNumberFilter< KEEP_ALL > |
Keep all policy. More... | |
class | WindingNumberFilter< KEEP_INSIDE > |
Keep inside policy. More... | |
Typedefs | |
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_UNION > | BinaryUnion |
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_INTERSECT > | BinaryIntersect |
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_MINUS > | BinaryMinus |
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_XOR > | BinaryXor |
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_RESOLVE > | BinaryResolve |
using | KeepInside = WindingNumberFilter< KEEP_INSIDE > |
using | KeepAll = WindingNumberFilter< KEEP_ALL > |
Enumerations | |
enum | KeeperType { KEEP_INSIDE , KEEP_ALL } |
Types of Keep policies. More... | |
enum | TrimWithSolidMethod { CHECK_EACH_FACE = 1 , CHECK_EACH_PATCH = 2 , RESOLVE_BOTH_AND_RESTORE_THEN_CHECK_EACH_PATCH = 3 } |
Functions | |
template<typename DerivedC , typename DerivedD > | |
void | assign (const Eigen::MatrixBase< DerivedC > &C, const bool slow_and_more_precise, Eigen::PlainObjectBase< DerivedD > &D) |
Vector version of assign_scalar. | |
template<typename DerivedC , typename DerivedD > | |
void | assign (const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedD > &D) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename ReturnScalar , typename DerivedC > | |
Eigen::Matrix< ReturnScalar, DerivedC::RowsAtCompileTime, DerivedC::ColsAtCompileTime, 1, DerivedC::MaxRowsAtCompileTime, DerivedC::MaxColsAtCompileTime > | assign (const Eigen::MatrixBase< DerivedC > &C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename RHS , typename LHS > | |
void | assign_scalar (const RHS &rhs, const bool &slow_and_more_precise, LHS &lhs) |
Conduct the casting copy: lhs = rhs using slow_and_more_precise rounding if more desired. | |
void | assign_scalar (const CGAL::Epeck::FT &cgal, CGAL::Epeck::FT &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Epeck::FT &cgal, double &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Epeck::FT &cgal, float &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const double &c, double &d) |
void | assign_scalar (const float &c, float &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const float &c, double &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT &cgal, CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT &cgal, double &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT &cgal, float &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Simple_cartesian< mpq_class >::FT &cgal, CGAL::Simple_cartesian< mpq_class >::FT &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Simple_cartesian< mpq_class >::FT &cgal, double &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | assign_scalar (const CGAL::Simple_cartesian< mpq_class >::FT &cgal, float &d) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedC > | |
void | cell_adjacency (const Eigen::PlainObjectBase< DerivedC > &per_patch_cells, const size_t num_cells, std::vector< std::set< std::tuple< typename DerivedC::Scalar, bool, size_t > > > &adjacency_list) |
Determine adjacency of cells. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename DerivedP , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename Kernel , typename DerivedR , typename DerivedS > | |
void | closest_facet (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedI > &I, const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DerivedEMAP > &EMAP, const Eigen::PlainObjectBase< DeriveduEC > &uEC, const Eigen::PlainObjectBase< DeriveduEE > &uEE, const std::vector< std::vector< size_t > > &VF, const std::vector< std::vector< size_t > > &VFi, const CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > &tree, const std::vector< typename Kernel::Triangle_3 > &triangles, const std::vector< bool > &in_I, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedS > &S) |
Determine the closest facet for each of the input points. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename DerivedP , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivedR , typename DerivedS > | |
void | closest_facet (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedI > &I, const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DerivedEMAP > &EMAP, const Eigen::PlainObjectBase< DeriveduEC > &uEC, const Eigen::PlainObjectBase< DeriveduEE > &uEE, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedS > &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivedR , typename DerivedS > | |
void | closest_facet (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DerivedEMAP > &EMAP, const Eigen::PlainObjectBase< DeriveduEC > &uEC, const Eigen::PlainObjectBase< DeriveduEE > &uEE, Eigen::PlainObjectBase< DerivedR > &R, Eigen::PlainObjectBase< DerivedS > &S) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Tr , typename DerivedV , typename DerivedF > | |
bool | complex_to_mesh (const CGAL::Complex_2_in_triangulation_3< Tr > &c2t3, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
Convert a CGAL::Complex_2_in_triangulation_3 to a mesh (V,F) | |
template<typename DerivedV , typename DerivedF , typename DerivedI > | |
bool | component_inside_component (const Eigen::PlainObjectBase< DerivedV > &V1, const Eigen::PlainObjectBase< DerivedF > &F1, const Eigen::PlainObjectBase< DerivedI > &I1, const Eigen::PlainObjectBase< DerivedV > &V2, const Eigen::PlainObjectBase< DerivedF > &F2, const Eigen::PlainObjectBase< DerivedI > &I2) |
Determine if connected facet component (V1, F1, I1) is inside of connected facet component (V2, F2, I2). | |
template<typename DerivedV , typename DerivedF > | |
bool | component_inside_component (const Eigen::PlainObjectBase< DerivedV > &V1, const Eigen::PlainObjectBase< DerivedF > &F1, const Eigen::PlainObjectBase< DerivedV > &V2, const Eigen::PlainObjectBase< DerivedF > &F2) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedW , typename DerivedG > | |
void | convex_hull (const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedW > &W, Eigen::PlainObjectBase< DerivedG > &G) |
Given a set of points (V), compute the convex hull as a triangle mesh (W,G) | |
template<typename DerivedV , typename DerivedF > | |
void | convex_hull (const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV > | |
bool | coplanar (const Eigen::MatrixBase< DerivedV > &V) |
Test whether all points are on same plane. | |
template<typename DerivedV , typename DerivedF > | |
void | delaunay_triangulation (const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
Given a set of points in 2D, return a Delaunay triangulation of these points. | |
template<typename DerivedV , typename DerivedF , typename DerivedP , typename DeriveduE , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivedC > | |
size_t | extract_cells (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DeriveduE > &uE, const Eigen::PlainObjectBase< DerivedEMAP > &EMAP, const Eigen::PlainObjectBase< DeriveduEC > &uEC, const Eigen::PlainObjectBase< DeriveduEE > &uEE, Eigen::PlainObjectBase< DerivedC > &cells) |
Extract connected 3D space partitioned by mesh (V, F). | |
template<typename DerivedV , typename DerivedF , typename DerivedC > | |
size_t | extract_cells (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &cells) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedP , typename DeriveduE , typename DeriveduEC , typename DeriveduEE , typename DerivedC > | |
int | extract_cells_single_component (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DeriveduE > &uE, const Eigen::PlainObjectBase< DeriveduEC > &uEC, const Eigen::PlainObjectBase< DeriveduEE > &uEE, Eigen::PlainObjectBase< DerivedC > &cells) |
Extract connected 3D space partitioned by mesh (V,F) composed of possibly multiple components (the name of this function is dubious). | |
template<typename DerivedV , typename DerivedF , typename Derivedfeature_edges > | |
void | extract_feature (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const double tol, Eigen::PlainObjectBase< Derivedfeature_edges > &feature_edges) |
Extract feature edges based on dihedral angle. | |
template<typename DerivedV , typename DerivedF , typename DeriveduE , typename Derivedfeature_edges > | |
void | extract_feature (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const double tol, const Eigen::PlainObjectBase< DeriveduE > &uE, const std::vector< std::vector< typename DeriveduE::Scalar > > &uE2E, Eigen::PlainObjectBase< Derivedfeature_edges > &feature_edges) |
template<typename DerivedP , typename DerivedN , typename DerivedQ , typename BetaType , typename DerivedWN > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedQ > &Q, const int expansion_order, const BetaType beta, Eigen::PlainObjectBase< DerivedWN > &WN) |
Evaluate the fast winding number for point data, without known areas. | |
template<typename DerivedP , typename DerivedN , typename DerivedQ , typename DerivedWN > | |
void | fast_winding_number (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedN > &N, const Eigen::MatrixBase< DerivedQ > &Q, Eigen::PlainObjectBase< DerivedWN > &WN) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV > | |
void | half_space_box (const CGAL::Plane_3< CGAL::Epeck > &P, const Eigen::MatrixBase< DerivedV > &V, Eigen::Matrix< CGAL::Epeck::FT, 8, 3 > &BV, Eigen::Matrix< int, 12, 3 > &BF) |
Construct a mesh of box (BV,BF) so that it contains the intersection of the half-space under the plane (P) and the bounding box of V, and does not contain any of the half-space above (P). | |
template<typename Derivedp , typename Derivedn , typename DerivedV > | |
void | half_space_box (const Eigen::MatrixBase< Derivedp > &p, const Eigen::MatrixBase< Derivedn > &n, const Eigen::MatrixBase< DerivedV > &V, Eigen::Matrix< CGAL::Epeck::FT, 8, 3 > &BV, Eigen::Matrix< int, 12, 3 > &BF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Derivedequ , typename DerivedV > | |
void | half_space_box (const Eigen::MatrixBase< Derivedequ > &equ, const Eigen::MatrixBase< DerivedV > &V, Eigen::Matrix< CGAL::Epeck::FT, 8, 3 > &BV, Eigen::Matrix< int, 12, 3 > &BF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename Kernel , typename Scalar > | |
void | hausdorff (const Eigen::MatrixBase< DerivedV > &V, const CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< CGAL::Triangle_3< Kernel > >::iterator > > > &treeB, const std::vector< CGAL::Triangle_3< Kernel > > &TB, Scalar &l, Scalar &u) |
Compute lower and upper bounds (l,u) on the Hausdorff distance between a triangle (V) and a pointset (e.g., mesh, triangle soup) given by a distance function handle (dist_to_B). | |
template<typename Scalar > | |
short | incircle (const Scalar *pa, const Scalar *pb, const Scalar *pc, const Scalar *pd) |
Test whether point is in a given circle. | |
template<typename Kernel > | |
void | insert_into_cdt (const CGAL::Object &obj, const CGAL::Plane_3< Kernel > &P, CGAL::Constrained_triangulation_plus_2< CGAL::Constrained_Delaunay_triangulation_2< Kernel, CGAL::Triangulation_data_structure_2< CGAL::Triangulation_vertex_base_2< Kernel >, CGAL::Constrained_triangulation_face_base_2< Kernel > >, CGAL::Exact_intersections_tag > > &cdt) |
Given a current 2D constrained Delaunay triangulation (cdt), insert a 3D "object" (e.g., resulting from intersecting two triangles) into the cdt, by projecting it via the given plane (P) and adding appropriate constraints. | |
template<typename Scalar > | |
short | insphere (const Scalar pa[3], const Scalar pb[3], const Scalar pc[3], const Scalar pd[3], const Scalar pe[3]) |
Test whether point is in a given sphere. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedIF , typename DerivedVVAB , typename DerivedFFAB , typename DerivedJAB , typename DerivedIMAB > | |
bool | intersect_other (const Eigen::PlainObjectBase< DerivedVA > &VA, const Eigen::PlainObjectBase< DerivedFA > &FA, const Eigen::PlainObjectBase< DerivedVB > &VB, const Eigen::PlainObjectBase< DerivedFB > &FB, const RemeshSelfIntersectionsParam ¶ms, Eigen::PlainObjectBase< DerivedIF > &IF, Eigen::PlainObjectBase< DerivedVVAB > &VVAB, Eigen::PlainObjectBase< DerivedFFAB > &FFAB, Eigen::PlainObjectBase< DerivedJAB > &JAB, Eigen::PlainObjectBase< DerivedIMAB > &IMAB) |
Given a triangle mesh (VA,FA) and another mesh (VB,FB) find all pairs of intersecting faces. | |
bool | intersect_other (const Eigen::MatrixXd &VA, const Eigen::MatrixXi &FA, const Eigen::MatrixXd &VB, const Eigen::MatrixXi &FB, const bool first_only, Eigen::MatrixXi &IF) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename Derivedp , typename Derivedn , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | intersect_with_half_space (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedp > &p, const Eigen::MatrixBase< Derivedn > &n, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
Intersect a PWN mesh with a half-space. | |
template<typename DerivedV , typename DerivedF , typename Derivedequ , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | intersect_with_half_space (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< Derivedequ > &equ, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | intersect_with_half_space (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const CGAL::Plane_3< CGAL::Epeck > &P, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedP , typename DerivedF > | |
void | lexicographic_triangulation (const Eigen::PlainObjectBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedF > &F) |
Given a set of points in 2D, return a lexicographic triangulation of these points. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | mesh_boolean (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::MatrixBase< DerivedVB > &VB, const Eigen::MatrixBase< DerivedFB > &FB, const MeshBooleanType &type, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
Compute Boolean csg operations on "solid", consistently oriented meshes. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | mesh_boolean (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::MatrixBase< DerivedVB > &VB, const Eigen::MatrixBase< DerivedFB > &FB, const std::string &type_str, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | mesh_boolean (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::MatrixBase< DerivedVB > &VB, const Eigen::MatrixBase< DerivedFB > &FB, const std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > &wind_num_op, const std::function< int(const int, const int)> &keep, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | mesh_boolean (const std::vector< DerivedV > &Vlist, const std::vector< DerivedF > &Flist, const std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > &wind_num_op, const std::function< int(const int, const int)> &keep, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
Variadic mesh Boolean operations. | |
template<typename DerivedV , typename DerivedF , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | mesh_boolean (const std::vector< DerivedV > &Vlist, const std::vector< DerivedF > &Flist, const MeshBooleanType &type, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedVV , typename DerivedFF , typename Derivedsizes , typename DerivedVC , typename DerivedFC , typename DerivedJ > | |
bool | mesh_boolean (const Eigen::MatrixBase< DerivedVV > &VV, const Eigen::MatrixBase< DerivedFF > &FF, const Eigen::MatrixBase< Derivedsizes > &sizes, const std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > &wind_num_op, const std::function< int(const int, const int)> &keep, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC > | |
bool | mesh_boolean (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::MatrixBase< DerivedVB > &VB, const Eigen::MatrixBase< DerivedFB > &FB, const MeshBooleanType &type, Eigen::PlainObjectBase< DerivedVC > &VC, Eigen::PlainObjectBase< DerivedFC > &FC) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | mesh_boolean_type_to_funcs (const MeshBooleanType &type, std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > &wind_num_op, std::function< int(const int, const int)> &keep) |
Convert a MeshBooleanType enum to a pair of winding number conversion function and "keep" function used by mesh_boolean. | |
template<typename DerivedV , typename DerivedF , typename Kernel > | |
void | mesh_to_cgal_triangle_list (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, std::vector< CGAL::Triangle_3< Kernel > > &T) |
Convert a mesh (V,F) to a list of CGAL triangles. | |
template<typename DerivedV , typename DerivedF , typename Polyhedron > | |
bool | mesh_to_polyhedron (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, Polyhedron &poly) |
Convert a mesh (V,F) to a CGAL Polyhedron. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedW , typename DerivedG , typename DerivedJ > | |
void | minkowski_sum (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::MatrixBase< DerivedVB > &VB, const Eigen::MatrixBase< DerivedFB > &FB, const bool resolve_overlaps, Eigen::PlainObjectBase< DerivedW > &W, Eigen::PlainObjectBase< DerivedG > &G, Eigen::PlainObjectBase< DerivedJ > &J) |
Compute the Minkowski sum of a closed triangle mesh (V,F) and a set of simplices in 3D. | |
template<typename DerivedVA , typename DerivedFA , typename sType , int sCols, int sOptions, typename dType , int dCols, int dOptions, typename DerivedW , typename DerivedG , typename DerivedJ > | |
void | minkowski_sum (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::Matrix< sType, 1, sCols, sOptions > &s, const Eigen::Matrix< dType, 1, dCols, dOptions > &d, const bool resolve_overlaps, Eigen::PlainObjectBase< DerivedW > &W, Eigen::PlainObjectBase< DerivedG > &G, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedVA , typename DerivedFA , typename sType , int sCols, int sOptions, typename dType , int dCols, int dOptions, typename DerivedW , typename DerivedG , typename DerivedJ > | |
void | minkowski_sum (const Eigen::MatrixBase< DerivedVA > &VA, const Eigen::MatrixBase< DerivedFA > &FA, const Eigen::Matrix< sType, 1, sCols, sOptions > &s, const Eigen::Matrix< dType, 1, dCols, dOptions > &d, Eigen::PlainObjectBase< DerivedW > &W, Eigen::PlainObjectBase< DerivedG > &G, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedI > | |
void | order_facets_around_edge (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, size_t s, size_t d, const std::vector< int > &adj_faces, Eigen::PlainObjectBase< DerivedI > &order, bool debug=false) |
Given a directed edge, sort its adjacent faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedI > | |
void | order_facets_around_edge (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, size_t s, size_t d, const std::vector< int > &adj_faces, const Eigen::PlainObjectBase< DerivedV > &pivot_point, Eigen::PlainObjectBase< DerivedI > &order) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DeriveduE , typename uE2EType , typename uE2oEType , typename uE2CType > | |
std::enable_if<!std::is_same< typenameDerivedV::Scalar, typenameCGAL::Exact_predicates_exact_constructions_kernel::FT >::value, void >::type | order_facets_around_edges (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedN > &N, const Eigen::PlainObjectBase< DeriveduE > &uE, const std::vector< std::vector< uE2EType > > &uE2E, std::vector< std::vector< uE2oEType > > &uE2oE, std::vector< std::vector< uE2CType > > &uE2C) |
For each undirected edge, sort its adjacent faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DeriveduE , typename uE2EType , typename uE2oEType , typename uE2CType > | |
std::enable_if< std::is_same< typenameDerivedV::Scalar, typenameCGAL::Exact_predicates_exact_constructions_kernel::FT >::value, void >::type | order_facets_around_edges (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedN > &N, const Eigen::PlainObjectBase< DeriveduE > &uE, const std::vector< std::vector< uE2EType > > &uE2E, std::vector< std::vector< uE2oEType > > &uE2oE, std::vector< std::vector< uE2CType > > &uE2C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DeriveduE , typename uE2EType , typename uE2oEType , typename uE2CType > | |
void | order_facets_around_edges (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DeriveduE > &uE, const std::vector< std::vector< uE2EType > > &uE2E, std::vector< std::vector< uE2oEType > > &uE2oE, std::vector< std::vector< uE2CType > > &uE2C) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Scalar > | |
short | orient2D (const Scalar *pa, const Scalar *pb, const Scalar *pc) |
Tests whether a point is above, on, or below a line. | |
template<typename Scalar > | |
short | orient3D (const Scalar pa[3], const Scalar pb[3], const Scalar pc[3], const Scalar pd[3]) |
Tests whether a point is above, on, or below a plane. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType , typename DerivedA > | |
void | outer_edge (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedI > &I, IndexType &v1, IndexType &v2, Eigen::PlainObjectBase< DerivedA > &A) |
Find an edge that is reachable from infinity without crossing any faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedI , typename IndexType > | |
void | outer_facet (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedN > &N, const Eigen::PlainObjectBase< DerivedI > &I, IndexType &f, bool &flipped) |
Find a facet that is reachable from infinity without crossing any faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType > | |
void | outer_facet (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedI > &I, IndexType &f, bool &flipped) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedF , typename DerivedHV , typename DerivedHF , typename DerivedJ , typename Derivedflip > | |
void | outer_hull (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedHV > &HV, Eigen::PlainObjectBase< DerivedHF > &HF, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< Derivedflip > &flip) |
Compute the "outer hull" of a piecewise constant winding number induce triangle mesh (V,F). | |
template<typename DerivedV , typename DerivedF , typename DerivedG , typename DerivedJ , typename Derivedflip > | |
void | outer_hull_legacy (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedG > &G, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< Derivedflip > &flip) |
Compute the "outer hull" of a potentially non-manifold mesh (V,F) whose intersections have been "resolved" (e.g. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType , typename DerivedA > | |
void | outer_vertex (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedI > &I, IndexType &v_index, Eigen::PlainObjectBase< DerivedA > &A) |
Find a vertex that is reachable from infinite without crossing any faces. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename Derivedflip > | |
size_t | peel_outer_hull_layers (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< Derivedflip > &flip) |
Computes necessary generic information for boolean operations by successively "peeling" off the "outer hull" of a mesh (V,F) resulting from "resolving" all (self-)intersections. | |
template<typename DerivedV , typename DerivedF , typename DerivedW > | |
size_t | peel_winding_number_layers (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedW > &W) |
Peel Winding number layers from a mesh. | |
template<typename DerivedV , typename DerivedF > | |
bool | piecewise_constant_winding_number (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F) |
Determine if a given mesh induces a piecewise constant winding number field: Is this mesh valid input to solid set operations. | |
template<typename DerivedP , typename DerivedI , typename DerivedN , typename DerivedA , typename DerivedT > | |
void | point_areas (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedA > &A, Eigen::PlainObjectBase< DerivedT > &T) |
Given a 3D set of points P, each with a list of k-nearest-neighbours, estimate the geodesic voronoi area associated with each point. | |
template<typename DerivedP , typename DerivedI , typename DerivedN , typename DerivedA > | |
void | point_areas (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedI > &I, const Eigen::MatrixBase< DerivedN > &N, Eigen::PlainObjectBase< DerivedA > &A) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Kernel , typename DerivedP , typename DerivedV , typename DerivedF , typename DerivedsqrD , typename DerivedI , typename DerivedC > | |
void | point_mesh_squared_distance (const Eigen::PlainObjectBase< DerivedP > &P, const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedsqrD > &sqrD, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C) |
Compute distances from a set of points P to a triangle mesh (V,F) | |
template<typename Kernel , typename DerivedV , typename DerivedF > | |
void | point_mesh_squared_distance_precompute (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< CGAL::Triangle_3< Kernel > >::iterator > > > &tree, std::vector< CGAL::Triangle_3< Kernel > > &T) |
precomputation for point_mesh_squared_distance | |
template<typename Kernel , typename DerivedP , typename DerivedsqrD , typename DerivedI , typename DerivedC > | |
void | point_mesh_squared_distance (const Eigen::PlainObjectBase< DerivedP > &P, const CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< CGAL::Triangle_3< Kernel > >::iterator > > > &tree, const std::vector< CGAL::Triangle_3< Kernel > > &T, Eigen::PlainObjectBase< DerivedsqrD > &sqrD, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedC > &C) |
Compute distances from a set of points P to a triangle mesh (V,F) using precomputed trees. | |
template<typename Kernel > | |
void | point_segment_squared_distance (const CGAL::Point_3< Kernel > &P1, const CGAL::Segment_3< Kernel > &S2, CGAL::Point_3< Kernel > &P2, typename Kernel::FT &d) |
Given a point P1 and segment S2 find the points on each of closest approach and the squared distance thereof. | |
template<typename DerivedQ , typename DerivedVB , typename DerivedFB , typename DerivedD > | |
void | point_solid_signed_squared_distance (const Eigen::PlainObjectBase< DerivedQ > &Q, const Eigen::PlainObjectBase< DerivedVB > &VB, const Eigen::PlainObjectBase< DerivedFB > &FB, Eigen::PlainObjectBase< DerivedD > &D) |
Given a set of points (Q) and the boundary mesh (VB,FB) of a solid (as defined in [Zhou et al. | |
template<typename Kernel > | |
void | point_triangle_squared_distance (const CGAL::Point_3< Kernel > &P1, const CGAL::Triangle_3< Kernel > &T2, CGAL::Point_3< Kernel > &P2, typename Kernel::FT &d) |
Given a point P1 and triangle T2 find the points on each of closest approach and the squared distance thereof. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename DerivedP , typename DerivedB > | |
void | points_inside_component (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedI > &I, const Eigen::PlainObjectBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedB > &inside) |
Determine if queries points P are inside of connected facet component (V, F, I), where I indicates a subset of facets that forms the component. | |
template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedB > | |
void | points_inside_component (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedB > &inside) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Polyhedron , typename DerivedV , typename DerivedF > | |
void | polyhedron_to_mesh (const Polyhedron &poly, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
Convert a CGAL Polyhedron to a mesh (V,F) | |
template<typename Kernel , typename Index > | |
void | projected_cdt (const std::vector< CGAL::Object > &objects, const CGAL::Plane_3< Kernel > &P, std::vector< CGAL::Point_3< Kernel > > &vertices, std::vector< std::vector< Index > > &faces) |
Given a list of objects (e.g., resulting from intersecting a triangle with many other triangles), construct a constrained Delaunay triangulation on a given plane (P), by inersting constraints for each object projected onto that plane. | |
template<typename Kernel , typename DerivedV , typename DerivedF > | |
void | projected_cdt (const std::vector< CGAL::Object > &objects, const CGAL::Plane_3< Kernel > &P, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Kernel > | |
void | projected_delaunay (const CGAL::Triangle_3< Kernel > &A, const std::vector< CGAL::Object > &A_objects_3, CGAL::Constrained_triangulation_plus_2< CGAL::Constrained_Delaunay_triangulation_2< Kernel, CGAL::Triangulation_data_structure_2< CGAL::Triangulation_vertex_base_2< Kernel >, CGAL::Constrained_triangulation_face_base_2< Kernel > >, CGAL::Exact_intersections_tag > > &cdt) |
Compute 2D delaunay triangulation of a given 3d triangle and a list of intersection objects (points,segments,triangles). | |
template<typename DerivedV , typename DerivedF , typename DerivedL , typename DerivedW > | |
bool | propagate_winding_numbers (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedL > &labels, Eigen::PlainObjectBase< DerivedW > &W) |
Compute winding number on each side of the face. | |
template<typename DerivedV , typename DerivedF , typename DeriveduE , typename DeriveduEC , typename DeriveduEE , typename DerivedP , typename DerivedC , typename DerivedL , typename DerivedW > | |
bool | propagate_winding_numbers (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DeriveduE > &uE, const Eigen::PlainObjectBase< DeriveduEC > &uEC, const Eigen::PlainObjectBase< DeriveduEE > &uEE, const size_t num_patches, const Eigen::PlainObjectBase< DerivedP > &P, const size_t num_cells, const Eigen::PlainObjectBase< DerivedC > &C, const Eigen::PlainObjectBase< DerivedL > &labels, Eigen::PlainObjectBase< DerivedW > &W) |
template<typename DerivedV , typename DerivedF > | |
bool | read_triangle_mesh (const std::string str, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F) |
Simple wrapper, reads floating point precision but assigns to DerivedV::Scalar which may be a CGAL type. | |
template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedC , typename FT , typename DerivedW > | |
void | relabel_small_immersed_cells (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const size_t num_patches, const Eigen::PlainObjectBase< DerivedP > &P, const size_t num_cells, const Eigen::PlainObjectBase< DerivedC > &C, const FT vol_threashold, Eigen::PlainObjectBase< DerivedW > &W) |
Relabel winding numbers of small immersed cells. | |
template<typename DerivedV , typename DerivedF , typename Kernel , typename DerivedVV , typename DerivedFF , typename DerivedJ , typename DerivedIM > | |
void | remesh_intersections (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const std::vector< CGAL::Triangle_3< Kernel > > &T, const std::map< typename DerivedF::Index, std::vector< std::pair< typename DerivedF::Index, CGAL::Object > > > &offending, bool stitch_all, bool slow_and_more_precise_rounding, Eigen::PlainObjectBase< DerivedVV > &VV, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedIM > &IM) |
Remesh faces according to results of intersection detection and construction (e.g. | |
template<typename DerivedV , typename DerivedF , typename DerivedVV , typename DerivedFF , typename DerivedIF , typename DerivedJ , typename DerivedIM > | |
void | remesh_self_intersections (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const RemeshSelfIntersectionsParam ¶ms, Eigen::PlainObjectBase< DerivedVV > &VV, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedIF > &IF, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedIM > &IM) |
Given a triangle mesh (V,F) compute a new mesh (VV,FF) which is the same as (V,F) except that any self-intersecting triangles in (V,F) have been subdivided (new vertices and face created) so that the self-intersection contour lies exactly on edges in (VV,FF). | |
template<typename DerivedV , typename DerivedF , typename DerivedVV , typename DerivedFF , typename DerivedIF , typename DerivedJ > | |
void | remesh_self_intersections (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const RemeshSelfIntersectionsParam ¶ms, Eigen::PlainObjectBase< DerivedVV > &VV, Eigen::PlainObjectBase< DerivedFF > &FF, Eigen::PlainObjectBase< DerivedIF > &IF, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.IM above is applied to merge duplicated vertices in VV. | |
template<typename DerivedV , typename DerivedE , typename DerivedVI , typename DerivedEI , typename DerivedJ , typename DerivedIM > | |
void | resolve_intersections (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedVI > &VI, Eigen::PlainObjectBase< DerivedEI > &EI, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedIM > &IM) |
Given a list of possible intersecting segments with endpoints, split segments to overlap only at endpoints. | |
template<typename Kernel , typename DerivedV > | |
CGAL::Point_2< Kernel > | row_to_point (const Eigen::PlainObjectBase< DerivedV > &V, const typename DerivedV::Index &i) |
Extract a row from V and treat as a 2D cgal point (only first two columns of V are used). | |
template<typename Kernel > | |
bool | segment_segment_squared_distance (const CGAL::Segment_3< Kernel > &S1, const CGAL::Segment_3< Kernel > &S2, CGAL::Point_3< Kernel > &P1, CGAL::Point_3< Kernel > &P2, typename Kernel::FT &d) |
Given two segments S1 and S2 find the points on each of closest approach and the squared distance thereof. | |
bool | signed_distance_isosurface (const Eigen::MatrixXd &IV, const Eigen::MatrixXi &IF, const double level, const double angle_bound, const double radius_bound, const double distance_bound, const SignedDistanceType sign_type, Eigen::MatrixXd &V, Eigen::MatrixXi &F) |
Compute the contour of an iso-level of the signed distance field to a given mesh. | |
template<typename DerivedV , typename DerivedE , typename DerivedVI , typename DerivedEI , typename DerivedJ > | |
void | snap_rounding (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedE > &E, Eigen::PlainObjectBase< DerivedVI > &VI, Eigen::PlainObjectBase< DerivedEI > &EI, Eigen::PlainObjectBase< DerivedJ > &J) |
Snap a list of possible intersecting segments with endpoints in any precision to the integer grid. | |
bool | string_to_mesh_boolean_type (const std::string &s, MeshBooleanType &type) |
Convert string to boolean type. | |
MeshBooleanType | string_to_mesh_boolean_type (const std::string &s) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedV , typename DerivedE , typename Kernel , typename DerivedVI , typename DerivedEI , typename DerivedJ , typename DerivedIM > | |
void | subdivide_segments (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedE > &E, const std::vector< std::vector< CGAL::Point_2< Kernel > > > &steiner, Eigen::PlainObjectBase< DerivedVI > &VI, Eigen::PlainObjectBase< DerivedEI > &EI, Eigen::PlainObjectBase< DerivedJ > &J, Eigen::PlainObjectBase< DerivedIM > &IM) |
Insert steiner points to subdivide a given set of line segments. | |
template<typename DerivedV , typename DerivedF , typename DerivedI , typename Kernel > | |
void | submesh_aabb_tree (const Eigen::PlainObjectBase< DerivedV > &V, const Eigen::PlainObjectBase< DerivedF > &F, const Eigen::PlainObjectBase< DerivedI > &I, CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > &tree, std::vector< typename Kernel::Triangle_3 > &triangles, std::vector< bool > &in_I) |
Build an AABB tree for a submesh indicated by a face selection list I of a full mesh (V,F) | |
template<typename Kernel > | |
bool | triangle_triangle_squared_distance (const CGAL::Triangle_3< Kernel > &T1, const CGAL::Triangle_3< Kernel > &T2, CGAL::Point_3< Kernel > &P1, CGAL::Point_3< Kernel > &P2, typename Kernel::FT &d) |
Given two triangles T1 and T2 find the points on each of closest approach and the squared distance thereof. | |
template<typename Kernel , typename DerivedV , typename DerivedE , typename DerivedH , typename DerivedV2 , typename DerivedF2 > | |
void | triangulate (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedE > &E, const Eigen::MatrixBase< DerivedH > &H, const bool retain_convex_hull, Eigen::PlainObjectBase< DerivedV2 > &V2, Eigen::PlainObjectBase< DerivedF2 > &F2) |
Triangulate the interior of a polygon using CGAL. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedV , typename DerivedF , typename DerivedD , typename DerivedJ > | |
void | trim_with_solid (const Eigen::PlainObjectBase< DerivedVA > &VA, const Eigen::PlainObjectBase< DerivedFA > &FA, const Eigen::PlainObjectBase< DerivedVB > &VB, const Eigen::PlainObjectBase< DerivedFB > &FB, Eigen::PlainObjectBase< DerivedV > &Vd, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedD > &D, Eigen::PlainObjectBase< DerivedJ > &J) |
Given an arbitrary mesh (VA,FA) and the boundary mesh (VB,FB) of a solid (as defined in [Zhou et al. | |
template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedV , typename DerivedF , typename DerivedD , typename DerivedJ > | |
void | trim_with_solid (const Eigen::PlainObjectBase< DerivedVA > &VA, const Eigen::PlainObjectBase< DerivedFA > &FA, const Eigen::PlainObjectBase< DerivedVB > &VB, const Eigen::PlainObjectBase< DerivedFB > &FB, const TrimWithSolidMethod method, Eigen::PlainObjectBase< DerivedV > &Vd, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedD > &D, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedWV , typename DerivedWE , typename Derivedth , typename DerivedV , typename DerivedF , typename DerivedJ > | |
void | wire_mesh (const Eigen::MatrixBase< DerivedWV > &WV, const Eigen::MatrixBase< DerivedWE > &WE, const Eigen::MatrixBase< Derivedth > &th, const int poly_size, const bool solid, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedJ > &J) |
Construct a "wire" or "wireframe" or "strut" surface mesh, given a one-dimensional network of straight edges. | |
template<typename DerivedWV , typename DerivedWE , typename DerivedV , typename DerivedF , typename DerivedJ > | |
void | wire_mesh (const Eigen::MatrixBase< DerivedWV > &WV, const Eigen::MatrixBase< DerivedWE > &WE, const double th, const int poly_size, const bool solid, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename DerivedWV , typename DerivedWE , typename DerivedV , typename DerivedF , typename DerivedJ > | |
void | wire_mesh (const Eigen::MatrixBase< DerivedWV > &WV, const Eigen::MatrixBase< DerivedWE > &WE, const double th, const int poly_size, Eigen::PlainObjectBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedJ > &J) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
typedef BinaryWindingNumberOperations<MESH_BOOLEAN_TYPE_INTERSECT> igl::copyleft::cgal::BinaryIntersect |
using igl::copyleft::cgal::KeepInside = typedef WindingNumberFilter<KEEP_INSIDE> |
using igl::copyleft::cgal::KeepAll = typedef WindingNumberFilter<KEEP_ALL> |
void igl::copyleft::cgal::assign | ( | const Eigen::MatrixBase< DerivedC > & | C, |
const bool | slow_and_more_precise, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
Vector version of assign_scalar.
[in] | C | matrix of scalars |
[in] | slow_and_more_precise | see assign_scalar |
[out] | D | matrix same size as C |
void igl::copyleft::cgal::assign | ( | const Eigen::MatrixBase< DerivedC > & | C, |
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Eigen::Matrix< ReturnScalar, DerivedC::RowsAtCompileTime, DerivedC::ColsAtCompileTime, 1, DerivedC::MaxRowsAtCompileTime, DerivedC::MaxColsAtCompileTime > igl::copyleft::cgal::assign | ( | const Eigen::MatrixBase< DerivedC > & | C | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const RHS & | rhs, |
const bool & | slow_and_more_precise, | ||
LHS & | lhs | ||
) |
Conduct the casting copy: lhs = rhs using slow_and_more_precise
rounding if more desired.
RHS | right-hand side scalar type |
LHS | left-hand side scalar type |
[in] | rhs | right-hand side scalar |
[in] | slow_and_more_precise | when appropriate use more elaborate rounding guaranteed to find a closest lhs value in an absolute value sense. Think of slow_and_more_precise=true as "round to closest number" and slow_and_more_precise=false as "round down/up". CGAL's number types are bit mysterious about how exactly rounding is conducted. For example, the rationals created during remesh_intersections on floating point input appear to be tightly rounded up or down so the difference with the slow_and_more_precise=true will be exactly zero 50% of the time and "one floating point unit" (at whatever scale) the other 50% of the time. |
[out] | lhs | left-hand side scalar |
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Epeck::FT & | cgal, |
CGAL::Epeck::FT & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
For legacy reasons, all of these overload uses slow_and_more_precise=true
. This is subject to change if we determine it is sufficiently overkill. In that case, we'd create a new non-overloaded function.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Epeck::FT & | cgal, |
double & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Epeck::FT & | cgal, |
float & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
cgal | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
void igl::copyleft::cgal::assign_scalar | ( | const double & | c, |
double & | d | ||
) |
c | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
void igl::copyleft::cgal::assign_scalar | ( | const float & | c, |
float & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const float & | c, |
double & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT & | cgal, |
CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT & | cgal, |
double & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt::FT & | cgal, |
float & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Simple_cartesian< mpq_class >::FT & | cgal, |
CGAL::Simple_cartesian< mpq_class >::FT & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Simple_cartesian< mpq_class >::FT & | cgal, |
double & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::assign_scalar | ( | const CGAL::Simple_cartesian< mpq_class >::FT & | cgal, |
float & | d | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::cell_adjacency | ( | const Eigen::PlainObjectBase< DerivedC > & | per_patch_cells, |
const size_t | num_cells, | ||
std::vector< std::set< std::tuple< typename DerivedC::Scalar, bool, size_t > > > & | adjacency_list | ||
) |
Determine adjacency of cells.
[in] | per_patch_cells | #P by 2 list of cell labels on each side of each patch. Cell labels are assumed to be continuous from 0 to #C. |
[in] | num_cells | number of cells. |
[out] | adjacency_list | #C array of list of adjcent cell information. If cell i and cell j are adjacent via patch x, where i is on the positive side of x, and j is on the negative side. Then, adjacency_list[i] will contain the entry {j, false, x} and adjacency_list[j] will contain the entry {i, true, x} |
void igl::copyleft::cgal::closest_facet | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
const Eigen::PlainObjectBase< DeriveduEC > & | uEC, | ||
const Eigen::PlainObjectBase< DeriveduEE > & | uEE, | ||
const std::vector< std::vector< size_t > > & | VF, | ||
const std::vector< std::vector< size_t > > & | VFi, | ||
const CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > & | tree, | ||
const std::vector< typename Kernel::Triangle_3 > & | triangles, | ||
const std::vector< bool > & | in_I, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
Determine the closest facet for each of the input points.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | V | #V by 3 array of vertices. |
[in] | F | #F by 3 array of faces. |
[in] | I | #I list of triangle indices to consider. |
[in] | P | #P by 3 array of query points. |
[in] | EMAP | #F*3 list of indices into uE. |
[in] | uEC | #uE+1 list of cumsums of directed edges sharing each unique edge |
[in] | uEE | #E list of indices into E (see igl::unique_edge_map ) |
[in] | VF | #V list of lists of incident faces (adjacency list) |
[in] | VFi | #V list of lists of index of incidence within incident faces listed in VF |
[in] | tree | AABB containing triangles of (V,F(I,:)) |
[in] | triangles | #I list of cgal triangles |
[in] | in_I | #F list of whether in submesh |
[out] | R | #P list of closest facet indices. |
[out] | S | #P list of bools indicating on which side of the closest facet each query point lies. |
size_t
here is a bad idea. These should just be int to avoid nonsense with windows. void igl::copyleft::cgal::closest_facet | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
const Eigen::PlainObjectBase< DeriveduEC > & | uEC, | ||
const Eigen::PlainObjectBase< DeriveduEE > & | uEE, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::closest_facet | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
const Eigen::PlainObjectBase< DeriveduEC > & | uEC, | ||
const Eigen::PlainObjectBase< DeriveduEE > & | uEE, | ||
Eigen::PlainObjectBase< DerivedR > & | R, | ||
Eigen::PlainObjectBase< DerivedS > & | S | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::copyleft::cgal::complex_to_mesh | ( | const CGAL::Complex_2_in_triangulation_3< Tr > & | c2t3, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Convert a CGAL::Complex_2_in_triangulation_3 to a mesh (V,F)
Tr | CGAL triangulation type, e.g. CGAL::Surface_mesh_default_triangulation_3 |
[in] | c2t3 | 2-complex (surface) living in a 3d triangulation (e.g. result of CGAL::make_surface_mesh) |
[out] | V | #V by 3 list of vertex positions |
[out] | F | #F by 3 list of triangle indices |
bool igl::copyleft::cgal::component_inside_component | ( | const Eigen::PlainObjectBase< DerivedV > & | V1, |
const Eigen::PlainObjectBase< DerivedF > & | F1, | ||
const Eigen::PlainObjectBase< DerivedI > & | I1, | ||
const Eigen::PlainObjectBase< DerivedV > & | V2, | ||
const Eigen::PlainObjectBase< DerivedF > & | F2, | ||
const Eigen::PlainObjectBase< DerivedI > & | I2 | ||
) |
Determine if connected facet component (V1, F1, I1) is inside of connected facet component (V2, F2, I2).
[in] | V1 | #V1 by 3 list of vertex position of mesh 1 |
[in] | F1 | #F1 by 3 list of triangles indices into V1 |
[in] | I1 | #I1 list of indices into F1, indicate the facets of component |
[in] | V2 | #V2 by 3 list of vertex position of mesh 2 |
[in] | F2 | #F2 by 3 list of triangles indices into V2 |
[in] | I2 | #I2 list of indices into F2, indicate the facets of component |
bool igl::copyleft::cgal::component_inside_component | ( | const Eigen::PlainObjectBase< DerivedV > & | V1, |
const Eigen::PlainObjectBase< DerivedF > & | F1, | ||
const Eigen::PlainObjectBase< DerivedV > & | V2, | ||
const Eigen::PlainObjectBase< DerivedF > & | F2 | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::convex_hull | ( | const Eigen::MatrixBase< DerivedV > & | V, |
Eigen::PlainObjectBase< DerivedW > & | W, | ||
Eigen::PlainObjectBase< DerivedG > & | G | ||
) |
Given a set of points (V), compute the convex hull as a triangle mesh (W,G)
[in] | V | #V by 3 list of input points |
[out] | W | #W by 3 list of convex hull points |
[out] | G | #G by 3 list of triangle indices into W |
void igl::copyleft::cgal::convex_hull | ( | const Eigen::MatrixBase< DerivedV > & | V, |
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::copyleft::cgal::coplanar | ( | const Eigen::MatrixBase< DerivedV > & | V | ) |
Test whether all points are on same plane.
[in] | V | #V by 3 list of 3D vertex positions |
void igl::copyleft::cgal::delaunay_triangulation | ( | const Eigen::MatrixBase< DerivedV > & | V, |
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Given a set of points in 2D, return a Delaunay triangulation of these points.
[in] | V | #V by 2 list of vertex positions |
[out] | F | #F by 3 of faces in Delaunay triangulation. |
size_t igl::copyleft::cgal::extract_cells | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
const Eigen::PlainObjectBase< DerivedEMAP > & | EMAP, | ||
const Eigen::PlainObjectBase< DeriveduEC > & | uEC, | ||
const Eigen::PlainObjectBase< DeriveduEE > & | uEE, | ||
Eigen::PlainObjectBase< DerivedC > & | cells | ||
) |
Extract connected 3D space partitioned by mesh (V, F).
[in] | V | #V by 3 array of vertices. |
[in] | F | #F by 3 array of faces. |
[in] | P | #F list of patch indices. |
[in] | uE | #uE by 2 list of vertex_indices, represents undirected edges. |
[in] | EMAP | #F*3 list of indices into uE. |
[in] | uEC | #uE+1 list of cumsums of directed edges sharing each unique edge |
[in] | uEE | #E list of indices into E (see igl::unique_edge_map ) |
[out] | cells | #F by 2 array of cell indices. cells(i,0) represents the cell index on the positive side of face i, and cells(i,1) represents cell index of the negqtive side. By convension cell with index 0 is the infinite cell. |
size_t igl::copyleft::cgal::extract_cells | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedC > & | cells | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int igl::copyleft::cgal::extract_cells_single_component | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
const Eigen::PlainObjectBase< DeriveduEC > & | uEC, | ||
const Eigen::PlainObjectBase< DeriveduEE > & | uEE, | ||
Eigen::PlainObjectBase< DerivedC > & | cells | ||
) |
Extract connected 3D space partitioned by mesh (V,F) composed of possibly multiple components (the name of this function is dubious).
[in] | V | #V by 3 array of vertices. |
[in] | F | #F by 3 array of faces. |
[in] | P | #F list of patch indices. |
[in] | uE | #uE by 2 list of vertex_indices, represents undirected edges. |
[in] | uEC | #uE+1 list of cumsums of directed edges sharing each unique edge |
[in] | uEE | #E list of indices into E (see igl::unique_edge_map ) |
[out] | cells | #P by 2 array of cell indices. cells(i,0) represents the cell index on the positive side of patch i, and cells(i,1) represents cell index of the negative side. |
void igl::copyleft::cgal::extract_feature | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const double | tol, | ||
Eigen::PlainObjectBase< Derivedfeature_edges > & | feature_edges | ||
) |
Extract feature edges based on dihedral angle.
Here, dihedral angle is defined as the angle between surface normals as described in http://mathworld.wolfram.com/DihedralAngle.html
Non-manifold and boundary edges are automatically considered as features.
[in] | V | #V by 3 array of vertices. |
[in] | F | #F by 3 array of faces. |
[in] | tol | Edges with dihedral angle larger than this are considered as features. Angle is measured in radian. |
[out] | feature_edges | #E by 2 array of edges. Each edge satisfies at least one of the following criteria:
|
void igl::copyleft::cgal::extract_feature | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const double | tol, | ||
const Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
const std::vector< std::vector< typename DeriveduE::Scalar > > & | uE2E, | ||
Eigen::PlainObjectBase< Derivedfeature_edges > & | feature_edges | ||
) |
void igl::copyleft::cgal::fast_winding_number | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
const int | expansion_order, | ||
const BetaType | beta, | ||
Eigen::PlainObjectBase< DerivedWN > & | WN | ||
) |
Evaluate the fast winding number for point data, without known areas.
The areas are calculated using igl::knn and igl::copyleft::cgal::point_areas.
This function performes the precomputation and evaluation all in one. If you need to acess the precomuptation for repeated evaluations, use the two functions designed for exposed precomputation, which are the first two functions see in igl/fast_winding_number.h
[in] | P | #P by 3 list of point locations |
[in] | N | #P by 3 list of point normals |
[in] | Q | #Q by 3 list of query points for the winding number |
[in] | beta | This is a Barnes-Hut style accuracy term that separates near feild from far field. The higher the beta, the more accurate and slower the evaluation. We reccommend using a beta value of 2. |
[in] | expansion_order | the order of the taylor expansion. We support 0,1,2. |
[out] | WN | #Q by 1 list of windinng number values at each query point |
void igl::copyleft::cgal::fast_winding_number | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedN > & | N, | ||
const Eigen::MatrixBase< DerivedQ > & | Q, | ||
Eigen::PlainObjectBase< DerivedWN > & | WN | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::half_space_box | ( | const CGAL::Plane_3< CGAL::Epeck > & | P, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
Eigen::Matrix< CGAL::Epeck::FT, 8, 3 > & | BV, | ||
Eigen::Matrix< int, 12, 3 > & | BF | ||
) |
Construct a mesh of box (BV,BF) so that it contains the intersection of the half-space under the plane (P) and the bounding box of V, and does not contain any of the half-space above (P).
[in] | P | plane so that normal points away from half-space |
[in] | V | #V by 3 list of vertex positions |
[out] | BV | #BV by 3 list of box vertex positions |
[out] | BF | #BF b3 list of box triangle indices into BV |
void igl::copyleft::cgal::half_space_box | ( | const Eigen::MatrixBase< Derivedp > & | p, |
const Eigen::MatrixBase< Derivedn > & | n, | ||
const Eigen::MatrixBase< DerivedV > & | V, | ||
Eigen::Matrix< CGAL::Epeck::FT, 8, 3 > & | BV, | ||
Eigen::Matrix< int, 12, 3 > & | BF | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | p | 3d point on plane |
[in] | n | 3d vector of normal of plane pointing away from inside |
void igl::copyleft::cgal::half_space_box | ( | const Eigen::MatrixBase< Derivedequ > & | equ, |
const Eigen::MatrixBase< DerivedV > & | V, | ||
Eigen::Matrix< CGAL::Epeck::FT, 8, 3 > & | BV, | ||
Eigen::Matrix< int, 12, 3 > & | BF | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | equ | plane equation: a*x+b*y+c*z + d = 0 |
void igl::copyleft::cgal::hausdorff | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< CGAL::Triangle_3< Kernel > >::iterator > > > & | treeB, | ||
const std::vector< CGAL::Triangle_3< Kernel > > & | TB, | ||
Scalar & | l, | ||
Scalar & | u | ||
) |
Compute lower and upper bounds (l,u) on the Hausdorff distance between a triangle (V) and a pointset (e.g., mesh, triangle soup) given by a distance function handle (dist_to_B).
[in] | V | 3 by 3 list of corner positions so that V.row(i) is the position of the ith corner |
[in] | treeB | CGAL's AABB tree containing triangle soup (VB,FB) |
[in] | TB | list of CGAL triangles in order of FB (for determining which was found in computation) |
[out] | l | lower bound on Hausdorff distance |
[out] | u | upper bound on Hausdorff distance |
short igl::copyleft::cgal::incircle | ( | const Scalar * | pa, |
const Scalar * | pb, | ||
const Scalar * | pc, | ||
const Scalar * | pd | ||
) |
Test whether point is in a given circle.
[in] | pa | 2D point on sphere |
[in] | pb | 2D point on sphere |
[in] | pc | 2D point on sphere |
[in] | pd | 2D point to test |
void igl::copyleft::cgal::insert_into_cdt | ( | const CGAL::Object & | obj, |
const CGAL::Plane_3< Kernel > & | P, | ||
CGAL::Constrained_triangulation_plus_2< CGAL::Constrained_Delaunay_triangulation_2< Kernel, CGAL::Triangulation_data_structure_2< CGAL::Triangulation_vertex_base_2< Kernel >, CGAL::Constrained_triangulation_face_base_2< Kernel > >, CGAL::Exact_intersections_tag > > & | cdt | ||
) |
Given a current 2D constrained Delaunay triangulation (cdt), insert a 3D "object" (e.g., resulting from intersecting two triangles) into the cdt, by projecting it via the given plane (P) and adding appropriate constraints.
[in] | obj | CGAL::Object representing a vertex, segment, or (convex) polygon. All vertices should lie on the plane P. If not, then this adds the projection of this object to the cdt and that might not be what you wanted to do. |
[in] | P | plane obj lies on and upon which the cdt is being performed |
[in] | cdt | current CDT, see output |
[out] | cdt | CDT updated to contain constraints for the given object |
short igl::copyleft::cgal::insphere | ( | const Scalar | pa[3], |
const Scalar | pb[3], | ||
const Scalar | pc[3], | ||
const Scalar | pd[3], | ||
const Scalar | pe[3] | ||
) |
Test whether point is in a given sphere.
[in] | pa | 3D point on sphere |
[in] | pb | 3D point on sphere |
[in] | pc | 3D point on sphere |
[in] | pd | 3D point on sphere |
[in] | pe | 3D point to test |
bool igl::copyleft::cgal::intersect_other | ( | const Eigen::PlainObjectBase< DerivedVA > & | VA, |
const Eigen::PlainObjectBase< DerivedFA > & | FA, | ||
const Eigen::PlainObjectBase< DerivedVB > & | VB, | ||
const Eigen::PlainObjectBase< DerivedFB > & | FB, | ||
const RemeshSelfIntersectionsParam & | params, | ||
Eigen::PlainObjectBase< DerivedIF > & | IF, | ||
Eigen::PlainObjectBase< DerivedVVAB > & | VVAB, | ||
Eigen::PlainObjectBase< DerivedFFAB > & | FFAB, | ||
Eigen::PlainObjectBase< DerivedJAB > & | JAB, | ||
Eigen::PlainObjectBase< DerivedIMAB > & | IMAB | ||
) |
Given a triangle mesh (VA,FA) and another mesh (VB,FB) find all pairs of intersecting faces.
Note that self-intersections are ignored.
[in] | VA | #V by 3 list of vertex positions |
[in] | FA | #F by 3 list of triangle indices into VA |
[in] | VB | #V by 3 list of vertex positions |
[in] | FB | #F by 3 list of triangle indices into VB |
[in] | params | whether to detect only and then whether to only find first intersection |
[out] | IF | #intersecting face pairs by 2 list of intersecting face pairs, indexing FA and FB |
[out] | VVAB | #VVAB by 3 list of vertex positions |
[out] | FFAB | #FFAB by 3 list of triangle indices into VVA |
[out] | JAB | #FFAB list of indices into [FA;FB] denoting birth triangle |
[out] | IMAB | #VVAB list of indices stitching duplicates (resulting from mesh intersections) together |
bool igl::copyleft::cgal::intersect_other | ( | const Eigen::MatrixXd & | VA, |
const Eigen::MatrixXi & | FA, | ||
const Eigen::MatrixXd & | VB, | ||
const Eigen::MatrixXi & | FB, | ||
const bool | first_only, | ||
Eigen::MatrixXi & | IF | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | first_only | whether to only find first intersection |
bool igl::copyleft::cgal::intersect_with_half_space | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedp > & | p, | ||
const Eigen::MatrixBase< Derivedn > & | n, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Intersect a PWN mesh with a half-space.
Point on plane, normal pointing outward.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | p | 3d point on plane |
[in] | n | 3d vector of normal of plane pointing away from inside |
[out] | VC | #VC by 3 list of vertex positions of boolean result mesh |
[out] | FC | #FC by 3 list of triangle indices into VC |
[out] | J | #FC list of indices into [F;F.rows()+[1;2]] revealing "birth" facet |
bool igl::copyleft::cgal::intersect_with_half_space | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const Eigen::MatrixBase< Derivedequ > & | equ, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | equ | plane equation: P(x,y,z) = a*x+b*y+c*z + d = 0, P(x,y,z) < 0 is inside. |
bool igl::copyleft::cgal::intersect_with_half_space | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const CGAL::Plane_3< CGAL::Epeck > & | P, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | P | plane |
void igl::copyleft::cgal::lexicographic_triangulation | ( | const Eigen::PlainObjectBase< DerivedP > & | P, |
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Given a set of points in 2D, return a lexicographic triangulation of these points.
[in] | P | #P by 2 list of vertex positions |
[out] | F | #F by 3 of faces in lexicographic triangulation. |
bool igl::copyleft::cgal::mesh_boolean | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::MatrixBase< DerivedVB > & | VB, | ||
const Eigen::MatrixBase< DerivedFB > & | FB, | ||
const MeshBooleanType & | type, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Compute Boolean csg operations on "solid", consistently oriented meshes.
[in] | VA | #VA by 3 list of vertex positions of first mesh |
[in] | FA | #FA by 3 list of triangle indices into VA |
[in] | VB | #VB by 3 list of vertex positions of second mesh |
[in] | FB | #FB by 3 list of triangle indices into VB |
[in] | type | type of boolean operation |
[out] | VC | #VC by 3 list of vertex positions of boolean result mesh |
[out] | FC | #FC by 3 list of triangle indices into VC |
[out] | J | #FC list of indices into [FA;FA.rows()+FB] revealing "birth" facet |
bool igl::copyleft::cgal::mesh_boolean | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::MatrixBase< DerivedVB > & | VB, | ||
const Eigen::MatrixBase< DerivedFB > & | FB, | ||
const std::string & | type_str, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | type_str | string describing type of boolean operation see mesh_boolean_type_to_funcs |
bool igl::copyleft::cgal::mesh_boolean | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::MatrixBase< DerivedVB > & | VB, | ||
const Eigen::MatrixBase< DerivedFB > & | FB, | ||
const std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > & | wind_num_op, | ||
const std::function< int(const int, const int)> & | keep, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | wind_num_op | function handle for filtering winding numbers from tuples of integer values to [0,1] outside/inside values |
[in] | keep | function handle for determining if a patch should be "kept" in the output based on the winding number on either side |
bool igl::copyleft::cgal::mesh_boolean | ( | const std::vector< DerivedV > & | Vlist, |
const std::vector< DerivedF > & | Flist, | ||
const std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > & | wind_num_op, | ||
const std::function< int(const int, const int)> & | keep, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Variadic mesh Boolean operations.
[in] | Vlist | k-long list of lists of mesh vertex positions |
[in] | Flist | k-long list of lists of mesh face indices, so that Flist[i] indexes vertices in Vlist[i] |
[in] | wind_num_op | function handle for filtering winding numbers from n-tuples of integer values to [0,1] outside/inside values |
[in] | keep | function handle for determining if a patch should be "kept" in the output based on the winding number on either side |
[out] | VC | #VC by 3 list of vertex positions of boolean result mesh |
[out] | FC | #FC by 3 list of triangle indices into VC |
[out] | J | #FC list of indices into [Flist[0];Flist[1];...;Flist[k]] revealing "birth" facet |
bool igl::copyleft::cgal::mesh_boolean | ( | const std::vector< DerivedV > & | Vlist, |
const std::vector< DerivedF > & | Flist, | ||
const MeshBooleanType & | type, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool igl::copyleft::cgal::mesh_boolean | ( | const Eigen::MatrixBase< DerivedVV > & | VV, |
const Eigen::MatrixBase< DerivedFF > & | FF, | ||
const Eigen::MatrixBase< Derivedsizes > & | sizes, | ||
const std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > & | wind_num_op, | ||
const std::function< int(const int, const int)> & | keep, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Given a merged mesh (V,F) and list of sizes of inputs
[in] | V | #V by 3 list of merged mesh vertex positions |
[in] | F | #F by 3 list of merged mesh face indices so that first sizes(0) faces come from the first input, and the next sizes(1) faces come from the second input, and so on. |
[in] | sizes | #inputs list of sizes so that sizes(i) is the #faces in the ith input |
bool igl::copyleft::cgal::mesh_boolean | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::MatrixBase< DerivedVB > & | VB, | ||
const Eigen::MatrixBase< DerivedFB > & | FB, | ||
const MeshBooleanType & | type, | ||
Eigen::PlainObjectBase< DerivedVC > & | VC, | ||
Eigen::PlainObjectBase< DerivedFC > & | FC | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::mesh_boolean_type_to_funcs | ( | const MeshBooleanType & | type, |
std::function< int(const Eigen::Matrix< int, 1, Eigen::Dynamic >) > & | wind_num_op, | ||
std::function< int(const int, const int)> & | keep | ||
) |
Convert a MeshBooleanType enum to a pair of winding number conversion function and "keep" function used by mesh_boolean.
[in] | type | MeshBooleanType enum value |
[out] | wind_num_op | function handle for filtering winding numbers from tuples of integer values to [0,1] outside/inside values |
[out] | keep | function handle for determining if a patch should be "kept" in the output based on the winding number on either side |
void igl::copyleft::cgal::mesh_to_cgal_triangle_list | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
std::vector< CGAL::Triangle_3< Kernel > > & | T | ||
) |
Convert a mesh (V,F) to a list of CGAL triangles.
@2tparam Kernal CGAL computation and construction kernel (e.g. CGAL::Exact_predicates_exact_constructions_kernel)
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[out] | T | #F list of CGAL triangles |
bool igl::copyleft::cgal::mesh_to_polyhedron | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
Polyhedron & | poly | ||
) |
Convert a mesh (V,F) to a CGAL Polyhedron.
Polyhedron | CGAL Polyhedron type (e.g. Polyhedron_3) |
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[out] | poly | cgal polyhedron |
void igl::copyleft::cgal::minkowski_sum | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::MatrixBase< DerivedVB > & | VB, | ||
const Eigen::MatrixBase< DerivedFB > & | FB, | ||
const bool | resolve_overlaps, | ||
Eigen::PlainObjectBase< DerivedW > & | W, | ||
Eigen::PlainObjectBase< DerivedG > & | G, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Compute the Minkowski sum of a closed triangle mesh (V,F) and a set of simplices in 3D.
[in] | VA | #VA by 3 list of mesh vertices in 3D |
[in] | FA | #FA by 3 list of triangle indices into VA |
[in] | VB | #VB by 3 list of mesh vertices in 3D |
[in] | FB | #FB by ss list of simplex indices into VB, ss<=3 |
[in] | resolve_overlaps | whether or not to resolve self-union. If false then result may contain self-intersections if input mesh is non-convex. |
[out] | W | #W by 3 list of mesh vertices in 3D |
[out] | G | #G by 3 list of triangle indices into W |
[out] | J | #G by 2 list of indices into |
void igl::copyleft::cgal::minkowski_sum | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::Matrix< sType, 1, sCols, sOptions > & | s, | ||
const Eigen::Matrix< dType, 1, dCols, dOptions > & | d, | ||
const bool | resolve_overlaps, | ||
Eigen::PlainObjectBase< DerivedW > & | W, | ||
Eigen::PlainObjectBase< DerivedG > & | G, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Compute the Minkowski sum of a closed triangle mesh (V,F) and a segment [s,d] in 3D.
[in] | s | segment source endpoint in 3D |
[in] | d | segment source endpoint in 3D |
void igl::copyleft::cgal::minkowski_sum | ( | const Eigen::MatrixBase< DerivedVA > & | VA, |
const Eigen::MatrixBase< DerivedFA > & | FA, | ||
const Eigen::Matrix< sType, 1, sCols, sOptions > & | s, | ||
const Eigen::Matrix< dType, 1, dCols, dOptions > & | d, | ||
Eigen::PlainObjectBase< DerivedW > & | W, | ||
Eigen::PlainObjectBase< DerivedG > & | G, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::order_facets_around_edge | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
size_t | s, | ||
size_t | d, | ||
const std::vector< int > & | adj_faces, | ||
Eigen::PlainObjectBase< DerivedI > & | order, | ||
bool | debug = false |
||
) |
Given a directed edge, sort its adjacent faces.
Assuming the directed edge is (s, d). Sort the adjacent faces clockwise around the axis (d - s), i.e. left-hand rule. An adjacent face is consistently oriented if it contains (d, s) as a directed edge.
For overlapping faces, break the tie using signed face index, smaller signed index comes before the larger signed index. Signed index is computed as (consistent? 1:-1) * (face_index + 1).
[in] | V | #V by 3 list of vertices. |
[in] | F | #F by 3 list of faces |
[in] | s | Index of source vertex. |
[in] | d | Index of destination vertex. |
[in] | adj_faces | List of adjacent face signed indices. |
[out] | order | List of face indices that orders adjacent faces around edge (s, d) clockwise. |
void igl::copyleft::cgal::order_facets_around_edge | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
size_t | s, | ||
size_t | d, | ||
const std::vector< int > & | adj_faces, | ||
const Eigen::PlainObjectBase< DerivedV > & | pivot_point, | ||
Eigen::PlainObjectBase< DerivedI > & | order | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This function is a wrapper around the one above. Since the ordering is circular, the pivot point is used to define a starting point. So order[0] is the index into adj_face that is immediately after the pivot face (s, d, pivot point) in clockwise order.
[in] | pivot_point | A point that forms pivot with edge (s,d) |
std::enable_if<!std::is_same< typenameDerivedV::Scalar, typenameCGAL::Exact_predicates_exact_constructions_kernel::FT >::value, void >::type igl::copyleft::cgal::order_facets_around_edges | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedN > & | N, | ||
const Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
std::vector< std::vector< uE2oEType > > & | uE2oE, | ||
std::vector< std::vector< uE2CType > > & | uE2C | ||
) |
For each undirected edge, sort its adjacent faces.
Assuming the undirected edge is (s, d). Sort the adjacent faces clockwise around the axis (d - s), i.e. left-hand rule. An adjacent face is consistently oriented if it contains (d, s) as a directed edge.
For overlapping faces, break the tie using signed face index, smaller signed index comes before the larger signed index. Signed index is computed as (consistent? 1:-1) * index.
[in] | V | #V by 3 list of vertices. |
[in] | F | #F by 3 list of faces |
[in] | N | #F by 3 list of face normals. |
[in] | uE | #uE by 2 list of vertex_indices, represents undirected edges. |
[in] | uE2E | #uE list of lists that maps uE to E. (a one-to-many map) |
[out] | uE2oE | #uE list of lists that maps uE to an ordered list of E. (a one-to-many map) |
[out] | uE2C | #uE list of lists of bools indicates whether each face in uE2oE[i] is consistently orientated as the ordering. |
std::enable_if< std::is_same< typenameDerivedV::Scalar, typenameCGAL::Exact_predicates_exact_constructions_kernel::FT >::value, void >::type igl::copyleft::cgal::order_facets_around_edges | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedN > & | N, | ||
const Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
std::vector< std::vector< uE2oEType > > & | uE2oE, | ||
std::vector< std::vector< uE2CType > > & | uE2C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::order_facets_around_edges | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
const std::vector< std::vector< uE2EType > > & | uE2E, | ||
std::vector< std::vector< uE2oEType > > & | uE2oE, | ||
std::vector< std::vector< uE2CType > > & | uE2C | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Order faces around each edge. Only exact predicate is used in the algorithm. Normal is not needed.
short igl::copyleft::cgal::orient2D | ( | const Scalar * | pa, |
const Scalar * | pb, | ||
const Scalar * | pc | ||
) |
Tests whether a point is above, on, or below a line.
[in] | pa | 2D point on plane |
[in] | pb | 2D point on plane |
[in] | pc | 2D point to test |
short igl::copyleft::cgal::orient3D | ( | const Scalar | pa[3], |
const Scalar | pb[3], | ||
const Scalar | pc[3], | ||
const Scalar | pd[3] | ||
) |
Tests whether a point is above, on, or below a plane.
[in] | pa | 3D point on plane |
[in] | pb | 3D point on plane |
[in] | pc | 3D point on plane |
[in] | pd | 3D point to test |
void igl::copyleft::cgal::outer_edge | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
IndexType & | v1, | ||
IndexType & | v2, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
Find an edge that is reachable from infinity without crossing any faces.
Such edge is called "outer edge."
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | I | #I list of facets to consider |
[out] | v1 | index of the first end point of outer edge |
[out] | v2 | index of the second end point of outer edge |
[out] | A | #A list of facets incident to the outer edge |
void igl::copyleft::cgal::outer_facet | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedN > & | N, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
IndexType & | f, | ||
bool & | flipped | ||
) |
Find a facet that is reachable from infinity without crossing any faces.
Such facet is called "outer facet."
This function differ from igl::outer_facet() in the fact this function is more robust because it does not rely on facet normals.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | I | #I list of facets to consider |
[in] | N | #N by 3 list of face normals |
[out] | f | Index of the outer facet. |
[out] | flipped | true iff the normal of f points inwards. |
void igl::copyleft::cgal::outer_facet | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
IndexType & | f, | ||
bool & | flipped | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::outer_hull | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedHV > & | HV, | ||
Eigen::PlainObjectBase< DerivedHF > & | HF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< Derivedflip > & | flip | ||
) |
Compute the "outer hull" of a piecewise constant winding number induce triangle mesh (V,F).
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | HV | #HV by 3 list of output vertex positions |
[out] | HF | #HF by 3 list of output triangle indices into HV |
[out] | J | #HF list of indices into F |
[out] | flip | #HF list of whether facet was flipped when added to HF |
void igl::copyleft::cgal::outer_hull_legacy | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedG > & | G, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< Derivedflip > & | flip | ||
) |
Compute the "outer hull" of a potentially non-manifold mesh (V,F) whose intersections have been "resolved" (e.g.
using cork
or igl::copyleft::cgal::selfintersect
). The outer hull is defined to be all facets (regardless of orientation) for which there exists some path from infinity to the face without intersecting any other facets. For solids, this is the surface of the solid. In general this includes any thin "wings" or "flaps". This implementation largely follows Section 3.6 of "Direct
repair of self-intersecting meshes" [Attene 2014].
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | G | #G by 3 list of output triangle indices into V |
[out] | J | #G list of indices into F |
[out] | flip | #F list of whether facet was added to G and flipped orientation (false for faces not added to G) |
void igl::copyleft::cgal::outer_vertex | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
IndexType & | v_index, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
Find a vertex that is reachable from infinite without crossing any faces.
Such vertex is called "outer vertex."
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | I | #I list of facets to consider |
[out] | v_index | index of outer vertex |
[out] | A | #A list of facets incident to the outer vertex |
size_t igl::copyleft::cgal::peel_outer_hull_layers | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< Derivedflip > & | flip | ||
) |
Computes necessary generic information for boolean operations by successively "peeling" off the "outer hull" of a mesh (V,F) resulting from "resolving" all (self-)intersections.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | I | #F list of which peel Iation a facet belongs |
[out] | flip | #F list of whether a facet's orientation was flipped when facet "peeled" into its associated outer hull layer. |
size_t igl::copyleft::cgal::peel_winding_number_layers | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Peel Winding number layers from a mesh.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[out] | W | #V by 1 list of winding numbers |
bool igl::copyleft::cgal::piecewise_constant_winding_number | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Determine if a given mesh induces a piecewise constant winding number field: Is this mesh valid input to solid set operations.
[in] | V | #V by 3 list of mesh vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
void igl::copyleft::cgal::point_areas | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedI > & | I, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedA > & | A, | ||
Eigen::PlainObjectBase< DerivedT > & | T | ||
) |
Given a 3D set of points P, each with a list of k-nearest-neighbours, estimate the geodesic voronoi area associated with each point.
The k nearest neighbours may be known from running igl::knn_octree on the output data from igl::octree. We reccomend using a k value between 15 and 20 inclusive for accurate area estimation.
N is used filter the neighbours, to ensure area estimation only occurs using neighbors that are on the same side of the surface (ie for thin sheets), as well as to solve the orientation ambiguity of the tangent plane normal.
[in] | P | #P by 3 list of point locations |
[in] | I | #P by k list of k-nearest-neighbor indices into P |
[in] | N | #P by 3 list of point normals |
[out] | A | #P list of estimated areas |
void igl::copyleft::cgal::point_areas | ( | const Eigen::MatrixBase< DerivedP > & | P, |
const Eigen::MatrixBase< DerivedI > & | I, | ||
const Eigen::MatrixBase< DerivedN > & | N, | ||
Eigen::PlainObjectBase< DerivedA > & | A | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::point_mesh_squared_distance | ( | const Eigen::PlainObjectBase< DerivedP > & | P, |
const Eigen::PlainObjectBase< DerivedV > & | V, | ||
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedsqrD > & | sqrD, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute distances from a set of points P to a triangle mesh (V,F)
Kernal | CGAL computation and construction kernel (e.g. CGAL::Simple_cartesian<double>) |
[in] | P | #P by 3 list of query point positions |
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[out] | sqrD | #P list of smallest squared distances |
[out] | I | #P list of facet indices corresponding to smallest distances |
[out] | C | #P by 3 list of closest points |
void igl::copyleft::cgal::point_mesh_squared_distance_precompute | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< CGAL::Triangle_3< Kernel > >::iterator > > > & | tree, | ||
std::vector< CGAL::Triangle_3< Kernel > > & | T | ||
) |
precomputation for point_mesh_squared_distance
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices |
[out] | tree | CGAL's AABB tree |
[out] | T | list of CGAL triangles in order of F (for determining which was found in computation) |
void igl::copyleft::cgal::point_mesh_squared_distance | ( | const Eigen::PlainObjectBase< DerivedP > & | P, |
const CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< CGAL::Triangle_3< Kernel > >::iterator > > > & | tree, | ||
const std::vector< CGAL::Triangle_3< Kernel > > & | T, | ||
Eigen::PlainObjectBase< DerivedsqrD > & | sqrD, | ||
Eigen::PlainObjectBase< DerivedI > & | I, | ||
Eigen::PlainObjectBase< DerivedC > & | C | ||
) |
Compute distances from a set of points P to a triangle mesh (V,F) using precomputed trees.
[in] | P | #P by 3 list of query point positions |
[in] | tree | CGAL's AABB tree |
[in] | T | list of CGAL triangles in order of F (for determining which was found in computation) |
[out] | sqrD | #P list of smallest squared distances |
[out] | I | #P list of facet indices corresponding to smallest distances |
[out] | C | #P by 3 list of closest points |
void igl::copyleft::cgal::point_segment_squared_distance | ( | const CGAL::Point_3< Kernel > & | P1, |
const CGAL::Segment_3< Kernel > & | S2, | ||
CGAL::Point_3< Kernel > & | P2, | ||
typename Kernel::FT & | d | ||
) |
Given a point P1 and segment S2 find the points on each of closest approach and the squared distance thereof.
[in] | P1 | point |
[in] | S2 | segment |
[out] | P2 | point on S2 closest to P1 |
[out] | d | distance betwee P1 and S2 |
void igl::copyleft::cgal::point_solid_signed_squared_distance | ( | const Eigen::PlainObjectBase< DerivedQ > & | Q, |
const Eigen::PlainObjectBase< DerivedVB > & | VB, | ||
const Eigen::PlainObjectBase< DerivedFB > & | FB, | ||
Eigen::PlainObjectBase< DerivedD > & | D | ||
) |
Given a set of points (Q) and the boundary mesh (VB,FB) of a solid (as defined in [Zhou et al.
2016], determine the signed squared distance for each point q in Q so that d(q,B) is negative if inside and positive if outside.
[in] | Q | #Q by 3 list of query point positions |
[in] | VB | #VB by 3 list of mesh vertex positions of B |
[in] | FB | #FB by 3 list of mesh triangle indices into VB |
[out] | D | #Q list of signed squared distances |
void igl::copyleft::cgal::point_triangle_squared_distance | ( | const CGAL::Point_3< Kernel > & | P1, |
const CGAL::Triangle_3< Kernel > & | T2, | ||
CGAL::Point_3< Kernel > & | P2, | ||
typename Kernel::FT & | d | ||
) |
Given a point P1 and triangle T2 find the points on each of closest approach and the squared distance thereof.
[in] | P1 | point |
[in] | T2 | triangle |
[out] | P2 | point on T2 closest to P1 |
[out] | d | distance betwee P1 and T2 |
void igl::copyleft::cgal::points_inside_component | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
Eigen::PlainObjectBase< DerivedB > & | inside | ||
) |
Determine if queries points P are inside of connected facet component (V, F, I), where I indicates a subset of facets that forms the component.
[in] | V | #V by 3 array of vertex positions. |
[in] | F | #F by 3 array of triangles. |
[in] | I | #I list of triangle indices to consider. |
[in] | P | #P by 3 array of query points. |
[out] | inside | #P list of booleans that is true iff the corresponding query point is inside of the mesh. |
void igl::copyleft::cgal::points_inside_component | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
Eigen::PlainObjectBase< DerivedB > & | inside | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void igl::copyleft::cgal::polyhedron_to_mesh | ( | const Polyhedron & | poly, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Convert a CGAL Polyhedron to a mesh (V,F)
Polyhedron | CGAL Polyhedron type (e.g. Polyhedron_3) |
[in] | poly | cgal polyhedron |
[out] | V | #V by 3 list of vertex positions |
[out] | F | #F by 3 list of triangle indices |
void igl::copyleft::cgal::projected_cdt | ( | const std::vector< CGAL::Object > & | objects, |
const CGAL::Plane_3< Kernel > & | P, | ||
std::vector< CGAL::Point_3< Kernel > > & | vertices, | ||
std::vector< std::vector< Index > > & | faces | ||
) |
Given a list of objects (e.g., resulting from intersecting a triangle with many other triangles), construct a constrained Delaunay triangulation on a given plane (P), by inersting constraints for each object projected onto that plane.
[in] | objects | list of objects. This should lie on the given plane (P), otherwise they are added to the cdt after their non-trivial projection |
[in] | P | plane upon which all objects lie and upon which the CDT is conducted |
[out] | vertices | list of vertices of the CDT mesh back on the 3D plane |
[out] | faces | list of list of triangle indices into vertices |
void igl::copyleft::cgal::projected_cdt | ( | const std::vector< CGAL::Object > & | objects, |
const CGAL::Plane_3< Kernel > & | P, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[out] | V | #V by 3 list of vertices of the CDT mesh back on the 3D plane, cast from the number type of Kernel to the number type of DerivedV |
[out] | F | #F by 3 list of triangle indices into V |
void igl::copyleft::cgal::projected_delaunay | ( | const CGAL::Triangle_3< Kernel > & | A, |
const std::vector< CGAL::Object > & | A_objects_3, | ||
CGAL::Constrained_triangulation_plus_2< CGAL::Constrained_Delaunay_triangulation_2< Kernel, CGAL::Triangulation_data_structure_2< CGAL::Triangulation_vertex_base_2< Kernel >, CGAL::Constrained_triangulation_face_base_2< Kernel > >, CGAL::Exact_intersections_tag > > & | cdt | ||
) |
Compute 2D delaunay triangulation of a given 3d triangle and a list of intersection objects (points,segments,triangles).
CGAL uses an affine projection rather than an isometric projection, so we're not guaranteed that the 2D delaunay triangulation here will be a delaunay triangulation in 3D.
[in] | A | triangle in 3D |
[in] | A_objects_3 | updated list of intersection objects for A |
[out] | cdt | Contrained delaunay triangulation in projected 2D plane |
bool igl::copyleft::cgal::propagate_winding_numbers | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedL > & | labels, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Compute winding number on each side of the face.
The input mesh could contain multiple connected components. The input mesh must represent the boundary of a valid 3D volume, which means it is closed, consistently oriented and induces integer winding numbers.
[in] | V | #V by 3 list of vertex positions. |
[in] | F | #F by 3 list of triangle indices into V. |
[in] | labels | #F list of facet labels ranging from 0 to k-1. |
[out] | W | #F by k*2 list of winding numbers. W(i,j*2) is the winding number on the positive side of facet i with respect to the facets labeled j . Similarly, W(i,j*2+1) is the winding number on the negative side of facet i with respect to the facets labeled j . |
bool igl::copyleft::cgal::propagate_winding_numbers | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DeriveduE > & | uE, | ||
const Eigen::PlainObjectBase< DeriveduEC > & | uEC, | ||
const Eigen::PlainObjectBase< DeriveduEE > & | uEE, | ||
const size_t | num_patches, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const size_t | num_cells, | ||
const Eigen::PlainObjectBase< DerivedC > & | C, | ||
const Eigen::PlainObjectBase< DerivedL > & | labels, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
bool igl::copyleft::cgal::read_triangle_mesh | ( | const std::string | str, |
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F | ||
) |
Simple wrapper, reads floating point precision but assigns to DerivedV::Scalar which may be a CGAL type.
[in] | str | path to file |
[out] | V | eigen double matrix #V by 3 |
[out] | F | eigen int matrix #F by 3 |
void igl::copyleft::cgal::relabel_small_immersed_cells | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const size_t | num_patches, | ||
const Eigen::PlainObjectBase< DerivedP > & | P, | ||
const size_t | num_cells, | ||
const Eigen::PlainObjectBase< DerivedC > & | C, | ||
const FT | vol_threashold, | ||
Eigen::PlainObjectBase< DerivedW > & | W | ||
) |
Relabel winding numbers of small immersed cells.
[in] | V | #V by 3 list of vertex positions. |
[in] | F | #F by 3 list of triangle indices into V. |
[in] | num_patches | number of patches |
[in] | P | #F list of patch ids. |
[in] | num_cells | number of cells |
[in] | C | #P by 2 list of cell ids on each side of each patch. |
[in] | vol_threshold | Volume threshold, cells smaller than this and is completely immersed will be relabeled. |
[out] | W | #F by 2 cell labels. W(i,0) is the label on the positive side of face i, W(i,1) is the label on the negative side of face i. W will be modified in place by this method. |
void igl::copyleft::cgal::remesh_intersections | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const std::vector< CGAL::Triangle_3< Kernel > > & | T, | ||
const std::map< typename DerivedF::Index, std::vector< std::pair< typename DerivedF::Index, CGAL::Object > > > & | offending, | ||
bool | stitch_all, | ||
bool | slow_and_more_precise_rounding, | ||
Eigen::PlainObjectBase< DerivedVV > & | VV, | ||
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedIM > & | IM | ||
) |
Remesh faces according to results of intersection detection and construction (e.g.
from igl::copyleft::cgal::intersect_other
or igl::copyleft::cgal::SelfIntersectMesh
)
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | T | #F list of cgal triangles |
[in] | offending | #offending map taking face indices into F to pairs of order of first finding and list of intersection objects from all intersections |
[in] | stitch_all | if true, merge all vertices with the same coordinate. |
[out] | VV | #VV by 3 list of vertex positions, if stitch_all = false then first #V vertices will always be V |
[out] | FF | #FF by 3 list of triangle indices into V |
[out] | IF | #intersecting face pairs by 2 list of intersecting face pairs, indexing F |
[out] | J | #FF list of indices into F denoting birth triangle |
[out] | IM | if stitch_all = true #VV list from 0 to #VV-1 elseif stitch_all = false #VV list of indices into VV of unique vertices. |
void igl::copyleft::cgal::remesh_self_intersections | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const RemeshSelfIntersectionsParam & | params, | ||
Eigen::PlainObjectBase< DerivedVV > & | VV, | ||
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedIF > & | IF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedIM > & | IM | ||
) |
Given a triangle mesh (V,F) compute a new mesh (VV,FF) which is the same as (V,F) except that any self-intersecting triangles in (V,F) have been subdivided (new vertices and face created) so that the self-intersection contour lies exactly on edges in (VV,FF).
New vertices will appear in original faces or on original edges. New vertices on edges are "merged" only across original faces sharing that edge. This means that if the input triangle mesh is a closed manifold the output will be too.
[in] | V | #V by 3 list of vertex positions |
[in] | F | #F by 3 list of triangle indices into V |
[in] | params | struct of optional parameters |
[out] | VV | #VV by 3 list of vertex positions |
[out] | FF | #FF by 3 list of triangle indices into VV |
[out] | IF | #intersecting face pairs by 2 list of intersecting face pairs, indexing F |
[out] | J | #FF list of indices into F denoting birth triangle |
[out] | IM | #VV list of indices into VV of unique vertices. |
// resolve intersections igl::copyleft::cgal::remesh_self_intersections(V,F,params,VV,FF,IF,J,IM); // apply duplicate vertex mapping IM to FF for_each(FF.data(),FF.data()+FF.size(),[&IM](int & a){a=IM(a);}); // remove any vertices now unreferenced after duplicate mapping. igl::remove_unreferenced(VV,FF,SV,SF,UIM); // Now (SV,SF) is ready to extract outer hull igl::copyleft::cgal::outer_hull(SV,SF,G,J,flip);
void igl::copyleft::cgal::remesh_self_intersections | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedF > & | F, | ||
const RemeshSelfIntersectionsParam & | params, | ||
Eigen::PlainObjectBase< DerivedVV > & | VV, | ||
Eigen::PlainObjectBase< DerivedFF > & | FF, | ||
Eigen::PlainObjectBase< DerivedIF > & | IF, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.IM above is applied to merge duplicated vertices in VV.
void igl::copyleft::cgal::resolve_intersections | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedVI > & | VI, | ||
Eigen::PlainObjectBase< DerivedEI > & | EI, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedIM > & | IM | ||
) |
Given a list of possible intersecting segments with endpoints, split segments to overlap only at endpoints.
[in] | V | #V by 2 list of vertex positions |
[in] | E | #E by 2 list of segment indices into V |
[out] | VI | #VI by 2 list of output vertex positions, copies of V are always the first #V vertices |
[out] | EI | #EI by 2 list of segment indices into V, #EI ≥ #E |
[out] | J | #EI list of indices into E revealing "parent segments" |
[out] | IM | #VI list of indices into VV of unique vertices. |
CGAL::Point_2< Kernel > igl::copyleft::cgal::row_to_point | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const typename DerivedV::Index & | i | ||
) |
Extract a row from V and treat as a 2D cgal point (only first two columns of V are used).
[in] | V | #V by 2 list of vertex positions |
[in] | i | row index |
bool igl::copyleft::cgal::segment_segment_squared_distance | ( | const CGAL::Segment_3< Kernel > & | S1, |
const CGAL::Segment_3< Kernel > & | S2, | ||
CGAL::Point_3< Kernel > & | P1, | ||
CGAL::Point_3< Kernel > & | P2, | ||
typename Kernel::FT & | d | ||
) |
Given two segments S1 and S2 find the points on each of closest approach and the squared distance thereof.
[in] | S1 | first segment |
[in] | S2 | second segment |
[oout] | P1 point on S1 closest to S2 | |
[oout] | P2 point on S2 closest to S1 | |
[oout] | d distance betwee P1 and S2 |
bool igl::copyleft::cgal::signed_distance_isosurface | ( | const Eigen::MatrixXd & | IV, |
const Eigen::MatrixXi & | IF, | ||
const double | level, | ||
const double | angle_bound, | ||
const double | radius_bound, | ||
const double | distance_bound, | ||
const SignedDistanceType | sign_type, | ||
Eigen::MatrixXd & | V, | ||
Eigen::MatrixXi & | F | ||
) |
Compute the contour of an iso-level of the signed distance field to a given mesh.
[in] | IV | #IV by 3 list of input mesh vertex positions |
[in] | IF | #IF by 3 list of input triangle indices |
[in] | level | iso-level to contour in world coords, negative is inside. |
[in] | angle_bound | lower bound on triangle angles (mesh quality) (e.g. 28) |
[in] | radius_bound | upper bound on triangle size (mesh density?) (e.g. 0.02) |
[in] | distance_bound | cgal mysterious parameter (mesh density?) (e.g. 0.01) |
[in] | sign_type | method for computing distance sign (see ../signed_distance.h) |
[out] | V | #V by 3 list of input mesh vertex positions |
[out] | F | #F by 3 list of input triangle indices |
void igl::copyleft::cgal::snap_rounding | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedE > & | E, | ||
Eigen::PlainObjectBase< DerivedVI > & | VI, | ||
Eigen::PlainObjectBase< DerivedEI > & | EI, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Snap a list of possible intersecting segments with endpoints in any precision to the integer grid.
[in] | V | #V by 2 list of vertex positions |
[in] | E | #E by 2 list of segment indices into V |
[out] | VI | #VI by 2 list of output integer vertex positions, rounded copies of V are always the first #V vertices |
[out] | EI | #EI by 2 list of segment indices into V, #EI ≥ #E |
[out] | J | #EI list of indices into E revealing "parent segments" |
bool igl::copyleft::cgal::string_to_mesh_boolean_type | ( | const std::string & | s, |
MeshBooleanType & | type | ||
) |
Convert string to boolean type.
[in] | s | string identifying type, one of the following: "union","intersect","minus","xor","resolve" |
[out] | type | type of boolean operation |
MeshBooleanType igl::copyleft::cgal::string_to_mesh_boolean_type | ( | const std::string & | s | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns type without error handling
void igl::copyleft::cgal::subdivide_segments | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedE > & | E, | ||
const std::vector< std::vector< CGAL::Point_2< Kernel > > > & | steiner, | ||
Eigen::PlainObjectBase< DerivedVI > & | VI, | ||
Eigen::PlainObjectBase< DerivedEI > & | EI, | ||
Eigen::PlainObjectBase< DerivedJ > & | J, | ||
Eigen::PlainObjectBase< DerivedIM > & | IM | ||
) |
Insert steiner points to subdivide a given set of line segments.
[in] | V | #V by 2 list of vertex positions |
[in] | E | #E by 2 list of segment indices into V |
[in] | steiner | #E list of lists of unsorted steiner points (including endpoints) along the #E original segments |
[out] | VI | #VI by 2 list of output vertex positions, copies of V are always the first #V vertices |
[out] | EI | #EI by 2 list of segment indices into V, #EI ≥ #E |
[out] | J | #EI list of indices into E revealing "parent segments" |
[out] | IM | #VI list of indices into VV of unique vertices. |
void igl::copyleft::cgal::submesh_aabb_tree | ( | const Eigen::PlainObjectBase< DerivedV > & | V, |
const Eigen::PlainObjectBase< DerivedF > & | F, | ||
const Eigen::PlainObjectBase< DerivedI > & | I, | ||
CGAL::AABB_tree< CGAL::AABB_traits< Kernel, CGAL::AABB_triangle_primitive< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > & | tree, | ||
std::vector< typename Kernel::Triangle_3 > & | triangles, | ||
std::vector< bool > & | in_I | ||
) |
Build an AABB tree for a submesh indicated by a face selection list I of a full mesh (V,F)
[in] | V | #V by 3 array of vertices. |
[in] | F | #F by 3 array of faces. |
[in] | I | #I list of triangle indices to consider. |
[out] | tree | aabb containing triangles of (V,F(I,:)) |
[out] | triangles | #I list of cgal triangles |
[out] | in_I | #F list of whether in submesh |
bool igl::copyleft::cgal::triangle_triangle_squared_distance | ( | const CGAL::Triangle_3< Kernel > & | T1, |
const CGAL::Triangle_3< Kernel > & | T2, | ||
CGAL::Point_3< Kernel > & | P1, | ||
CGAL::Point_3< Kernel > & | P2, | ||
typename Kernel::FT & | d | ||
) |
Given two triangles T1 and T2 find the points on each of closest approach and the squared distance thereof.
[in] | T1 | first triangle |
[in] | T2 | second triangle |
[out] | P1 | point on T1 closest to T2 |
[out] | P2 | point on T2 closest to T1 |
[out] | d | distance betwee P1 and T2 |
void igl::copyleft::cgal::triangulate | ( | const Eigen::MatrixBase< DerivedV > & | V, |
const Eigen::MatrixBase< DerivedE > & | E, | ||
const Eigen::MatrixBase< DerivedH > & | H, | ||
const bool | retain_convex_hull, | ||
Eigen::PlainObjectBase< DerivedV2 > & | V2, | ||
Eigen::PlainObjectBase< DerivedF2 > & | F2 | ||
) |
Triangulate the interior of a polygon using CGAL.
[in] | V | #V by 2 list of 2D vertex positions |
[in] | E | #E by 2 list of vertex ids forming unoriented edges of the boundary of the polygon |
[in] | H | #H by 2 coordinates of points contained inside holes of the polygon |
[in] | retain_convex_hull | whether to retain convex hull {true} or trim away all faces reachable from infinite by traversing across non-constrained edges {false}. {true → "c" flag in triangle } |
[out] | V2 | #V2 by 2 coordinates of the vertives of the generated triangulation |
[out] | F2 | #F2 by 3 list of indices forming the faces of the generated triangulation |
void igl::copyleft::cgal::trim_with_solid | ( | const Eigen::PlainObjectBase< DerivedVA > & | VA, |
const Eigen::PlainObjectBase< DerivedFA > & | FA, | ||
const Eigen::PlainObjectBase< DerivedVB > & | VB, | ||
const Eigen::PlainObjectBase< DerivedFB > & | FB, | ||
Eigen::PlainObjectBase< DerivedV > & | Vd, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Given an arbitrary mesh (VA,FA) and the boundary mesh (VB,FB) of a solid (as defined in [Zhou et al.
2016]), Resolve intersections between A and B subdividing faces of A so that intersections with B exists only along edges and vertices (and coplanar faces). Then determine whether each of these faces is inside or outside of B. This can be used to extract the part of A inside or outside of B.
[in] | VA | #VA by 3 list of mesh vertex positions of A |
[in] | FA | #FA by 3 list of mesh triangle indices into VA |
[in] | VB | #VB by 3 list of mesh vertex positions of B |
[in] | FB | #FB by 3 list of mesh triangle indices into VB |
[out] | V | #V by 3 list of mesh vertex positions of output |
[out] | F | #F by 3 list of mesh triangle indices into V |
[out] | D | #F list of bools whether face is inside B |
[out] | J | #F list of indices into FA revealing birth parent |
void igl::copyleft::cgal::trim_with_solid | ( | const Eigen::PlainObjectBase< DerivedVA > & | VA, |
const Eigen::PlainObjectBase< DerivedFA > & | FA, | ||
const Eigen::PlainObjectBase< DerivedVB > & | VB, | ||
const Eigen::PlainObjectBase< DerivedFB > & | FB, | ||
const TrimWithSolidMethod | method, | ||
Eigen::PlainObjectBase< DerivedV > & | Vd, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedD > & | D, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
[in] | method | which method for extracting and determining the trim contents. |
void igl::copyleft::cgal::wire_mesh | ( | const Eigen::MatrixBase< DerivedWV > & | WV, |
const Eigen::MatrixBase< DerivedWE > & | WE, | ||
const Eigen::MatrixBase< Derivedth > & | th, | ||
const int | poly_size, | ||
const bool | solid, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
Construct a "wire" or "wireframe" or "strut" surface mesh, given a one-dimensional network of straight edges.
[in] | WV | #WV by 3 list of vertex positions |
[in] | WE | #WE by 2 list of edge indices into WV |
[in] | th | #WE diameter thicknesses of wire edges |
[in] | poly_size | number of sides on each wire (e.g., 4 would produce wires by connecting rectangular prisms). |
[in] | solid | whether to resolve self-intersections to create a "solid" output mesh (cf., [Zhou et al. 2016] |
[out] | V | #V by 3 list of output vertices |
[out] | F | #F by 3 list of output triangle indices into V |
[out] | J | #F list of indices into [0,#WV+#WE) revealing "birth simplex" of output faces J(j) < #WV means the face corresponds to the J(j)th vertex in WV. J(j) >= #WV means the face corresponds to the (J(j)-#WV)th edge in WE. |
void igl::copyleft::cgal::wire_mesh | ( | const Eigen::MatrixBase< DerivedWV > & | WV, |
const Eigen::MatrixBase< DerivedWE > & | WE, | ||
const double | th, | ||
const int | poly_size, | ||
const bool | solid, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
uniform th
void igl::copyleft::cgal::wire_mesh | ( | const Eigen::MatrixBase< DerivedWV > & | WV, |
const Eigen::MatrixBase< DerivedWE > & | WE, | ||
const double | th, | ||
const int | poly_size, | ||
Eigen::PlainObjectBase< DerivedV > & | V, | ||
Eigen::PlainObjectBase< DerivedF > & | F, | ||
Eigen::PlainObjectBase< DerivedJ > & | J | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Solid == true