SFCGAL  2.3.0
Classes | Public Types | Public Member Functions | List of all members
SFCGAL::triangulate::ConstraintDelaunayTriangulation Class Reference

2DZ constraint Delaunay triangulation More...

#include <ConstraintDelaunayTriangulation.h>

Classes

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

Public Types

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

Public Member Functions

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

Detailed Description

2DZ constraint Delaunay triangulation

Member Typedef Documentation

Iterator over all faces.

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

CGAL constrained Delaunay triangulation type.

CGAL constrained triangulation face base.

Handle to face in triangulation.

Iterator over finite faces.

CGAL triangulation data structure type.

CGAL face base type with info.

CGAL vertex base type with info.

Handle to vertex in triangulation.

Constructor & Destructor Documentation

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

default constructor

Member Function Documentation

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
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
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::all_faces_begin ( ) const -> All_faces_iterator
inline

get all face iterator

Returns
Iterator to beginning of all faces
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::all_faces_end ( ) const -> All_faces_iterator
inline

get all face iterator

Returns
Iterator to end of all faces
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::cdt ( ) -> CDT &
inline

[advanced]get the CGAL object

Returns
Reference to the underlying CGAL triangulation
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::cdt ( ) const -> const CDT &
inline

[advanced]get the CGAL object

Returns
Const reference to the underlying CGAL triangulation
void SFCGAL::triangulate::ConstraintDelaunayTriangulation::clear ( ) -> void

clear the triangulation

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

get finite face iterator

Returns
Iterator to beginning of finite faces
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::finite_faces_end ( ) const -> Finite_faces_iterator
inline

get finite face iterator

Returns
Iterator to end of finite faces
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
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::getTriangulatedSurface ( ) const -> std::unique_ptr<TriangulatedSurface>

get the resulting TriangulatedSurface

Returns
Unique pointer to the triangulated surface
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::hasProjectionPlane ( ) const -> bool
inline

test if a projection plane is defined

Returns
True if a projection plane has been set
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
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
void SFCGAL::triangulate::ConstraintDelaunayTriangulation::markDomains ( ) -> void

fill nesting_level info in face info

adapted from CGAL example

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

Returns the number of finite faces.

Returns
The number of finite triangles in the triangulation
auto SFCGAL::triangulate::ConstraintDelaunayTriangulation::numVertices ( ) const -> size_t

Returns the number of finite vertices.

Returns
The number of finite vertices in the triangulation
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)
void SFCGAL::triangulate::ConstraintDelaunayTriangulation::setProjectionPlane ( const Kernel::Plane_3 &  projectionPlane) -> void

define projection plane

Parameters
projectionPlaneThe 3D plane to use for projection