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

Constraint segment.

#include <ConstraintSegment2.h>

Public Member Functions

 ConstraintSegment2 (Point2 *p0_, Point2 *p1_, ConstraintInsertionStrategy cis_)
 
Point2getSrc () const
 Get the source point. More...
 
Point2getTrg () const
 Get the target point. More...
 
void kill ()
 Kill a constraint segment. More...
 
void unkill ()
 Reanimate a constraint segment. More...
 
bool isAlive () const
 
ConstraintInsertionStrategy getCIS () const
 
bool operator< (const ConstraintSegment2 &pOther) const
 operator<(..) Compares by vertex pointers
 
Point2insertAndSplit (const Point2 &splitPoint)
 Split a constraint segment. More...
 
bool split_combinatorialOnly (Point2 *pSplit)
 Split a constraint segment. More...
 
bool splitAndRemovePrev (const Point2 &split)
 Split a constraint segment. More...
 
void addOwner (ConstraintGraph2 *pOwner)
 Add an owner. More...
 
void removeOwner (ConstraintGraph2 *pOwner)
 Remove an owner Removes a specific ConstraintGraph2 as owner of the current ConstraintSegment2. Mostly for internal use.
 
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.
 
size_t getNumberOfOwners () const
 Return the number of owners Returns the number of ConstraintGraphs where the current ConstraintSegment2 is a member.
 
void setAdjacentArea (double adjacentArea_)
 Set adjacent area A customer specific method, not thought for public use. If the current constraint segment is a border segment, then the area of the (non-existing) outside triangle can manually be deposited here. This value is used by the extended meshing method when a grow factor is given or ignored if not set. More...
 
double getAdjacentArea () const
 Get adjacent area A customer specific method, not thought for public use. Returns a previously via setAdjacentArea(double adjacentArea_) deposited value. If not explicitly set, DBL_MAX is returned.
 

Protected Attributes

Point2p0
 
Point2p1
 
ConstraintInsertionStrategy cis
 
bool bAlive
 
std::set< ConstraintGraph2 * > sOwners
 
std::vector< ConstraintSegment2 * > vChildren
 
double adjacentArea
 

Friends

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

Member Function Documentation

void GEOM_FADE2D::ConstraintSegment2::addOwner ( ConstraintGraph2 pOwner)

Sets a specific ConstraintGraph2 as owner of the current ConstraintSegment2. internal use.

ConstraintInsertionStrategy GEOM_FADE2D::ConstraintSegment2::getCIS ( ) const
Returns
the constraint insertion strategy (CIS)
Point2* GEOM_FADE2D::ConstraintSegment2::getSrc ( ) const
Returns
the source point
Point2* GEOM_FADE2D::ConstraintSegment2::getTrg ( ) const
Returns
the source point
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.
bool GEOM_FADE2D::ConstraintSegment2::isAlive ( ) const
Returns
if the object is alive
void GEOM_FADE2D::ConstraintSegment2::kill ( )

internal use only, not exported. New, 13.2.2017

void GEOM_FADE2D::ConstraintSegment2::setAdjacentArea ( double  adjacentArea_)
Note
Only use if you know what you are doing.
bool GEOM_FADE2D::ConstraintSegment2::split_combinatorialOnly ( Point2 pSplit)

internal use only unless you do something very unusual

bool GEOM_FADE2D::ConstraintSegment2::splitAndRemovePrev ( const Point2 split)

internal use. Deprecated!

void GEOM_FADE2D::ConstraintSegment2::unkill ( )

internal use only, not exported. New, 13.2.2017


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