#include <CGAL/Polyhedral_envelope.h>
template<typename GeomTraits>
struct CGAL::Polyhedral_envelope< GeomTraits >
This class can be used to check if a query point, segment, or triangle is inside or outside a polyhedral envelope of a set of triangles, constructed for a given \( \epsilon \) distance tolerance.
The polyhedral envelope is the union of prisms obtained. See Section Polyhedral Envelope Containment Check for more details.
Template Parameters
GeomTraits a geometric traits class, model of Kernel
Examples Polygon_mesh_processing/polyhedral_envelope.cpp , Polygon_mesh_processing/polyhedral_envelope_mesh_containment.cpp , and Polygon_mesh_processing/polyhedral_envelope_of_triangle_soup.cpp .
typedef GeomTraits::Point_3 Point_3
bool is_empty () const
returns true
if the polyhedral envelope is empty and false
otherwise.
Polyhedral_envelope ()
Default constructor, envelope is empty.
Polyhedral_envelope (const Polyhedral_envelope < GeomTraits > &)=delete
Polyhedral_envelope < GeomTraits > & operator= (const Polyhedral_envelope < GeomTraits > &)=delete
Polyhedral_envelope < GeomTraits > & operator= (Polyhedral_envelope < GeomTraits > &&other) noexcept
Polyhedral_envelope (Polyhedral_envelope < GeomTraits > &&other)
template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
Polyhedral_envelope (const TriangleMesh &tmesh, double epsilon, const NamedParameters &np=parameters::default_values ())
Constructor with a triangulated surface mesh.
template<typename FaceRange , typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
Polyhedral_envelope (const FaceRange &face_range, const TriangleMesh &tmesh, double epsilon, const NamedParameters &np=parameters::default_values ())
Constructor using a subset of faces of a triangulated surface mesh.
template<typename PointRange , typename TriangleRange , typename NamedParameters = parameters::Default_named_parameters>
Polyhedral_envelope (const PointRange &points, const TriangleRange &triangles, double epsilon, const NamedParameters &np=parameters::default_values ())
Constructor with a triangle soup.
bool operator() (const Point_3 &query) const
returns true
, iff the query point is inside the polyhedral envelope.
bool operator() (const Point_3 &source, const Point_3 &target) const
returns true
, iff the query segment defined by the points source
and target
is inside the polyhedral envelope.
bool operator() (const Point_3 &t0, const Point_3 &t1, const Point_3 &t2) const
returns true
, iff the query triangle formed by the points t0
, t1
, and t2
is inside the polyhedral envelope.
template<typename TriangleMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool operator() (const TriangleMesh &tmesh, const NamedParameters &np=parameters::default_values ()) const
returns true
, iff all the triangles of tmesh
are inside the polyhedral envelope.
template<typename PointRange , typename TriangleRange , typename NamedParameters = parameters::Default_named_parameters>
bool operator() (const PointRange &points, const TriangleRange &triangles, const NamedParameters &np=parameters::default_values ()) const
returns true
, iff all the triangles in triangles
are inside the polyhedral envelope.
template<typename TriangleRange >
bool operator() (const TriangleRange &triangle_range) const
returns true
, iff all the triangles in triangle_range
are inside the polyhedral envelope.
◆ Polyhedral_envelope() [1/3]
template<typename GeomTraits >
template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
Constructor with a triangulated surface mesh.
Template Parameters
Parameters
tmesh a triangle mesh
epsilon the distance of the Minkowski sum hull
np an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
vertex_point_map
a property map associating points to the vertices of tmesh
Type: a class model of ReadablePropertyMap
with boost::graph_traits<PolygonMesh>::vertex_descriptor
as key type and Point_3
as value type
Default: boost::get(CGAL::vertex_point, tmesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t
must be available in TriangleMesh
.
face_epsilon_map
a property map associating to each face of tm
an epsilon value
Type: a class model of ReadablePropertyMap
with boost::graph_traits<TriangleMesh>::face_descriptor
as key type and double
as value type
Default: Use epsilon
for all faces
Note The triangle mesh gets copied internally, that is it can be modified after having passed as argument, while the queries are performed
◆ Polyhedral_envelope() [2/3]
template<typename GeomTraits >
template<typename FaceRange , typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
Constructor using a subset of faces of a triangulated surface mesh.
Template Parameters
Parameters
tmesh a triangle mesh
face_range the subset of faces to be considered when computing the polyhedron envelope
epsilon the distance of the Minkowski sum hull
np an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
vertex_point_map
a property map associating points to the vertices of tmesh
Type: a class model of ReadablePropertyMap
with boost::graph_traits<PolygonMesh>::vertex_descriptor
as key type and Point_3
as value type
Default: boost::get(CGAL::vertex_point, tmesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t
must be available in TriangleMesh
.
face_epsilon_map
a property map associating to each face of tm
an epsilon value
Type: a class model of ReadablePropertyMap
with boost::graph_traits<TriangleMesh>::face_descriptor
as key type and double
as value type
Default: Use epsilon
for all faces
Note The triangle mesh gets copied internally, that is it can be modified after having passed as argument, while the queries are performed
◆ Polyhedral_envelope() [3/3]
template<typename GeomTraits >
template<typename PointRange , typename TriangleRange , typename NamedParameters = parameters::Default_named_parameters>
Constructor with a triangle soup.
Template Parameters
Parameters
points points of the soup of triangles
triangles each element in the range describes a triangle as a triple of indices of the points in points
epsilon the distance of the Minkowski sum hull
np an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
point_map
face_epsilon_map
a property map associating to each triangle an epsilon value
Type: a class model of ReadablePropertyMap
with std::size_t
as key type and double
as value type
Default: Use epsilon
for all triangles
◆ operator()() [1/3]
template<typename GeomTraits >
template<typename PointRange , typename TriangleRange , typename NamedParameters = parameters::Default_named_parameters>
returns true
, iff all the triangles in triangles
are inside the polyhedral envelope.
Template Parameters
Parameters
points points of the soup of triangles
triangles each element in the range describes a triangle as a triple of indices of the points in points
np an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
◆ operator()() [2/3]
template<typename GeomTraits >
template<typename TriangleMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
returns true
, iff all the triangles of tmesh
are inside the polyhedral envelope.
Template Parameters
Parameters
tmesh a triangle mesh
np an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
vertex_point_map
a property map associating points to the vertices of tmesh
Type: a class model of ReadablePropertyMap
with boost::graph_traits<PolygonMesh>::vertex_descriptor
as key type and Point_3
as value type
Default: boost::get(CGAL::vertex_point, tmesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t
must be available in TriangleMesh
.
◆ operator()() [3/3]
template<typename GeomTraits >
template<typename TriangleRange >
returns true
, iff all the triangles in triangle_range
are inside the polyhedral envelope.
Template Parameters
Parameters
triangle_range a range of triangles