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

ConstraintGraph2 is a set of enforced edges. More...

#include <ConstraintGraph2.h>

Public Member Functions

 ConstraintGraph2 (Dt2 *pDt2_, std::vector< ConstraintSegment2 * > &vCSegments, ConstraintInsertionStrategy)
 Internal use. More...
 ConstraintGraph2 (Dt2 *pDt2_, std::vector< ConstraintSegment2 * > &vCSegments_, std::map< std::pair< Point2 *, Point2 * >, bool > mPPReverse, ConstraintInsertionStrategy cis_)
 Internal use. More...
void init (std::vector< ConstraintSegment2 * > &vCSegments_)
 Internal use. More...
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 getOriginalConstraintSegments (std::vector< ConstraintSegment2 * > &vConstraintSegments_) const
 Get the original ConstraintSegment2 objects. More...
void getChildConstraintSegments (std::vector< ConstraintSegment2 * > &vConstraintSegments_) const
 Get child ConstraintSegment2 objects. More...
void updateSplittedConstraintSegment (ConstraintSegment2 *pCSeg, bool bDirChange0, bool bDirChange1, ConstraintSegment2 *pChild0, ConstraintSegment2 *pChild1, bool bUpdateCMGR)
 Update a constraint segment of *this Internal method.
Dt2 * getDt2 ()
void getAliveConstraintChain (std::vector< ConstraintSegment2 * > &vAliveCSeg)

Protected Member Functions

bool isReverse (ConstraintSegment2 *pCSeg) const
bool checkAndSortPolygon (std::vector< ConstraintSegment2 * > &vCSegments_)

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
Constraints in a triangulation

Constructor & Destructor Documentation

GEOM_FADE2D::ConstraintGraph2::ConstraintGraph2 ( Dt2 *  pDt2_,
std::vector< ConstraintSegment2 * > &  vCSegments,

Constructor for one or more ConstraintSegment2 objects

GEOM_FADE2D::ConstraintGraph2::ConstraintGraph2 ( Dt2 *  pDt2_,
std::vector< ConstraintSegment2 * > &  vCSegments_,
std::map< std::pair< Point2 *, Point2 * >, bool >  mPPReverse,
ConstraintInsertionStrategy  cis_ 

Constructor for one or more ConstraintSegment2 objects whose direction is given by mPPReverse. Used for bounded zones

Member Function Documentation

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.

Dt2* GEOM_FADE2D::ConstraintGraph2::getDt2 ( )
the Delaunay class it belongs to
ConstraintInsertionStrategy GEOM_FADE2D::ConstraintGraph2::getInsertionStrategy ( ) const
void GEOM_FADE2D::ConstraintGraph2::getOriginalConstraintSegments ( std::vector< ConstraintSegment2 * > &  vConstraintSegments_) const

Get the original, not subdivided ConstraintSegment2 objects. The ones which have been splitted are not alive anymore. But they have children (for which the same may hold).

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

Use this method to retrieve the segments of *this 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.

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).
void GEOM_FADE2D::ConstraintGraph2::init ( std::vector< ConstraintSegment2 * > &  vCSegments_)

Called by the two constructors

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

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

bool GEOM_FADE2D::ConstraintGraph2::isOriented ( ) const
true if the constraint graph has been created with bOrientedSegments=true or if automatic reorientation was possible which is the case for simple polygons.
bool GEOM_FADE2D::ConstraintGraph2::isPolygon ( ) const
This method does not check if it is a simple polygon (one without self-intersections).
void GEOM_FADE2D::ConstraintGraph2::show ( const std::string &  name)

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