A ConstraintSegment2 represents a Constraint Edge. More...
#include <ConstraintSegment2.h>
Public Member Functions | |
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. | |
void | getChildrenRec (std::vector< ConstraintSegment2 * > &vChildConstraintSegments) |
Get all children Recursively retrieve all children of the current ConstraintSegment2. | |
ConstraintInsertionStrategy | getCIS () const |
Get the Constraint Insertion Strategy (CIS) More... | |
int | getLabel () const |
std::string | getLabelString () const |
Point2 * | getSrc () const |
Get the first endpoint. More... | |
Point2 * | getTrg () const |
Get the second endpoint. More... | |
Point2 * | insertAndSplit (const Point2 &splitPoint) |
Split a constraint segment. More... | |
bool | isAlive () const |
Check if the present ConstraintSegment2 is alive. More... | |
bool | operator< (const ConstraintSegment2 &pOther) const |
operator<(..) Compares the vertex pointers of the endpoints, not the length | |
bool | split_combinatorialOnly (Point2 *pSplit) |
Split a constraint segment. More... | |
Public Attributes | |
int | label |
Static Public Attributes | |
static int | runningLabel |
Protected Attributes | |
bool | bAlive |
ConstraintInsertionStrategy | cis |
Point2 * | p0 |
Point2 * | p1 |
std::vector< ConstraintSegment2 * > | vChildren |
Friends | |
class | ConstraintGraph2 |
class | ConstraintMgr |
std::ostream & | operator<< (std::ostream &stream, const ConstraintSegment2 &cSeg) |
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.
ConstraintInsertionStrategy GEOM_FADE2D::ConstraintSegment2::getCIS | ( | ) | const |
Get the Constraint Insertion Strategy (CIS)
Point2* GEOM_FADE2D::ConstraintSegment2::getSrc | ( | ) | const |
Get the first endpoint.
Point2* GEOM_FADE2D::ConstraintSegment2::getTrg | ( | ) | const |
Get the second endpoint.
Split a constraint segment.
Splits the ConstraintSegment2 (which must be alive) at splitPoint
.
It may be impossible to represent a point exactly on a 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.
bool GEOM_FADE2D::ConstraintSegment2::isAlive | ( | ) | const |
Check if the present ConstraintSegment2 is alive.
bool GEOM_FADE2D::ConstraintSegment2::split_combinatorialOnly | ( | Point2 * | pSplit | ) |
Split a constraint segment.
internal use only (unless you do something very unusual)