![]() |
VR-Forces 4.6 Class Documentation
|
DtLine2D class DtLine2D is a templated class (typically for doing floats vs. More...

Public Member Functions | |
| DtLine2D (const DtVector2< T > &p1, const DtVector2< T > &p2) | |
| CTOR. | |
| DtLine2D (const DtLine2D< T > &orig) | |
| Copy CTOR. | |
| DtLine2D< T > & | operator= (const DtLine2D< T > &rhs) |
| virtual | ~DtLine2D () |
| DTOR. | |
| void | getPoints (DtVector2< T > &p1, DtVector2< T > &p2) const |
| Get / set the line as points. | |
| void | setPoints (const DtVector2< T > &p1, const DtVector2< T > &p2) |
| T | dX () const |
| Get the difference between x2 and x1. | |
| T | dY () const |
| Get the different between y2 and y1. | |
| T | length () const |
| Get the length of the line. | |
| T | lengthSquared () const |
| Get the length of the line squared. | |
| DtVector2< T > | pointAt (T t) |
| Get the point along the line at the parametric value supplied (between 0. | |
| DtVector2< T > | startPoint () const |
| Get / set the starting point of the line. | |
| void | setStartPoint (const DtVector2< T > &point) |
| DtVector2< T > | endPoint () const |
| Get / set the ending point of the line. | |
| void | setEndPoint (const DtVector2< T > &point) |
| void | getLine (T &x1, T &y1, T &x2, T &y2) const |
| void | setLine (T x1, T y1, T x2, T y2) |
| T | angle () const |
| Get the angle that the line makes with the horizontal, in radians. | |
| T | angleTo (const DtLine2D< T > &line) const |
| Get the angle that rotates this into into the same angle as the supplied line, in radians. | |
Protected Attributes | |
| DtVector2< T > | myStartPoint |
| DtVector2< T > | myEndPoint |
Private Member Functions | |
| DtLine2D () | |
| Unimplemented CTOR. | |
DtLine2D class DtLine2D is a templated class (typically for doing floats vs.
doubles) used to represent a 2D line segment (and some useful operations thereupon.
| makVrv::DtLine2D< T >::DtLine2D | ( | const DtVector2< T > & | p1, |
| const DtVector2< T > & | p2 | ||
| ) |
CTOR.
| makVrv::DtLine2D< T >::DtLine2D | ( | const DtLine2D< T > & | orig | ) |
Copy CTOR.
|
virtual |
DTOR.
|
private |
Unimplemented CTOR.
| DtLine2D< T > & makVrv::DtLine2D< T >::operator= | ( | const DtLine2D< T > & | rhs | ) |
References makVrv::DtLine2D< T >::myEndPoint, and makVrv::DtLine2D< T >::myStartPoint.
|
inline |
Get / set the starting point of the line.
|
inline |
|
inline |
Get / set the ending point of the line.
|
inline |
|
inline |
|
inline |
|
inline |
Get / set the line as points.
|
inline |
|
inline |
Get the difference between x2 and x1.
|
inline |
Get the different between y2 and y1.
|
inline |
Get the length of the line.
|
inline |
Get the length of the line squared.
|
inline |
Get the angle that the line makes with the horizontal, in radians.
Referenced by makVrv::DtLine2D< T >::angleTo().
|
inline |
Get the angle that rotates this into into the same angle as the supplied line, in radians.
References makVrv::DtLine2D< T >::angle().
|
inline |
Get the point along the line at the parametric value supplied (between 0.
and 1. inclusive)
|
protected |
Referenced by makVrv::DtLine2D< T >::operator=().
|
protected |
Referenced by makVrv::DtLine2D< T >::operator=().