Fade2.5D Documentation pages v1.85
Delaunay Features
ConstraintSegment2 Class Reference

A ConstraintSegment2 represents a Constraint Edge. More...

#include <ConstraintSegment2.h>

Public Member Functions

Point2getSrc () const
 Get the first endpoint. More...
Point2getTrg () const
 Get the second endpoint. More...
bool isAlive () const
 Check if the present ConstraintSegment2 is alive. More...
ConstraintInsertionStrategy getCIS () const
 Get the Constraint Insertion Strategy (CIS) More...
bool operator< (const ConstraintSegment2 &pOther) const
 operator<(..) Compares the vertex pointers of the endpoints, not the length
Point2insertAndSplit (const Point2 &splitPoint)
 Split a constraint segment. More...
bool split_combinatorialOnly (Point2 *pSplit)
 Split a constraint segment. More...
void getChildrenRec (std::vector< ConstraintSegment2 * > &vChildConstraintSegments)
 Get all children Recursively retrieve all children of the current ConstraintSegment2.
void getChildrenAndSplitPoint (ConstraintSegment2 *&pCSeg0, ConstraintSegment2 *&pCSeg1, Point2 *&pSplitPoint)
 Get the children and the split point Retrieve the two direct children of the current ConstraintSegment2 as well as the split point.

Public Attributes

int label

Protected Attributes

ConstraintInsertionStrategy cis
bool bAlive
std::vector< ConstraintSegment2 * > vChildren

Static Protected Attributes

static int runningLabel


class ConstraintMgr
class ConstraintGraph2
std::ostream & operator<< (std::ostream &stream, const ConstraintSegment2 &cSeg)

Detailed Description

A ConstraintSegment2 represents a Constraint Edge.

A ConstraintSegment2 can belong to more than one ConstraintGraph2 object, thus it is unoriented. But the ConstraintGraph knows the orientation of its ConstraintSegment2's.

Member Function Documentation

◆ getCIS()

ConstraintInsertionStrategy ConstraintSegment2::getCIS ( ) const

Get the Constraint Insertion Strategy (CIS)

the constraint insertion strategy (CIS) of the present object

◆ getSrc()

Point2* ConstraintSegment2::getSrc ( ) const

Get the first endpoint.

the first vertex

◆ getTrg()

Point2* ConstraintSegment2::getTrg ( ) const

Get the second endpoint.

the second vertex

◆ insertAndSplit()

Point2* ConstraintSegment2::insertAndSplit ( const Point2 splitPoint)

Split a constraint segment.

Splits the ConstraintSegment2 (which must be alive) at splitPoint.

It may be impossible to represent a point on a certain line segment using floatingpoint arithmetic. Therefore it is highly recommended to split a ConstraintSegment2 object not just be inserting points into the triangulation but using the present method. It does not require that splitPoint is exactly on the segment.

A splitted ConstraintSegment2 is dead and it has two child segments (which may also be dead and have children). The class is organized as a binary tree.

◆ isAlive()

bool ConstraintSegment2::isAlive ( ) const

Check if the present ConstraintSegment2 is alive.

TRUE when the object is alive, FALSE otherwise

◆ split_combinatorialOnly()

bool ConstraintSegment2::split_combinatorialOnly ( Point2 pSplit)

Split a constraint segment.

internal use only (unless you do something very unusual)

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