SFCGAL 2.3.0
SFCGAL::triangulate::ConstraintDelaunayTriangulation Class Reference

2DZ constraint Delaunay triangulation More...

#include <ConstraintDelaunayTriangulation.h>

Classes

struct  VertexInfo
 vertex info in triangulation More...
struct  FaceInfo
 face information (depth) More...

Public Types

typedef CGAL::Triangulation_vertex_base_with_info_2< VertexInfo, Kernel > Triangulation_vertex_base
 CGAL vertex base type with info.
typedef CGAL::Triangulation_face_base_with_info_2< FaceInfo, Kernel > Triangulation_face_base
 CGAL face base type with info.
typedef CGAL::Constrained_triangulation_face_base_2< Kernel, Triangulation_face_base > Constrained_triangulation_face_base
 CGAL constrained triangulation face base.
typedef CGAL::Triangulation_data_structure_2< Triangulation_vertex_base, Constrained_triangulation_face_base > Triangulation_data_structure
 CGAL triangulation data structure type.
typedef CGAL::Constrained_Delaunay_triangulation_2< Kernel, Triangulation_data_structure, CGAL::Exact_predicates_tag > CDT
 CGAL constrained Delaunay triangulation type.
typedef CDT::Vertex_handle Vertex_handle
 Handle to vertex in triangulation.
using Face_handle = CDT::Face_handle
 Handle to face in triangulation.
typedef CDT::All_faces_iterator All_faces_iterator
 Iterator over all faces.
typedef CDT::Finite_faces_iterator Finite_faces_iterator
 Iterator over finite faces.

Public Member Functions

 ConstraintDelaunayTriangulation ()
 default constructor
auto addVertex (const Coordinate &position) -> Vertex_handle
 Add a vertex to the triangulation.
auto addConstraint (Vertex_handle source, Vertex_handle target) -> void
 Add a constraint edge to the triangulation.
auto clear () -> void
 clear the triangulation
auto numVertices () const -> size_t
 Returns the number of finite vertices.
auto numTriangles () const -> size_t
 Returns the number of finite faces.
auto hasProjectionPlane () const -> bool
 test if a projection plane is defined
auto setProjectionPlane (const Kernel::Plane_3 &projectionPlane) -> void
 define projection plane
auto projectionPlane () const -> Kernel::Plane_3
 get the projection plane (OXY if not defined)
auto isInfinite (Vertex_handle vertex) const -> bool
 test if the vertex is infinite
auto isInfinite (Face_handle face) const -> bool
 test if the face has infinite vertex
auto getTriangles (TriangulatedSurface &triangulatedSurface, bool filterExteriorParts=false) const -> void
 Append Triangles to a TriangulatedSurface.
auto getTriangulatedSurface () const -> std::unique_ptr< TriangulatedSurface >
 get the resulting TriangulatedSurface
auto finite_faces_begin () const -> Finite_faces_iterator
 get finite face iterator
auto finite_faces_end () const -> Finite_faces_iterator
 get finite face iterator
auto all_faces_begin () const -> All_faces_iterator
 get all face iterator
auto all_faces_end () const -> All_faces_iterator
 get all face iterator
auto markDomains () -> void
 fill nesting_level info in face info
auto cdt () -> CDT &
 [advanced]get the CGAL object
auto cdt () const -> const CDT &
 [advanced]get the CGAL object

Detailed Description

2DZ constraint Delaunay triangulation

Member Typedef Documentation

◆ All_faces_iterator

Iterator over all faces.

◆ CDT

typedef CGAL::Constrained_Delaunay_triangulation_2< Kernel, Triangulation_data_structure, CGAL::Exact_predicates_tag> SFCGAL::triangulate::ConstraintDelaunayTriangulation::CDT

CGAL constrained Delaunay triangulation type.

◆ Constrained_triangulation_face_base

CGAL constrained triangulation face base.

◆ Face_handle

Handle to face in triangulation.

◆ Finite_faces_iterator

Iterator over finite faces.

◆ Triangulation_data_structure

◆ Triangulation_face_base

CGAL face base type with info.

◆ Triangulation_vertex_base

