CGAL 4.7 - Polygon Mesh Processing: CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization > Class Template Reference

\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.7 - Polygon Mesh Processing

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members | Public Member Functions
CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization > Class Template Reference
Polygon Mesh Processing Reference

`#include <CGAL/Polygon_mesh_slicer.h>`

## Definition

### template<class TriangleMesh, class Traits, class VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::type, class AABBTree = AABB_tree< AABB_traits<Traits, AABB_halfedge_graph_segment_primitive<TriangleMesh> > >, bool UseParallelPlaneOptimization = true>
class CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization >

Function object that computes the intersection of a plane with a triangulated surface mesh.

Template Parameters

  TriangleMesh | a triangulated surface mesh, model of `FaceGraph` and `HalfedgeListGraph`
  Traits | a model of `AABBGeomTraits`
  VertexPointMap | a model of `ReadablePropertyMap` with `boost::graph_traits<TriangleMesh>::vertex_descriptor` as key and `Traits::Point_3` as value type. The default is `typename boost::property_map< TriangleMesh, vertex_point_t>::type`.
  AABBTree | must be an instantiation of `CGAL::AABB_tree` able to handle the edges of `TriangleMesh`, having its `edge_descriptor` as primitive id. The default is `CGAL::AABB_tree<CGAL::AABB_traits< Traits, CGAL::AABB_halfedge_graph_segment_primitive<TriangleMesh> > >`
  UseParallelPlaneOptimization | if `true`, the code will use specific predicates and constructions in case the functor is called with a plane orthogonal to a frame axis, the non-null coefficient being 1 or -1. The default is `true`.

The implemenation of this class depends on the package 3D Fast Intersection and Distance Computation.

Examples:
  Polygon_mesh_processing/mesh_slicer_example.cpp.

## Public Member Functions

| Polygon_mesh_slicer (const TriangleMesh &tmesh, VertexPointMap vpmap, const Traits &traits=Traits())
| Constructor using `edges(tmesh)` to initialize the internal `AABB_tree`. More...
| Polygon_mesh_slicer (const TriangleMesh &tmesh, const AABBTree &tree, VertexPointMap vpmap, const Traits &traits=Traits())
| Constructor using a pre-built `AABB_tree` of edges provided by the user. More...
| Polygon_mesh_slicer (const TriangleMesh &tmesh, const Traits &traits=Traits())
| Constructor using `edges(tmesh)` to initialize the internal `AABB_tree`. More...
| Polygon_mesh_slicer (const TriangleMesh &tmesh, const AABBTree &tree, const Traits &traits=Traits())
| Constructor using a `AABB_tree` provided by the user. More...
template<class OutputIterator >
OutputIterator | operator() (const Plane_3 &plane, OutputIterator out) const
| Constructs the intersecting polylines of `plane` with the input triangulated surface mesh. More...

## Constructor & Destructor Documentation

template<class TriangleMesh, class Traits, class VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::type, class AABBTree = AABB_tree< AABB_traits<Traits, AABB_halfedge_graph_segment_primitive<TriangleMesh> > >, bool UseParallelPlaneOptimization = true>

CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization >::Polygon_mesh_slicer | ( | const TriangleMesh & | tmesh,
|  | VertexPointMap | vpmap,
|  | const Traits & | traits = `Traits()`
| ) |  |

Constructor using `edges(tmesh)` to initialize the internal `AABB_tree`.

Parameters

  tmesh | the triangulated surface mesh to be sliced. It must be valid and non modified as long as the functor is used.
  vpmap | an instance of the vertex point property map associated to `tmesh`
  traits | a traits class instance, can be omitted

template<class TriangleMesh, class Traits, class VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::type, class AABBTree = AABB_tree< AABB_traits<Traits, AABB_halfedge_graph_segment_primitive<TriangleMesh> > >, bool UseParallelPlaneOptimization = true>

CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization >::Polygon_mesh_slicer | ( | const TriangleMesh & | tmesh,
|  | const AABBTree & | tree,
|  | VertexPointMap | vpmap,
|  | const Traits & | traits = `Traits()`
| ) |  |

Constructor using a pre-built `AABB_tree` of edges provided by the user.

Parameters

  tmesh | the triangulated surface mesh to be sliced. It must be valid and non modified as long as the functor is used.
  tree | must be initialized with all the edges of `tmesh`
  vpmap | an instance of the vertex point property map associated to `tmesh`
  traits | a traits class instance, can be omitted

template<class TriangleMesh, class Traits, class VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::type, class AABBTree = AABB_tree< AABB_traits<Traits, AABB_halfedge_graph_segment_primitive<TriangleMesh> > >, bool UseParallelPlaneOptimization = true>

CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization >::Polygon_mesh_slicer | ( | const TriangleMesh & | tmesh,
|  | const Traits & | traits = `Traits()`
| ) |  |

Constructor using `edges(tmesh)` to initialize the internal `AABB_tree`.

The vertex point property map used is `get(CGAL::vertex_point, tmesh)`

Parameters

  tmesh | the triangulated surface mesh to be sliced. It must be valid and non modified as long as the functor is used.
  traits | a traits class instance, can be omitted

template<class TriangleMesh, class Traits, class VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::type, class AABBTree = AABB_tree< AABB_traits<Traits, AABB_halfedge_graph_segment_primitive<TriangleMesh> > >, bool UseParallelPlaneOptimization = true>

CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization >::Polygon_mesh_slicer | ( | const TriangleMesh & | tmesh,
|  | const AABBTree & | tree,
|  | const Traits & | traits = `Traits()`
| ) |  |

Constructor using a `AABB_tree` provided by the user.

The vertex point property map used is `get(CGAL::vertex_point, tmesh)`

Parameters

  tmesh | the triangulated surface mesh to be sliced. It must be valid and non modified as long as the functor is used.
  tree | must be initialized with all the edges of `tmesh`
  traits | a traits class instance, can be omitted

## Member Function Documentation

template<class TriangleMesh, class Traits, class VertexPointMap = typename boost::property_map< TriangleMesh, vertex_point_t>::type, class AABBTree = AABB_tree< AABB_traits<Traits, AABB_halfedge_graph_segment_primitive<TriangleMesh> > >, bool UseParallelPlaneOptimization = true>
template<class OutputIterator >

OutputIterator CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization >::operator() | ( | const Plane_3 & | plane,
|  | OutputIterator | out
| ) |  | const

Constructs the intersecting polylines of `plane` with the input triangulated surface mesh.

Template Parameters

  OutputIterator | an output iterator accepting polylines. A polyline is provided as `std::vector<Traits::Point_3>`. A polyline is closed if its first and last point are identical.

Parameters

  plane | the plane to intersect the triangulated surface mesh with
  out | output iterator of polylines