CGAL 5.5.3 - Polygon Mesh Processing
CGAL::Polyhedral_envelope< GeomTraits > Struct Template Reference

#include <CGAL/Polyhedral_envelope.h>

Definition

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

Public Types

typedef GeomTraits::Point_3 Point_3
 

Public Member Functions

bool is_empty () const
 returns true if the polyhedral envelope is empty and false otherwise.
 

Initialization

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

Query Operators

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. More...
 
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. More...
 
template<typename TriangleRange >
bool operator() (const TriangleRange &triangle_range) const
 returns true, iff all the triangles in triangle_range are inside the polyhedral envelope. More...
 

Constructor & Destructor Documentation

◆ Polyhedral_envelope() [1/3]

template<typename GeomTraits >
template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
CGAL::Polyhedral_envelope< GeomTraits >::Polyhedral_envelope ( const TriangleMesh &  tmesh,
double  epsilon,
const NamedParameters &  np = parameters::default_values() 
)

Constructor with a triangulated surface mesh.

Template Parameters
TriangleMesha model of FaceListGraph
NamedParametersa sequence of Named Parameters
Parameters
tmesha triangle mesh
epsilonthe distance of the Minkowski sum hull
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • 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.
  • 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 modifed 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>
CGAL::Polyhedral_envelope< GeomTraits >::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 Parameters
FaceRangea model of ConstRange with ConstRange::const_iterator being a model of InputIterator with boost::graph_traits<TriangleMesh>::face_descriptor as value type
TriangleMesha model of FaceListGraph
NamedParametersa sequence of Named Parameters
Parameters
tmesha triangle mesh
face_rangethe subset of faces to be considered when computing the polyhedron envelope
epsilonthe distance of the Minkowski sum hull
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • 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.
  • 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 modifed 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>
CGAL::Polyhedral_envelope< GeomTraits >::Polyhedral_envelope ( const PointRange &  points,
const TriangleRange &  triangles,
double  epsilon,
const NamedParameters &  np = parameters::default_values() 
)

Constructor with a triangle soup.

Template Parameters
PointRangea model of the concept ConstRange with PointRange::const_iterator being a model of InputIterator with a point as value type
TriangleRangea model of the concept ConstRange with TriangleRange::const_iterator being a model of InputIterator whose value type is model of the concept RandomAccessContainer whose value_type is convertible to std::size_t.
NamedParametersa sequence of Named Parameters
Parameters
pointspoints of the soup of triangles
triangleseach element in the range describes a triangle as a triple of indices of the points in points
epsilonthe distance of the Minkowski sum hull
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • 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

Member Function Documentation

◆ operator()() [1/3]

template<typename GeomTraits >
template<typename TriangleMesh , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::Polyhedral_envelope< GeomTraits >::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 Parameters
TriangleMesha model of FaceListGraph
NamedParametersa sequence of Named Parameters
Parameters
tmesha triangle mesh
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • 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()() [2/3]

template<typename GeomTraits >
template<typename PointRange , typename TriangleRange , typename NamedParameters = parameters::Default_named_parameters>
bool CGAL::Polyhedral_envelope< GeomTraits >::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 Parameters
PointRangea model of the concept ConstRange with PointRange::const_iterator being a model of InputIterator with a point as value type
TriangleRangea model of the concept ConstRange with TriangleRange::const_iterator being a model of InputIterator whose value type is model of the concept RandomAccessContainer whose value_type is convertible to std::size_t.
NamedParametersa sequence of Named Parameters
Parameters
pointspoints of the soup of triangles
triangleseach element in the range describes a triangle as a triple of indices of the points in points
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters

◆ operator()() [3/3]

template<typename GeomTraits >
template<typename TriangleRange >
bool CGAL::Polyhedral_envelope< GeomTraits >::operator() ( const TriangleRange &  triangle_range) const

returns true, iff all the triangles in triangle_range are inside the polyhedral envelope.

Template Parameters
TriangleRangea model of ConstRange with ConstRange::const_iterator being a model of InputIterator with a value type being itself a model of ConstRange with ConstRange::const_iterator being a model of InputIterator with Point_3 as value type.
Parameters
triangle_rangea range of triangles