CGAL vertex base type with info.

◆ Vertex_handle

Handle to vertex in triangulation.

Constructor & Destructor Documentation

◆ ConstraintDelaunayTriangulation()

SFCGAL::triangulate::ConstraintDelaunayTriangulation::ConstraintDelaunayTriangulation ( )
default

default constructor

Member Function Documentation

◆ addConstraint()

void SFCGAL::triangulate::ConstraintDelaunayTriangulation::addConstraint ( Vertex_handle source,
Vertex_handle target ) -> void

Add a constraint edge to the triangulation.

Parameters
sourceThe source vertex handle
targetThe target vertex handle

◆ addVertex()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::addVertex ( const Coordinate & position) -> Vertex_handle

Add a vertex to the triangulation.

Parameters
positionThe coordinate position of the vertex
Returns
Handle to the added vertex

◆ all_faces_begin()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::all_faces_begin ( ) const -> All_faces_iterator
inline

get all face iterator

Returns
Iterator to beginning of all faces

◆ all_faces_end()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::all_faces_end ( ) const -> All_faces_iterator
inline

get all face iterator

Returns
Iterator to end of all faces

◆ cdt() [1/2]

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::cdt ( ) -> CDT &
inline

[advanced]get the CGAL object

Returns
Reference to the underlying CGAL triangulation

◆ cdt() [2/2]

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::cdt ( ) const -> const CDT &
inline

[advanced]get the CGAL object

Returns
Const reference to the underlying CGAL triangulation

◆ clear()

void SFCGAL::triangulate::ConstraintDelaunayTriangulation::clear ( ) -> void

clear the triangulation

◆ finite_faces_begin()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::finite_faces_begin ( ) const -> Finite_faces_iterator
inline

get finite face iterator

Returns
Iterator to beginning of finite faces

◆ finite_faces_end()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::finite_faces_end ( ) const -> Finite_faces_iterator
inline

get finite face iterator

Returns
Iterator to end of finite faces

◆ getTriangles()

void SFCGAL::triangulate::ConstraintDelaunayTriangulation::getTriangles ( TriangulatedSurface & triangulatedSurface,
bool filterExteriorParts = false ) const -> void

Append Triangles to a TriangulatedSurface.

Parameters
triangulatedSurfaceThe surface to append triangles to
filterExteriorPartsIf true, exclude exterior triangles

◆ getTriangulatedSurface()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::getTriangulatedSurface ( ) const -> std::unique_ptr< TriangulatedSurface >

get the resulting TriangulatedSurface

Returns
Unique pointer to the triangulated surface

◆ hasProjectionPlane()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::hasProjectionPlane ( ) const -> bool
inline

test if a projection plane is defined

Returns
True if a projection plane has been set

◆ isInfinite() [1/2]

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::isInfinite ( Face_handle face) const -> bool
inline

test if the face has infinite vertex

Parameters
faceThe face handle to test
Returns
True if the face has an infinite vertex

◆ isInfinite() [2/2]

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::isInfinite ( Vertex_handle vertex) const -> bool
inline

test if the vertex is infinite

Parameters
vertexThe vertex handle to test
Returns
True if the vertex is infinite

◆ markDomains()

void SFCGAL::triangulate::ConstraintDelaunayTriangulation::markDomains ( ) -> void

fill nesting_level info in face info

adapted from CGAL example

◆ numTriangles()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::numTriangles ( ) const -> size_t

Returns the number of finite faces.

Returns
The number of finite triangles in the triangulation

◆ numVertices()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::numVertices ( ) const -> size_t

Returns the number of finite vertices.

Returns
The number of finite vertices in the triangulation

◆ projectionPlane()

auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::projectionPlane ( ) const -> Kernel::Plane_3

get the projection plane (OXY if not defined)

Returns
The projection plane (defaults to OXY plane if not set)

◆ setProjectionPlane()

void SFCGAL::triangulate::ConstraintDelaunayTriangulation::setProjectionPlane ( const Kernel::Plane_3 & projectionPlane) -> void

define projection plane

Parameters
projectionPlaneThe 3D plane to use for projection