CDT  1.4.2
C++ library for constrained Delaunay triangulation
 
Loading...
Searching...
No Matches
CDT::ICallbackHandler Class Reference

Interface for the callback handler that user can derive from and inject into the triangulation to monitor certain events or order aborting the calculation. More...

#include <Triangulation.h>

Public Member Functions

virtual ~ICallbackHandler ()
 Virtual destructor.
 
virtual void onAddSuperTriangle ()
 Called when super-triangle is added.
 
virtual void onInsertVertexInsideTriangle (const TriInd iRepurposedTri, const TriInd iNewTri1, const TriInd iNewTri2)
 Called when inserted vertex is inside a triangle.
 
virtual void onInsertVertexOnEdge (const TriInd iRepurposedTri1, const TriInd iRepurposedTri2, const TriInd iNewTri1, const TriInd iNewTri2)
 Called when inserted vertex is on an edge.
 
virtual void onFlipEdge (const TriInd iT, const TriInd iTopo)
 Called just before an edge between tro triangles is flipped.
 
virtual void onAddVertexStart (const VertInd iV, const AddVertexType::Enum vertexType)
 Called at the start of adding new vertex to the triangulation.
 
virtual void onAddEdgeStart (const Edge &edge)
 Called at the start of adding a constraint edge to the triangulation.
 
virtual void onReTriangulatePolygon (const std::vector< TriInd > &tris)
 Called when inserting a constraint edge causes polygon containing triangles to be re-triangulated @tris triangles in the polygon that will be re-triangulated and triangles re-purposed.
 
virtual bool isAbortCalculation () const
 Tells whether the user wants to abort the triangulation at the earliest opportunity.
 

Detailed Description

Interface for the callback handler that user can derive from and inject into the triangulation to monitor certain events or order aborting the calculation.

Definition at line 296 of file Triangulation.h.

Constructor & Destructor Documentation

◆ ~ICallbackHandler()

virtual CDT::ICallbackHandler::~ICallbackHandler ( )
inlinevirtual

Virtual destructor.

Definition at line 300 of file Triangulation.h.

Member Function Documentation

◆ isAbortCalculation()

virtual bool CDT::ICallbackHandler::isAbortCalculation ( ) const
inlinevirtual

Tells whether the user wants to abort the triangulation at the earliest opportunity.

Definition at line 381 of file Triangulation.h.

◆ onAddEdgeStart()

virtual void CDT::ICallbackHandler::onAddEdgeStart ( const Edge & edge)
inlinevirtual

Called at the start of adding a constraint edge to the triangulation.

Parameters
edgeconstraint that is added/enforced

Definition at line 365 of file Triangulation.h.

◆ onAddSuperTriangle()

virtual void CDT::ICallbackHandler::onAddSuperTriangle ( )
inlinevirtual

Called when super-triangle is added.

1.Added three new vertices with indices 0, 1, 2

  1. Added one a new triangle with an index 0

Definition at line 308 of file Triangulation.h.

◆ onAddVertexStart()

virtual void CDT::ICallbackHandler::onAddVertexStart ( const VertInd iV,
const AddVertexType::Enum vertexType )
inlinevirtual

Called at the start of adding new vertex to the triangulation.

Parameters
iVindex of the vertex
vertexTypewhat type of vertex is being added

Definition at line 358 of file Triangulation.h.

◆ onFlipEdge()

virtual void CDT::ICallbackHandler::onFlipEdge ( const TriInd iT,
const TriInd iTopo )
inlinevirtual

Called just before an edge between tro triangles is flipped.

Parameters
iTindex of the first triangle sharing an edge
iTopoindex of the second triangle sharing an edge

Definition at line 349 of file Triangulation.h.

◆ onInsertVertexInsideTriangle()

virtual void CDT::ICallbackHandler::onInsertVertexInsideTriangle ( const TriInd iRepurposedTri,
const TriInd iNewTri1,
const TriInd iNewTri2 )
inlinevirtual

Called when inserted vertex is inside a triangle.

The triangle is split in three: original trianlge is re-purposed and two new triangles are added

Parameters
iRepurposedTriindex of original triangle containing the point that will be modified (re-purposed)
iNewTri1index of first added new triangle
iNewTri2index of second added new triangle

Definition at line 320 of file Triangulation.h.

◆ onInsertVertexOnEdge()

virtual void CDT::ICallbackHandler::onInsertVertexOnEdge ( const TriInd iRepurposedTri1,
const TriInd iRepurposedTri2,
const TriInd iNewTri1,
const TriInd iNewTri2 )
inlinevirtual

Called when inserted vertex is on an edge.

Two triangles sharing an edge are split in four:original triangles are re-purposed and two new triangles are added.

Parameters
iRepurposedTri1index of first original triangle sharing an edge that will be modified (re-purposed)
iRepurposedTri2index of second original triangle sharing an edge that will be modified (re-purposed)
iNewTri1index of first added new triangle
iNewTri2index of second added new triangle

Definition at line 337 of file Triangulation.h.

◆ onReTriangulatePolygon()

virtual void CDT::ICallbackHandler::onReTriangulatePolygon ( const std::vector< TriInd > & tris)
inlinevirtual

Called when inserting a constraint edge causes polygon containing triangles to be re-triangulated @tris triangles in the polygon that will be re-triangulated and triangles re-purposed.

Definition at line 374 of file Triangulation.h.


The documentation for this class was generated from the following file: