CGAL 6.1.2 - Polygon Mesh Processing

Loading...
Searching...
No Matches
List of all members | Public Types | Public Member Functions
CGAL::Polyhedral_envelope< GeomTraits > Struct Template Reference
Reference Manual

`#include <CGAL/Polyhedral_envelope.h>`

## Definition

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.

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

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

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

  TriangleMesh | a model of `FaceListGraph`
  NamedParameters | a sequence of Named 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

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

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

  FaceRange | a model of `ConstRange` with `ConstRange::const_iterator` being a model of `InputIterator` with `boost::graph_traits<TriangleMesh>::face_descriptor` as value type
  TriangleMesh | a model of `FaceListGraph`
  NamedParameters | a sequence of Named 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

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

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

  PointRange | a model of the concept `ConstRange` with `PointRange::const_iterator` being a model of `InputIterator` with a point as value type
  TriangleRange | a 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`.
  NamedParameters | a sequence of Named 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

  a property map associating points to the elements of the range `points` Type: a model of `ReadablePropertyMap` whose value type is `Point_3` and whose key is the value type of `PointRange::const_iterator` Default: `CGAL::Identity_property_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 |

## Member Function Documentation

## ◆ operator()() [1/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

  PointRange | a model of the concept `ConstRange` with `PointRange::const_iterator` being a model of `InputIterator` with a point as value type
  TriangleRange | a 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`.
  NamedParameters | a sequence of Named 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

  a property map associating points to the elements of the range `points` Type: a model of `ReadablePropertyMap` whose value type is `Point_3` and whose key is the value type of `PointRange::const_iterator` Default: `CGAL::Identity_property_map` |

## ◆ operator()() [2/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

  TriangleMesh | a model of `FaceListGraph`
  NamedParameters | a sequence of Named Parameters

Parameters

  tmesh | a triangle mesh
  np | an 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()() [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

  TriangleRange | a 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_range | a range of triangles