libigl v2.5.0
Loading...
Searching...
No Matches
igl::copyleft::cgal Namespace Reference

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_UNIONBinaryUnion
 
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_INTERSECTBinaryIntersect
 
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_MINUSBinaryMinus
 
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_XORBinaryXor
 
typedef BinaryWindingNumberOperations< MESH_BOOLEAN_TYPE_RESOLVEBinaryResolve
 
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 &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.
 
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 &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).
 
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 &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.
 
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 Documentation

◆ BinaryUnion

◆ BinaryIntersect

◆ BinaryMinus

◆ BinaryXor

◆ BinaryResolve

◆ KeepInside

◆ KeepAll

Enumeration Type Documentation

◆ KeeperType

Types of Keep policies.

Enumerator
KEEP_INSIDE 

Keep only inside.

KEEP_ALL 

Keep everything.

◆ TrimWithSolidMethod

Enumerator
CHECK_EACH_FACE 

Resolve intersections only between A and B and then check whether every face in A is inside/outside of B.

(Included for debugging).

CHECK_EACH_PATCH 

Resolve intersections only between A and B, then separate into patches of connected faces — where connected means sharing an edge and not the same original face in A — then label each patch as inside or outside.

This should always be strictly equivalent in output and strictly fewer FLOPS than CHECK_EACH_FACE. There will be many tiny patches along the intersection of A and B.

RESOLVE_BOTH_AND_RESTORE_THEN_CHECK_EACH_PATCH 

Merge A and B into the same mesh and resolve all self-itnersections.

Then "undo" remeshing on faces of A not involved in intersections with B (i.e., self-intersections in A). Then seperate into patches based on connected faces — where connected means sharing a manifold edge — then label each aptch as inside or outside. Results in fewer patches than CHECK_EACH_PATCH but finding, meshing and mesh-undoing self-intersections in A can be costly. This could result in different output from CHECK_EACH_PATCH because of shared remeshing with (i.e., faces in A that both intersect B and other faces in A). If A has no self-intersections then I claim the outputs should be the same.

Function Documentation

◆ assign() [1/3]

template<typename DerivedC , typename DerivedD >
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.

Parameters
[in]Cmatrix of scalars
[in]slow_and_more_precisesee assign_scalar
[out]Dmatrix same size as C
See also
assign_scalar

◆ assign() [2/3]

template<typename DerivedC , typename DerivedD >
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.

◆ assign() [3/3]

template<typename ReturnScalar , typename DerivedC >
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.

◆ assign_scalar() [1/13]

template<typename RHS , typename LHS >
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.

Template Parameters
RHSright-hand side scalar type
LHSleft-hand side scalar type
Parameters
[in]rhsright-hand side scalar
[in]slow_and_more_precisewhen 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]lhsleft-hand side scalar

◆ assign_scalar() [2/13]

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.

◆ assign_scalar() [3/13]

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.

◆ assign_scalar() [4/13]

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.

Parameters
cgalThis is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ assign_scalar() [5/13]

void igl::copyleft::cgal::assign_scalar ( const double &  c,
double &  d 
)
Parameters
cThis is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ assign_scalar() [6/13]

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.

◆ assign_scalar() [7/13]

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.

◆ assign_scalar() [8/13]

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.

◆ assign_scalar() [9/13]

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.

◆ assign_scalar() [10/13]

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.

◆ assign_scalar() [11/13]

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.

◆ assign_scalar() [12/13]

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.

◆ assign_scalar() [13/13]

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.

◆ cell_adjacency()

template<typename DerivedC >
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.

Parameters
[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_cellsnumber 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}

◆ closest_facet() [1/3]

template<typename DerivedV , typename DerivedF , typename DerivedI , typename DerivedP , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename Kernel , typename DerivedR , typename DerivedS >
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.

Parameters
[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]treeAABB 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.
Note
The use of size_t here is a bad idea. These should just be int to avoid nonsense with windows.

◆ closest_facet() [2/3]

