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

A ConstraintSegment2 represents a Constraint Edge. More...

#include <ConstraintSegment2.h>

Public Member Functions

 ConstraintSegment2 (Point2 *p0_, Point2 *p1_, ConstraintInsertionStrategy cis_)
 
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...
 
bool splitAndRemovePrev (const Point2 &split)
 
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.
 

Protected Attributes

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

Friends

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

Detailed Description

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 GEOM_FADE2D::ConstraintSegment2::getCIS ( ) const
Returns
the constraint insertion strategy (CIS) of the present object

◆ getSrc()

Point2* GEOM_FADE2D::ConstraintSegment2::getSrc ( ) const
Returns
the first vertex

◆ getTrg()

Point2* GEOM_FADE2D::ConstraintSegment2::getTrg ( ) const
Returns
the second vertex

◆ insertAndSplit()

Point2* GEOM_FADE2D::ConstraintSegment2::insertAndSplit ( const Point2 splitPoint)

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.

Note
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 GEOM_FADE2D::ConstraintSegment2::isAlive ( ) const
Returns
if the object is alive

◆ split_combinatorialOnly()

bool GEOM_FADE2D::ConstraintSegment2::split_combinatorialOnly ( Point2 pSplit)

internal use only (unless you do something very unusual)


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