|
|
| Segment2 () |
| | Empty.
|
| | Segment2 (const Vector2 &, const Vector2 &) |
| | Creates a planar segment given end vertices.
|
| | Segment2 (const Segment &) |
| | Creates a planar segment given a three dimensional segment.
|
|
| ~Segment2 () |
| | Empty.
|
|
Vector2 | Vertex (int) const |
| | Return one of the end vertex of the axis.
|
|
Vector2 & | Vertex (int) |
| | Return one of the end vertex of the axis.
|
| Vector2 | VertexAt (const double &) const |
| | Compute a point on the segment.
|
|
Vector2 | Center () const |
| | Compute the center of the segment.
|
|
Vector2 | GetAxis () const |
| | Returns the normalized axis vector.
|
|
Box2 | GetBox () const |
| | Compute the bounding box of the segment.
|
| Vector2 | Orthogonal () const |
| | Compute an orthogonal vector to the segment.
|
| void | Translate (const Vector2 &) |
| | Translates a segment.
|
| void | Rotate (const Matrix2 &) |
| | Translates a segment.
|
| void | Scale (const double &) |
| | Uniformly scales a segment.
|
| Segment2 | Translated (const Vector2 &) const |
| | Translates a segment.
|
| Segment2 | Extended (const double &) const |
| | Extend the length of a segment by a given distance.
|
|
double | Length () const |
| | Return axis length.
|
| void | Draw (QGraphicsScene &, const QPen &=QPen()) const |
| | Draw a segment.
|
| void | DrawArrow (QGraphicsScene &, const double &, const QPen &=QPen(), const QBrush &=QBrush(QColor(255, 255, 255))) const |
| | Draw a segment as an arrow.
|
| double | R (const Vector2 &) const |
| | Compute the squared distance to the segment.
|
| double | R (const Vector2 &, double &) const |
| | Compute the squared distance to the axis edge characterized by its end points.
|
| Vector2 | Normal (const Vector2 &) const |
| | Compute the normal vector between a point and its projection onto the segment.
|
| bool | Intersect (const Segment2 &) const |
| | Test if two segments intersect.
|
| bool | Intersection (const Segment2 &, Vector2 &) const |
| | Compute the intersection between two segments.
|
| Segment2 | Shrinked (const double &) const |
| | Create a new segment by shrinking the current segment.
|
| static Vector2 | Intersect (const Vector2 &, const Vector2 &, const double, const double, const double=0.0) |
| | Compute the intersection between the line f(x)=y and a line such that f(a)=va and f(b)=vb, on the segment ab.
|
|
static constexpr const double | epsilon = 1e-8 |
| | Epsilon value for intersection test.
|
A segment primitve with a cubic falloff.