template<typename DerivedV , typename DerivedF , typename DerivedI , typename DerivedP , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivedR , typename DerivedS >
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.

◆ closest_facet() [3/3]

template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivedR , typename DerivedS >
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.

◆ complex_to_mesh()

template<typename Tr , typename DerivedV , typename DerivedF >
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)

Template Parameters
TrCGAL triangulation type, e.g. CGAL::Surface_mesh_default_triangulation_3
Parameters
[in]c2t32-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
Returns
true iff conversion was successful, failure can ok if CGAL code can't figure out ordering.

◆ component_inside_component() [1/2]

template<typename DerivedV , typename DerivedF , typename DerivedI >
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).

Precondition
Both components must represent closed, self-intersection free, non-degenerated surfaces that are the boundary of 3D volumes. In addition, (V1, F1, I1) must not intersect with (V2, F2, I2).
Parameters
[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
Returns
true iff (V1, F1, I1) is entirely inside of (V2, F2, I2).

◆ component_inside_component() [2/2]

template<typename DerivedV , typename DerivedF >
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.

◆ convex_hull() [1/2]

template<typename DerivedV , typename DerivedW , typename DerivedG >
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)

Parameters
[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

◆ convex_hull() [2/2]

template<typename DerivedV , typename DerivedF >
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.

◆ coplanar()

template<typename DerivedV >
bool igl::copyleft::cgal::coplanar ( const Eigen::MatrixBase< DerivedV > &  V)

Test whether all points are on same plane.

Parameters
[in]V#V by 3 list of 3D vertex positions
Returns
true if all points lie on the same plane

◆ delaunay_triangulation()

template<typename DerivedV , typename DerivedF >
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.

Parameters
[in]V#V by 2 list of vertex positions
[out]F#F by 3 of faces in Delaunay triangulation.

◆ extract_cells() [1/2]

template<typename DerivedV , typename DerivedF , typename DerivedP , typename DeriveduE , typename DerivedEMAP , typename DeriveduEC , typename DeriveduEE , typename DerivedC >
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).

Parameters
[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.
Returns
the number of cells

◆ extract_cells() [2/2]

template<typename DerivedV , typename DerivedF , typename DerivedC >
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.

◆ extract_cells_single_component()

template<typename DerivedV , typename DerivedF , typename DerivedP , typename DeriveduE , typename DeriveduEC , typename DeriveduEE , typename DerivedC >
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).

Parameters
[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.
Returns
number of components

◆ extract_feature() [1/2]

template<typename DerivedV , typename DerivedF , typename Derivedfeature_edges >
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.

Parameters
[in]V#V by 3 array of vertices.
[in]F#F by 3 array of faces.
[in]tolEdges 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:
  • Edge has dihedral angle larger than tol.
  • Edge is boundary.
  • Edge is non-manifold (i.e. it has more than 2 adjacent faces).

◆ extract_feature() [2/2]

template<typename DerivedV , typename DerivedF , typename DeriveduE , typename Derivedfeature_edges >
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 
)

◆ fast_winding_number() [1/2]

template<typename DerivedP , typename DerivedN , typename DerivedQ , typename BetaType , typename DerivedWN >
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

Parameters
[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]betaThis 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_orderthe order of the taylor expansion. We support 0,1,2.
[out]WN#Q by 1 list of windinng number values at each query point

◆ fast_winding_number() [2/2]

template<typename DerivedP , typename DerivedN , typename DerivedQ , typename DerivedWN >
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.

◆ half_space_box() [1/3]

template<typename DerivedV >
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).

Parameters
[in]Pplane 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

◆ half_space_box() [2/3]

template<typename Derivedp , typename Derivedn , typename DerivedV >
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.

Parameters
[in]p3d point on plane
[in]n3d vector of normal of plane pointing away from inside

◆ half_space_box() [3/3]

template<typename Derivedequ , typename DerivedV >
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.

Parameters
[in]equplane equation: a*x+b*y+c*z + d = 0

◆ hausdorff()

template<typename DerivedV , typename Kernel , typename Scalar >
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).

