A ConstraintSegment2 represents a constraint edge between two vertices of a Delaunay triangulation.
More...
#include <ConstraintSegment2.h>
|
|
class | ConstraintGraph2 |
| |
|
class | ConstraintMgr |
| |
|
CLASS_DECLSPEC friend std::ostream & | operator<< (std::ostream &stream, const ConstraintSegment2 &cSeg) |
| |
A Constraint Edge in a Constrained Delaunay triangulation
- A
ConstraintSegment2 represents a constraint edge between two vertices (Point2 objects) of a Fade_2D instance.
- It can belong to multiple ConstraintGraph2 objects, and thus it does not carry any orientation information. Instead, the ConstraintGraph2 objects it belongs to can provide its orientation.
- A ConstraintSegment2 can be split. In this case it is dead and has two children (which can be the case recursively).
◆ getChildrenAndSplitPoint()
This method retrieves the two child segments that result from splitting this ConstraintSegment2 as well as the point where the split occurred.
- Parameters
-
◆ getChildrenRec()
| CLASS_DECLSPEC void GEOM_FADE2D::ConstraintSegment2::getChildrenRec |
( |
std::vector< ConstraintSegment2 * > & |
vChildConstraintSegments | ) |
|
This method recursively collects all child ConstraintSegment2s of the current one that are still alive, meaning they have not been marked as "dead" due to being split.
- Parameters
-
| vChildConstraintSegments | A vector that will be populated with the child segments. |
◆ getCIS()
This function returns the constraint insertion strategy of the present ConstraintSegment2. CIS_CONSTRAINED_DELAUNAY is the only supported strategy. Other possible values are deprecated in favor of newer techniques.
- Returns
- The
ConstraintInsertionStrategy of this segment.
◆ getDirectChildren()
| CLASS_DECLSPEC void GEOM_FADE2D::ConstraintSegment2::getDirectChildren |
( |
std::vector< ConstraintSegment2 * > & |
vChildConstraintSegments | ) |
const |
This method retrieves the direct children of the current ConstraintSegment2s, regardless whether they are dead or alive.
- Parameters
-
| vChildConstraintSegments | A vector that will be populated with the child segments. |
◆ getSrc()
| CLASS_DECLSPEC Point2* GEOM_FADE2D::ConstraintSegment2::getSrc |
( |
| ) |
const |
- Returns
- A pointer to the first endpoint (
Point2 object).
◆ getTrg()
| CLASS_DECLSPEC Point2* GEOM_FADE2D::ConstraintSegment2::getTrg |
( |
| ) |
const |
- Returns
- A pointer to the second endpoint (
Point2 object).
◆ insertAndSplit()
| CLASS_DECLSPEC Point2* GEOM_FADE2D::ConstraintSegment2::insertAndSplit |
( |
const Point2 & |
splitPoint | ) |
|
This method splits the ConstraintSegment2 at the given splitPoint. After the operation, the current ConstraintSegment2 is marked as "dead" and has two child segments.
- Parameters
-
| [in] | splitPoint | The point at which to split the segment. |
- Returns
- A pointer to the inserted
Point2 (the splitPoint), or NULL if the operation fails.
- Note
- Always use this method to split a
ConstraintSegment2. Attempting to split the segment by simply inserting the splitPoint (e.g., using Fade_2D::insert(splitPoint)) will fail if the splitPoint and the two endpoints of the ConstraintSegment2 are not exactly collinear e.g., due to floating-point precision limitations. In contrast, this method accepts a non-collinear splitPoint as long as it has an orthogonal projection onto the segment.
◆ isAlive()
| CLASS_DECLSPEC bool GEOM_FADE2D::ConstraintSegment2::isAlive |
( |
| ) |
const |
This function checks whether the current ConstraintSegment2 object is "alive" or "dead."
- Returns
- Returns
true if the segment is alive, false otherwise.
◆ operator<()
| bool GEOM_FADE2D::ConstraintSegment2::operator< |
( |
const ConstraintSegment2 & |
pOther | ) |
const |
|
inline |
This operator compares two ConstraintSegment2 objects for sorting segments. The comparison is based on the pointers to their endpoints (p0 and p1), not the length of the ConstraintSegment2.
- Parameters
-
- Returns
true if the current segment is less than the other segment, false otherwise.
The documentation for this class was generated from the following file: