|
| SEG () |
| Create an empty (0, 0) segment.
|
|
| SEG (int aX1, int aY1, int aX2, int aY2) |
| Create a segment between (aX1, aY1) and (aX2, aY2).
|
|
| SEG (const VECTOR2I &aA, const VECTOR2I &aB) |
| Create a segment between (aA) and (aB).
|
|
| SEG (const VECTOR2I &aA, const VECTOR2I &aB, int aIndex) |
| Create a segment between (aA) and (aB), referenced to a multi-segment shape.
|
|
| SEG (const SEG &aSeg) |
| Copy constructor.
|
|
SEG & | operator= (const SEG &aSeg) |
|
bool | operator== (const SEG &aSeg) const |
|
bool | operator!= (const SEG &aSeg) const |
|
VECTOR2I | LineProject (const VECTOR2I &aP) const |
| Compute the perpendicular projection point of aP on a line passing through ends of the segment.
|
|
int | Side (const VECTOR2I &aP) const |
| Determine on which side of directed line passing via segment ends point aP lies.
|
|
int | LineDistance (const VECTOR2I &aP, bool aDetermineSide=false) const |
| Return the closest Euclidean distance between point aP and the line defined by the ends of segment (this).
|
|
double | AngleDegrees (const SEG &aOther) const |
| Determine the smallest angle between two segments (result in degrees)
|
|
const VECTOR2I | NearestPoint (const VECTOR2I &aP) const |
| Compute a point on the segment (this) that is closest to point aP.
|
|
const VECTOR2I | NearestPoint (const SEG &aSeg) const |
| Compute a point on the segment (this) that is closest to any point on aSeg.
|
|
const VECTOR2I | ReflectPoint (const VECTOR2I &aP) const |
| Reflect a point using this segment as axis.
|
|
OPT_VECTOR2I | Intersect (const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false) const |
| Compute intersection point of segment (this) with segment aSeg.
|
|
bool | Intersects (const SEG &aSeg) const |
|
OPT_VECTOR2I | IntersectLines (const SEG &aSeg) const |
| Compute the intersection point of lines passing through ends of (this) and aSeg.
|
|
SEG | PerpendicularSeg (const VECTOR2I &aP) const |
| Compute a segment perpendicular to this one, passing through point aP.
|
|
SEG | ParallelSeg (const VECTOR2I &aP) const |
| Compute a segment parallel to this one, passing through point aP.
|
|
bool | Collide (const SEG &aSeg, int aClearance, int *aActual=nullptr) const |
|
ecoord | SquaredDistance (const SEG &aSeg) const |
|
int | Distance (const SEG &aSeg) const |
| Compute minimum Euclidean distance to segment aSeg.
|
|
ecoord | SquaredDistance (const VECTOR2I &aP) const |
|
int | Distance (const VECTOR2I &aP) const |
| Compute minimum Euclidean distance to point aP.
|
|
void | CanonicalCoefs (ecoord &qA, ecoord &qB, ecoord &qC) const |
|
bool | Collinear (const SEG &aSeg) const |
| Check if segment aSeg lies on the same line as (this).
|
|
bool | ApproxCollinear (const SEG &aSeg) const |
|
bool | ApproxParallel (const SEG &aSeg, int aDistanceThreshold=1) const |
|
bool | ApproxPerpendicular (const SEG &aSeg) const |
|
bool | Overlaps (const SEG &aSeg) const |
|
bool | Contains (const SEG &aSeg) const |
|
int | Length () const |
| Return the length (this).
|
|
ecoord | SquaredLength () const |
|
ecoord | TCoef (const VECTOR2I &aP) const |
|
int | Index () const |
| Return the index of this segment in its parent shape (applicable only to non-local segments).
|
|
bool | Contains (const VECTOR2I &aP) const |
|
void | Reverse () |
|
SEG | Reversed () const |
| Returns the center point of the line.
|
|
VECTOR2I | Center () const |
|