Geom Software - C++ Programming and Geometry Libraries
Fade2D Documentation pages v1.55
GEOM_FADE2D::ConstraintGraph2 Class Reference

ConstraintGraph2 is a set of Constraint Edges to be enforced. These are ConstraintSegment2 objects. More...

#include <ConstraintGraph2.h>

Public Member Functions

bool isPolygon () const
 Does the constraint graph form a closed polygon? More...
 
bool isOriented () const
 Are the segments of the constraint graph oriented? More...
 
void getPolygonVertices (std::vector< Point2 *> &vTriangulationPoints_)
 Get the vertices of the constraint segments. More...
 
ConstraintInsertionStrategy getInsertionStrategy () const
 Get the constraint insertion strategy. More...
 
bool isConstraint (Point2 *p0, Point2 *p1) const
 Check if an edge is a constraint. More...
 
void show (const std::string &name)
 Visualization. More...
 
void show (Visualizer2 *pVis, const Color &color)
 Visualization. More...
 
void getOriginalConstraintSegments (std::vector< ConstraintSegment2 *> &vConstraintSegments_) const
 Get the original ConstraintSegment2 objects. More...
 
void getChildConstraintSegments (std::vector< ConstraintSegment2 *> &vConstraintSegments_) const
 Get child ConstraintSegment2 objects. More...
 
Dt2 * getDt2 ()
 
void getDirectChildren (ConstraintSegment2 *pParent, ConstraintSegment2 *&pChild0, ConstraintSegment2 *&pChild1)
 Get direct children. More...
 

Protected Attributes

Dt2 * pDt2
 
GeomTest * pGeomPredicates
 
ConstraintInsertionStrategy cis
 
std::vector< ConstraintSegment2 * > vCSegParents
 
bool bIsPolygon
 
std::map< ConstraintSegment2 *, bool, func_ltDerefPtr< ConstraintSegment2 * > > mCSegReverse
 
std::map< Point2 *, size_t > mSplitPointNum
 
bool bIsOriented
 

Detailed Description

See also
createConstraint in the Fade2D class
crop_ignoreBike.jpg
Constraints in a triangulation

Member Function Documentation

◆ getChildConstraintSegments()

void GEOM_FADE2D::ConstraintGraph2::getChildConstraintSegments ( std::vector< ConstraintSegment2 *> &  vConstraintSegments_) const

Returns the current constraint segments, i.e., the original ones or, if splitted, their child segments.

◆ getDirectChildren()

void GEOM_FADE2D::ConstraintGraph2::getDirectChildren ( ConstraintSegment2 pParent,
ConstraintSegment2 *&  pChild0,
ConstraintSegment2 *&  pChild1 
)
Parameters
[in]pParentis a ConstraintSegment that may have been splitted
[out]pChild0,pChild1are the direct child segments of pParent. They can be alive or dead (splitted).

The children are returned in the correct order of the present ConstraintGraph2.

◆ getDt2()

Dt2* GEOM_FADE2D::ConstraintGraph2::getDt2 ( )
Returns
the Delaunay class it belongs to

◆ getInsertionStrategy()

ConstraintInsertionStrategy GEOM_FADE2D::ConstraintGraph2::getInsertionStrategy ( ) const
Returns
CIS_CONFORMING_DELAUNAY or CIS_CONSTRAINED_DELAUNAY

◆ getOriginalConstraintSegments()

void GEOM_FADE2D::ConstraintGraph2::getOriginalConstraintSegments ( std::vector< ConstraintSegment2 *> &  vConstraintSegments_) const

Get the original, ConstraintSegment2 objects. They are not subdivided but may be dead and have child segments (which may also be dead and have child segments...)

◆ getPolygonVertices()

void GEOM_FADE2D::ConstraintGraph2::getPolygonVertices ( std::vector< Point2 *> &  vTriangulationPoints_)

Use this method to retrieve the segments of the present object in form of a vector of vertices. If *this is a closed polygon, then the points are ordered and oriented in counterclockwise direction, e.g. (a,b,b,c,c,d,d,a). If the *this is not a polygon, then the segments are returned in the original direction.

Note
If it was necessary to split the constraint segments, then the splitted segments are returned. If, in the above example, the constraint segment (a,b) crosses some previously inserted point x, then the result is (a,x,x,b,b,c,c,d,d,a).

◆ isConstraint()

bool GEOM_FADE2D::ConstraintGraph2::isConstraint ( Point2 p0,
Point2 p1 
) const

Checks if the edge (p0,p1) is a constraint of *this

◆ isOriented()

bool GEOM_FADE2D::ConstraintGraph2::isOriented ( ) const
Returns
true if the constraint graph has been created with bOrientedSegments=true or if automatic reorientation was possible which is the case for simple polygons.

◆ isPolygon()

bool GEOM_FADE2D::ConstraintGraph2::isPolygon ( ) const
Returns
true when the present ConstraintGraph forms a closed polygon.
Note
This method won't check if it is a simple polygon (one without self-intersections).

◆ show() [1/2]

void GEOM_FADE2D::ConstraintGraph2::show ( const std::string &  name)

◆ show() [2/2]

void GEOM_FADE2D::ConstraintGraph2::show ( Visualizer2 pVis,
const Color color 
)

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