Parameters
[in]V3 by 3 list of corner positions so that V.row(i) is the position of the ith corner
[in]treeBCGAL's AABB tree containing triangle soup (VB,FB)
[in]TBlist of CGAL triangles in order of FB (for determining which was found in computation)
[out]llower bound on Hausdorff distance
[out]uupper bound on Hausdorff distance

◆ incircle()

template<typename Scalar >
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.

Parameters
[in]pa2D point on sphere
[in]pb2D point on sphere
[in]pc2D point on sphere
[in]pd2D point to test
Returns
1 if pd is inside of the oriented circle formed by pa,pb,pc. 0 if pd is co-circular with pa,pb,pc. -1 if pd is outside of the oriented circle formed by pa,pb,pc.

◆ insert_into_cdt()

template<typename Kernel >
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.

Parameters
[in]objCGAL::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]Pplane obj lies on and upon which the cdt is being performed
[in]cdtcurrent CDT, see output
[out]cdtCDT updated to contain constraints for the given object

◆ insphere()

template<typename Scalar >
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.

Parameters
[in]pa3D point on sphere
[in]pb3D point on sphere
[in]pc3D point on sphere
[in]pd3D point on sphere
[in]pe3D point to test
Returns
1 if pe is inside of the oriented sphere formed by pa,pb,pc,pd, 0 if pe is co-spherical with pa,pb,pc,pd, -1 if pe is outside of the oriented sphere formed by pa,pb,pc,pd.

◆ intersect_other() [1/2]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedIF , typename DerivedVVAB , typename DerivedFFAB , typename DerivedJAB , typename DerivedIMAB >
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.

Parameters
[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]paramswhether 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
Returns
true on success

◆ intersect_other() [2/2]

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.

Parameters
[in]first_onlywhether to only find first intersection

◆ intersect_with_half_space() [1/3]

template<typename DerivedV , typename DerivedF , typename Derivedp , typename Derivedn , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

Parameters
[in]V#V by 3 list of mesh vertex positions
[in]p3d point on plane
[in]n3d 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
Returns
true if mesh_boolean was succsesful

◆ intersect_with_half_space() [2/3]

template<typename DerivedV , typename DerivedF , typename Derivedequ , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

Parameters
[in]equplane equation: P(x,y,z) = a*x+b*y+c*z + d = 0, P(x,y,z) < 0 is inside.

◆ intersect_with_half_space() [3/3]

template<typename DerivedV , typename DerivedF , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

Parameters
[in]Pplane

◆ lexicographic_triangulation()

template<typename DerivedP , typename DerivedF >
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.

Parameters
[in]P#P by 2 list of vertex positions
[out]F#F by 3 of faces in lexicographic triangulation.

◆ mesh_boolean() [1/7]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

Parameters
[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]typetype 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
Returns
true if inputs induce a piecewise constant winding number field and type is valid
See also
mesh_boolean_cork, intersect_other, remesh_self_intersections

◆ mesh_boolean() [2/7]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

Parameters
[in]type_strstring describing type of boolean operation see mesh_boolean_type_to_funcs

◆ mesh_boolean() [3/7]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

Parameters
[in]wind_num_opfunction handle for filtering winding numbers from tuples of integer values to [0,1] outside/inside values
[in]keepfunction handle for determining if a patch should be "kept" in the output based on the winding number on either side

◆ mesh_boolean() [4/7]

template<typename DerivedV , typename DerivedF , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

Parameters
[in]Vlistk-long list of lists of mesh vertex positions
[in]Flistk-long list of lists of mesh face indices, so that Flist[i] indexes vertices in Vlist[i]
[in]wind_num_opfunction handle for filtering winding numbers from n-tuples of integer values to [0,1] outside/inside values
[in]keepfunction 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
Returns
true iff inputs induce a piecewise constant winding number field

◆ mesh_boolean() [5/7]

template<typename DerivedV , typename DerivedF , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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.

◆ mesh_boolean() [6/7]

