| Support Forum G3D Web Page |
An infinite 2D line.
More...
Public Member Functions | |
| Line2D () | |
| Undefined (provided for creating Array<Line2D> only) More... | |
| Line2D (class BinaryInput &b) | |
| virtual | ~Line2D () |
| Point2 | closestPoint (const Point2 &pt) const |
| Returns the closest point on the line to point. More... | |
| void | deserialize (class BinaryInput &b) |
| Vector2 | direction () const |
| Returns the direction (or negative direction) of the line. More... | |
| double | distance (const Point2 &point) const |
| Returns the distance between point and the line. More... | |
| Point2 | intersection (const Line2D &otherLine) const |
Returns the point where the lines intersect. More... | |
| Point2 | point () const |
| Returns a point on the line. More... | |
| void | serialize (class BinaryOutput &b) const |
Static Public Member Functions | |
| static Line2D | fromPointAndDirection (const Point2 &point, const Vector2 &direction) |
| Creates a line from a point and a (nonzero) direction. More... | |
| static Line2D | fromTwoPoints (const Point2 &point1, const Point2 &point2) |
| Constructs a line from two (not equal) points. More... | |
Protected Member Functions | |
| Line2D (const Point2 &point, const Vector2 &direction) | |
Protected Attributes | |
| Vector2 | m_direction |
| Point2 | m_point |
An infinite 2D line.
|
inline |
Undefined (provided for creating Array<Line2D> only)
Referenced by fromPointAndDirection(), and fromTwoPoints().
| G3D::Line2D::Line2D | ( | class BinaryInput & | b | ) |
|
inlinevirtual |
Returns the closest point on the line to point.
Referenced by distance().
| void G3D::Line2D::deserialize | ( | class BinaryInput & | b | ) |
| Vector2 G3D::Line2D::direction | ( | ) | const |
Returns the direction (or negative direction) of the line.
Referenced by fromPointAndDirection(), and Line2D().
|
inline |
Returns the distance between point and the line.
|
inlinestatic |
Creates a line from a point and a (nonzero) direction.
|
inlinestatic |
Constructs a line from two (not equal) points.
Returns the point where the lines intersect.
If there is no intersection, returns a point at infinity.
| Point2 G3D::Line2D::point | ( | ) | const |
Returns a point on the line.
Referenced by distance(), fromPointAndDirection(), and Line2D().
| void G3D::Line2D::serialize | ( | class BinaryOutput & | b | ) | const |
1.8.15