![]() |
VR-Forces Developer's Guide
|
Defines a coordinate reference frame with three orthonormal basis vectors.
Public Member Functions | |
| DtCoordinateFrame () | |
| DtCoordinateFrame (const dvec3 &r, const dvec3 &f, const dvec3 &u) | |
| virtual | ~DtCoordinateFrame () |
| virtual const dvec3 & | right () const |
| virtual const dvec3 & | forward () const |
| virtual const dvec3 & | up () const |
| virtual void | setRight (const dvec3 &r) |
| virtual void | setForward (const dvec3 &f) |
| virtual void | setUp (const dvec3 &u) |
| virtual dvec3 | worldToLocal (const dvec3 &worldVector) const |
| virtual dvec3 | localToWorld (const dvec3 &localVector) const |
| virtual dvec3 | projectToHorizontalPlane (const dvec3 &vec) const |
| virtual double | projectToVerticalAxis (const dvec3 &vec) const |
Static Public Member Functions | |
| static DtCoordinateFrame | createENU () |
| static DtCoordinateFrame | createNED () |
| static DtCoordinateFrame | fromUpVector (const dvec3 &upDirection, const dvec3 &hint=dvec3(0.0, 1.0, 0.0)) |
Protected Attributes | |
| dvec3 | myRight |
| dvec3 | myForward |
| dvec3 | myUp |
| makVrv::DtCoordinateFrame::DtCoordinateFrame | ( | ) |
Default constructor. Sets up a standard East-North-Up frame.
Constructor with explicit basis vectors.
| r | Right vector (local X-axis). |
| f | Forward vector (local Y-axis). |
| u | Up vector (local Z-axis). |
|
virtual |
Destructor.
|
virtual |
Returns the right vector (local X-axis).
|
virtual |
Returns the forward vector (local Y-axis).
|
virtual |
Returns the up vector (local Z-axis).
|
virtual |
Sets the right vector.
|
virtual |
Sets the forward vector.
|
virtual |
Sets the up vector.
Transforms a vector from world space into this frame's local space.
| worldVector | Vector in world coordinates. |
Transforms a vector from local frame space into world space.
| localVector | Vector in local frame coordinates. |
|
virtual |
Projects a vector onto the horizontal plane.
| vec | Vector to project. |
Projects a vector onto the vertical axis.
| vec | Vector to project. |
|
static |
Creates an East-North-Up coordinate frame.
|
static |
Creates a North-East-Down coordinate frame.
|
static |
Creates a coordinate frame with the given up direction.
| upDirection | Desired up direction (normalised internally). |
| hint | Preferred forward direction hint. |
|
protected |
Right direction (local X-axis).
|
protected |
Forward direction (local Y-axis).
|
protected |
Up direction (local Z-axis).