template<typename DerivedVV , typename DerivedFF , typename Derivedsizes , typename DerivedVC , typename DerivedFC , typename DerivedJ >
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

Parameters
[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

◆ mesh_boolean() [7/7]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedVC , typename DerivedFC >
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.

◆ mesh_boolean_type_to_funcs()

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.

Parameters
[in]typeMeshBooleanType enum value
[out]wind_num_opfunction handle for filtering winding numbers from tuples of integer values to [0,1] outside/inside values
[out]keepfunction handle for determining if a patch should be "kept" in the output based on the winding number on either side
See also
string_to_mesh_boolean_type

◆ mesh_to_cgal_triangle_list()

template<typename DerivedV , typename DerivedF , typename Kernel >
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)

Parameters
[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

◆ mesh_to_polyhedron()

template<typename DerivedV , typename DerivedF , typename Polyhedron >
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.

Template Parameters
PolyhedronCGAL Polyhedron type (e.g. Polyhedron_3)
Parameters
[in]V#V by 3 list of vertex positions
[in]F#F by 3 list of triangle indices
[out]polycgal polyhedron
Returns
true only if (V,F) can be converted to a valid polyhedron (i.e. if (V,F) is vertex and edge manifold).

◆ minkowski_sum() [1/3]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedW , typename DerivedG , typename DerivedJ >
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.

Parameters
[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_overlapswhether 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

◆ minkowski_sum() [2/3]

template<typename DerivedVA , typename DerivedFA , typename sType , int sCols, int sOptions, typename dType , int dCols, int dOptions, typename DerivedW , typename DerivedG , typename DerivedJ >
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.

Parameters
[in]ssegment source endpoint in 3D
[in]dsegment source endpoint in 3D

◆ minkowski_sum() [3/3]

template<typename DerivedVA , typename DerivedFA , typename sType , int sCols, int sOptions, typename dType , int dCols, int dOptions, typename DerivedW , typename DerivedG , typename DerivedJ >
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.

◆ order_facets_around_edge() [1/2]

template<typename DerivedV , typename DerivedF , typename DerivedI >
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).

Parameters
[in]V#V by 3 list of vertices.
[in]F#F by 3 list of faces
[in]sIndex of source vertex.
[in]dIndex of destination vertex.
[in]adj_facesList of adjacent face signed indices.
[out]orderList of face indices that orders adjacent faces around edge (s, d) clockwise.

◆ order_facets_around_edge() [2/2]

template<typename DerivedV , typename DerivedF , typename DerivedI >
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.

Parameters
[in]pivot_pointA point that forms pivot with edge (s,d)

◆ order_facets_around_edges() [1/3]

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 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.

Parameters
[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.

◆ order_facets_around_edges() [2/3]

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 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.

◆ order_facets_around_edges() [3/3]

template<typename DerivedV , typename DerivedF , typename DeriveduE , typename uE2EType , typename uE2oEType , typename uE2CType >
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.

◆ orient2D()

template<typename Scalar >
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.

Parameters
[in]pa2D point on plane
[in]pb2D point on plane
[in]pc2D point to test
Returns
1 if pa,pb,pc,pd forms a triangle of positive area. 0 if pa,pb,pc,pd are coplanar. -1 if pa,pb,pc,pd forms a tet of negative area.

◆ orient3D()

template<typename Scalar >
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.

Parameters
[in]pa3D point on plane
[in]pb3D point on plane
[in]pc3D point on plane
[in]pd3D point to test
Returns
1 if pa,pb,pc,pd forms a tet of positive volume. 0 if pa,pb,pc,pd are coplanar. -1 if pa,pb,pc,pd forms a tet of negative volume.

◆ outer_edge()

template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType , typename DerivedA >
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."

Precondition
The input mesh must have all self-intersection resolved and no duplicated vertices. The correctness of the output depends on the fact that there is no edge overlap. See cgal::remesh_self_intersections.h for how to obtain such input.
Parameters
[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]v1index of the first end point of outer edge
[out]v2index of the second end point of outer edge
[out]A#A list of facets incident to the outer edge

◆ outer_facet() [1/2]

template<typename DerivedV , typename DerivedF , typename DerivedN , typename DerivedI , typename IndexType >
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."

Precondition
The input mesh must have all self-intersection resolved. I.e there is no duplicated vertices, no overlapping edge and no intersecting faces (the only exception is there could be topologically duplicated faces). See cgal::remesh_self_intersections.h for how to obtain such input.

This function differ from igl::outer_facet() in the fact this function is more robust because it does not rely on facet normals.

Parameters
[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]fIndex of the outer facet.
[out]flippedtrue iff the normal of f points inwards.

◆ outer_facet() [2/2]

template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType >
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.

◆ outer_hull()

template<typename DerivedV , typename DerivedF , typename DerivedHV , typename DerivedHF , typename DerivedJ , typename Derivedflip >
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).

Parameters
[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

◆ outer_hull_legacy()

template<typename DerivedV , typename DerivedF , typename DerivedG , typename DerivedJ , typename Derivedflip >
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].

Note
This doesn't require the input mesh to be piecewise constant winding number, but won't handle multiple non-nested connected components.
Parameters
[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)

◆ outer_vertex()

template<typename DerivedV , typename DerivedF , typename DerivedI , typename IndexType , typename DerivedA >
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."

Precondition
The input mesh must have all self-intersection resolved and no duplicated vertices. See cgal::remesh_self_intersections.h for how to obtain such input.
Parameters
[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_indexindex of outer vertex
[out]A#A list of facets incident to the outer vertex

◆ peel_outer_hull_layers()

template<typename DerivedV , typename DerivedF , typename DerivedI , typename Derivedflip >
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.

Parameters
[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.
Returns
number of peels

◆ peel_winding_number_layers()

template<typename DerivedV , typename DerivedF , typename DerivedW >
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.

Parameters
[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

◆ piecewise_constant_winding_number()

template<typename DerivedV , typename DerivedF >
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.

Parameters
[in]V#V by 3 list of mesh vertex positions
[in]F#F by 3 list of triangle indices into V
Returns
true if the mesh combinatorially induces a piecewise constant winding number field.

◆ point_areas() [1/2]

template<typename DerivedP , typename DerivedI , typename DerivedN , typename DerivedA , typename DerivedT >
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.

Note
This function should be implemented by pre-filtering I, rather than filtering in this function using N. In this case, the function would only take P and I as input.
Parameters
[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
See also
igl::knn

◆ point_areas() [2/2]

template<typename DerivedP , typename DerivedI , typename DerivedN , typename DerivedA >
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.

◆ point_mesh_squared_distance() [1/2]

template<typename Kernel , typename DerivedP , typename DerivedV , typename DerivedF , typename DerivedsqrD , typename DerivedI , typename DerivedC >
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)

Template Parameters
KernalCGAL computation and construction kernel (e.g. CGAL::Simple_cartesian<double>)
Parameters
[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

◆ point_mesh_squared_distance_precompute()

template<typename Kernel , typename DerivedV , typename DerivedF >
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

Parameters
[in]V#V by 3 list of vertex positions
[in]F#F by 3 list of triangle indices
[out]treeCGAL's AABB tree
[out]Tlist of CGAL triangles in order of F (for determining which was found in computation)

include/igl/copyleft/cgal/point_mesh_squared_distance.h

◆ point_mesh_squared_distance() [2/2]

template<typename Kernel , typename DerivedP , typename DerivedsqrD , typename DerivedI , typename DerivedC >
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.

Parameters
[in]P#P by 3 list of query point positions
[in]treeCGAL's AABB tree
[in]Tlist 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

◆ point_segment_squared_distance()

template<typename Kernel >
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.

Parameters
[in]P1point
[in]S2segment
[out]P2point on S2 closest to P1
[out]ddistance betwee P1 and S2

◆ point_solid_signed_squared_distance()

template<typename DerivedQ , typename DerivedVB , typename DerivedFB , typename DerivedD >
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.

Parameters
[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

◆ point_triangle_squared_distance()

template<typename Kernel >
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.

Parameters
[in]P1point
[in]T2triangle
[out]P2point on T2 closest to P1
[out]ddistance betwee P1 and T2

◆ points_inside_component() [1/2]

template<typename DerivedV , typename DerivedF , typename DerivedI , typename DerivedP , typename DerivedB >
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.

Precondition
The input mesh must be a closed, self-intersection free, non-degenerated surface. Queries points must be either inside or outside of the mesh (i.e. not on the surface of the mesh).
Parameters
[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.

◆ points_inside_component() [2/2]

template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedB >
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.

◆ polyhedron_to_mesh()

template<typename Polyhedron , typename DerivedV , typename DerivedF >
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)

Template Parameters
PolyhedronCGAL Polyhedron type (e.g. Polyhedron_3)
Parameters
[in]polycgal polyhedron
[out]V#V by 3 list of vertex positions
[out]F#F by 3 list of triangle indices

◆ projected_cdt() [1/2]

template<typename Kernel , typename Index >
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.

Parameters
[in]objectslist of objects. This should lie on the given plane (P), otherwise they are added to the cdt after their non-trivial projection
[in]Pplane upon which all objects lie and upon which the CDT is conducted
[out]verticeslist of vertices of the CDT mesh back on the 3D plane
[out]faceslist of list of triangle indices into vertices

◆ projected_cdt() [2/2]

template<typename Kernel , typename DerivedV , typename DerivedF >
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.

Parameters
[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

◆ projected_delaunay()

template<typename Kernel >
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.

Parameters
[in]Atriangle in 3D
[in]A_objects_3updated list of intersection objects for A
[out]cdtContrained delaunay triangulation in projected 2D plane

◆ propagate_winding_numbers() [1/2]

template<typename DerivedV , typename DerivedF , typename DerivedL , typename DerivedW >
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.

Parameters
[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.
Returns
true iff the input induces a piecewise-constant winding number field.
Note
This shouldn't need to be in igl::copyleft::cgal, it should instead take as input an index of the ambient cell and the winding number vector there.

◆ propagate_winding_numbers() [2/2]

template<typename DerivedV , typename DerivedF , typename DeriveduE , typename DeriveduEC , typename DeriveduEE , typename DerivedP , typename DerivedC , typename DerivedL , typename DerivedW >
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 
)

◆ read_triangle_mesh()

template<typename DerivedV , typename DerivedF >
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.

Parameters
[in]strpath to file
[out]Veigen double matrix #V by 3
[out]Feigen int matrix #F by 3
Returns
true iff success
See also
igl::read_triangle_mesh

◆ relabel_small_immersed_cells()

template<typename DerivedV , typename DerivedF , typename DerivedP , typename DerivedC , typename FT , typename DerivedW >
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.

Parameters
[in]V#V by 3 list of vertex positions.
[in]F#F by 3 list of triangle indices into V.
[in]num_patchesnumber of patches
[in]P#F list of patch ids.
[in]num_cellsnumber of cells
[in]C#P by 2 list of cell ids on each side of each patch.
[in]vol_thresholdVolume 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.

◆ remesh_intersections()

template<typename DerivedV , typename DerivedF , typename Kernel , typename DerivedVV , typename DerivedFF , typename DerivedJ , typename DerivedIM >
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)

Parameters
[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_allif 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]IMif stitch_all = true #VV list from 0 to #VV-1 elseif stitch_all = false #VV list of indices into VV of unique vertices.

◆ remesh_self_intersections() [1/2]

template<typename DerivedV , typename DerivedF , typename DerivedVV , typename DerivedFF , typename DerivedIF , typename DerivedJ , typename DerivedIM >
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.

Parameters
[in]V#V by 3 list of vertex positions
[in]F#F by 3 list of triangle indices into V
[in]paramsstruct 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.

Example.

// 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);

◆ remesh_self_intersections() [2/2]

template<typename DerivedV , typename DerivedF , typename DerivedVV , typename DerivedFF , typename DerivedIF , typename DerivedJ >
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.

◆ resolve_intersections()

template<typename DerivedV , typename DerivedE , typename DerivedVI , typename DerivedEI , typename DerivedJ , typename DerivedIM >
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.

Parameters
[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.

◆ row_to_point()

template<typename Kernel , typename DerivedV >
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).

Parameters
[in]V#V by 2 list of vertex positions
[in]irow index
Returns
2D cgal point

◆ segment_segment_squared_distance()

template<typename Kernel >
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.

Parameters
[in]S1first segment
[in]S2second segment
[oout]P1 point on S1 closest to S2
[oout]P2 point on S2 closest to S1
[oout]d distance betwee P1 and S2
Returns
true if the closest approach is unique.

◆ signed_distance_isosurface()

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.

Parameters
[in]IV#IV by 3 list of input mesh vertex positions
[in]IF#IF by 3 list of input triangle indices
[in]leveliso-level to contour in world coords, negative is inside.
[in]angle_boundlower bound on triangle angles (mesh quality) (e.g. 28)
[in]radius_boundupper bound on triangle size (mesh density?) (e.g. 0.02)
[in]distance_boundcgal mysterious parameter (mesh density?) (e.g. 0.01)
[in]sign_typemethod 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
Returns
true if complex_to_mesh is successful

◆ snap_rounding()

template<typename DerivedV , typename DerivedE , typename DerivedVI , typename DerivedEI , typename DerivedJ >
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.

Parameters
[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"

◆ string_to_mesh_boolean_type() [1/2]

bool igl::copyleft::cgal::string_to_mesh_boolean_type ( const std::string &  s,
MeshBooleanType type 
)

Convert string to boolean type.

Parameters
[in]sstring identifying type, one of the following: "union","intersect","minus","xor","resolve"
[out]typetype of boolean operation
Returns
true only on success

◆ string_to_mesh_boolean_type() [2/2]

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

◆ subdivide_segments()

template<typename DerivedV , typename DerivedE , typename Kernel , typename DerivedVI , typename DerivedEI , typename DerivedJ , typename DerivedIM >
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.

Parameters
[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.

◆ submesh_aabb_tree()

template<typename DerivedV , typename DerivedF , typename DerivedI , typename Kernel >
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)

Parameters
[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]treeaabb containing triangles of (V,F(I,:))
[out]triangles#I list of cgal triangles
[out]in_I#F list of whether in submesh

◆ triangle_triangle_squared_distance()

template<typename Kernel >
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.

Parameters
[in]T1first triangle
[in]T2second triangle
[out]P1point on T1 closest to T2
[out]P2point on T2 closest to T1
[out]ddistance betwee P1 and T2
Returns
true if the closest approach is unique.

◆ triangulate()

template<typename Kernel , typename DerivedV , typename DerivedE , typename DerivedH , typename DerivedV2 , typename DerivedF2 >
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.

Parameters
[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_hullwhether 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
See also
igl::triangle::triangulate

◆ trim_with_solid() [1/2]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedV , typename DerivedF , typename DerivedD , typename DerivedJ >
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.

Parameters
[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

◆ trim_with_solid() [2/2]

template<typename DerivedVA , typename DerivedFA , typename DerivedVB , typename DerivedFB , typename DerivedV , typename DerivedF , typename DerivedD , typename DerivedJ >
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.

Parameters
[in]methodwhich method for extracting and determining the trim contents.

◆ wire_mesh() [1/3]

template<typename DerivedWV , typename DerivedWE , typename Derivedth , typename DerivedV , typename DerivedF , typename DerivedJ >
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.

Parameters
[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_sizenumber of sides on each wire (e.g., 4 would produce wires by connecting rectangular prisms).
[in]solidwhether 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.

◆ wire_mesh() [2/3]

template<typename DerivedWV , typename DerivedWE , typename DerivedV , typename DerivedF , typename DerivedJ >
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

◆ wire_mesh() [3/3]

template<typename DerivedWV , typename DerivedWE , typename DerivedV , typename DerivedF , typename DerivedJ >
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