|
| CoordinateFrame (const Any &any) |
|
Any | toAny () const |
|
bool | operator== (const CoordinateFrame &other) const |
|
bool | operator!= (const CoordinateFrame &other) const |
|
bool | fuzzyEq (const CoordinateFrame &other) const |
|
bool | fuzzyIsIdentity () const |
|
bool | isIdentity () const |
|
| CoordinateFrame () |
|
| CoordinateFrame (const Point3 &_translation) |
|
| CoordinateFrame (const Matrix3 &rotation, const Point3 &translation) |
|
| CoordinateFrame (const Matrix3 &rotation) |
|
| CoordinateFrame (const class UprightFrame &f) |
|
std::string | toXYZYPRDegreesString () const |
|
| CoordinateFrame (class BinaryInput &b) |
|
void | deserialize (class BinaryInput &b) |
|
void | serialize (class BinaryOutput &b) const |
|
| CoordinateFrame (const CoordinateFrame &other) |
|
CoordinateFrame | inverse () const |
|
| ~CoordinateFrame () |
|
class Matrix4 | toMatrix4 () const |
|
void | getXYZYPRRadians (float &x, float &y, float &z, float &yaw, float &pitch, float &roll) const |
|
void | getXYZYPRDegrees (float &x, float &y, float &z, float &yaw, float &pitch, float &roll) const |
|
std::string | toXML () const |
|
float | getHeading () const |
|
CoordinateFrame | toObjectSpace (const CoordinateFrame &c) const |
|
Vector4 | toObjectSpace (const Vector4 &v) const |
|
Vector4 | toWorldSpace (const Vector4 &v) const |
|
Point3 | pointToWorldSpace (const Point3 &v) const |
|
Point3 | pointToObjectSpace (const Point3 &v) const |
|
Vector3 | vectorToWorldSpace (const Vector3 &v) const |
|
Vector3 | normalToWorldSpace (const Vector3 &v) const |
|
class Ray | toObjectSpace (const Ray &r) const |
|
Ray | toWorldSpace (const Ray &r) const |
|
Frustum | toWorldSpace (const Frustum &f) const |
|
Vector3 | vectorToObjectSpace (const Vector3 &v) const |
|
Vector3 | normalToObjectSpace (const Vector3 &v) const |
|
void | pointToWorldSpace (const Array< Point3 > &v, Array< Point3 > &vout) const |
|
void | normalToWorldSpace (const Array< Vector3 > &v, Array< Vector3 > &vout) const |
|
void | vectorToWorldSpace (const Array< Vector3 > &v, Array< Vector3 > &vout) const |
|
void | pointToObjectSpace (const Array< Point3 > &v, Array< Point3 > &vout) const |
|
void | normalToObjectSpace (const Array< Vector3 > &v, Array< Vector3 > &vout) const |
|
void | vectorToObjectSpace (const Array< Vector3 > &v, Array< Vector3 > &vout) const |
|
void | toWorldSpace (const class AABox &b, class AABox &result) const |
|
class Box | toWorldSpace (const class AABox &b) const |
|
class Box | toWorldSpace (const class Box &b) const |
|
class Cylinder | toWorldSpace (const class Cylinder &b) const |
|
class Capsule | toWorldSpace (const class Capsule &b) const |
|
class Plane | toWorldSpace (const class Plane &p) const |
|
class Sphere | toWorldSpace (const class Sphere &b) const |
|
class Triangle | toWorldSpace (const class Triangle &t) const |
|
class Box | toObjectSpace (const AABox &b) const |
|
class Box | toObjectSpace (const Box &b) const |
|
class Plane | toObjectSpace (const Plane &p) const |
|
class Sphere | toObjectSpace (const Sphere &b) const |
|
Triangle | toObjectSpace (const Triangle &t) const |
|
CoordinateFrame | operator* (const CoordinateFrame &other) const |
|
CoordinateFrame | operator+ (const Vector3 &v) const |
|
CoordinateFrame | operator- (const Vector3 &v) const |
|
void | moveTowards (const CoordinateFrame &goal, float maxTranslation, float maxRotation) |
|
void | lookAt (const Point3 &target) |
|
void | lookAt (const Point3 &target, Vector3 up) |
|
Vector3 | lookVector () const |
|
class Ray | lookRay () const |
|
Vector3 | upVector () const |
|
Vector3 | rightVector () const |
|
Vector3 | leftVector () const |
|
CoordinateFrame | lerp (const CoordinateFrame &other, float alpha) const |
|
A rigid body RT (rotation-translation) transformation.
CoordinateFrame abstracts a 4x4 matrix that maps object space to world space:
v_world = C * v_object
CoordinateFrame::rotation is the upper 3x3 submatrix, CoordinateFrame::translation is the right 3x1 column. The 4th row is always [0 0 0 1], so it isn't stored. So you don't have to remember which way the multiplication and transformation work, it provides explicit toWorldSpace and toObjectSpace methods. Also, points, vectors (directions), and surface normals transform differently, so they have separate methods.
Some helper functions transform whole primitives like boxes in and out of object space.
Convert to Matrix4 using CoordinateFrame::toMatrix4. You can construct a CoordinateFrame from a Matrix4 using Matrix4::approxCoordinateFrame, however, because a Matrix4 is more general than a CoordinateFrame, some information may be lost.
- See also
- G3D::UprightFrame, G3D::PhysicsFrame, G3D::Matrix4, G3D::Quat