#include <transfrm.h>
Inheritance diagram for csReversibleTransform:
Public Methods | |
csReversibleTransform () | |
Initialize with the identity transformation. | |
csReversibleTransform (const csMatrix3 &o2t, const csVector3 &pos) | |
Initialize with the given transformation. More... | |
csReversibleTransform (const csTransform &t) | |
Initialize with the given transformation. | |
csReversibleTransform (const csReversibleTransform &t) | |
const csMatrix3& | GetT2O () const |
Get 'this' to 'other' transformation matrix. | |
csVector3 | GetT2OTranslation () const |
Get 'this' to 'other' translation. | |
csReversibleTransform | GetInverse () const |
Get the inverse of this transform. | |
virtual void | SetO2T (const csMatrix3 &m) |
Set 'other' to 'this' transformation matrix. | |
virtual void | SetT2O (const csMatrix3 &m) |
Set 'this' to 'other' transformation matrix. | |
csVector3 | This2Other (const csVector3 &v) const |
Convert vector v in 'this' space to 'other' space. More... | |
csVector3 | This2OtherRelative (const csVector3 &v) const |
Convert vector v in 'this' space to a vector in 'other' space, relative to local origin. | |
csPlane3 | This2Other (const csPlane3 &p) const |
Convert a plane in 'this' space to 'other' space. | |
csPlane3 | This2OtherRelative (const csPlane3 &p) const |
Convert a plane in 'this' space to 'other' space. More... | |
void | This2Other (const csPlane3 &p, const csVector3 &point, csPlane3 &result) const |
Convert a plane in 'this' space to 'other' space. More... | |
csSphere | This2Other (const csSphere &s) const |
Convert a sphere in 'this' space to 'other' space. | |
void | RotateOther (const csVector3 &v, float angle) |
Rotate the transform by the angle (radians) around the given vector, in other coordinates. More... | |
void | RotateThis (const csVector3 &v, float angle) |
Rotate the transform by the angle (radians) around the given vector, in these coordinates. More... | |
void | RotateOther (const csMatrix3 &m) |
Use the given transformation matrix, in other space, to reorient the transformation. More... | |
void | RotateThis (const csMatrix3 &m) |
Use the given transformation matrix, in this space, to reorient the transformation. More... | |
void | LookAt (const csVector3 &v, const csVector3 &up) |
Let this transform look at the given (x,y,z) point, using up as the up-vector. More... | |
Protected Methods | |
csReversibleTransform (const csMatrix3 &o2t, const csMatrix3 &t2o, const csVector3 &pos) | |
Initialize transform with both transform matrix and inverse tranform. | |
Protected Attributes | |
csMatrix3 | m_t2o |
Inverse transformation matrix ('this' to 'other' space). | |
Friends | |
csVector3 | operator/ (const csVector3 &v, const csReversibleTransform &t) |
Reverse a transformation on a 3D vector. | |
csVector3& | operator/= (csVector3 &v, const csReversibleTransform &t) |
Reverse a transformation on a 3D vector. | |
csPlane3 | operator/ (const csPlane3 &p, const csReversibleTransform &t) |
Reverse a transformation on a Plane. | |
csPlane3& | operator/= (csPlane3 &p, const csReversibleTransform &t) |
Reverse a transformation on a Plane. | |
csSphere | operator/ (const csSphere &p, const csReversibleTransform &t) |
Reverse a transformation on a sphere. | |
csReversibleTransform& | operator *= (csReversibleTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, with the rightmost being applied first. | |
csReversibleTransform | operator * (const csReversibleTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, with the rightmost being applied first. | |
csTransform | operator * (const csTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, with the rightmost being applied first. | |
csReversibleTransform& | operator/= (csReversibleTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, reversing t2 then applying t1. | |
csReversibleTransform | operator/ (const csReversibleTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, reversing t2 then applying t1. |
This version is similar to csTransform (in fact, it is a sub-class) but it is more efficient if you plan to do inverse transformations often.
|
Initialize with the given transformation. The transformation is given as a 3x3 matrix and a vector. The transformation is defined to mean T=M*(O-V) with T the vector in 'this' space, O the vector in 'other' space, M the transformation matrix and V the transformation vector. |
|
Let this transform look at the given (x,y,z) point, using up as the up-vector. 'v' should be given relative to the position of the origin of this transform. |
|
Use the given transformation matrix, in other space, to reorient the transformation. Note: this function rotates the transformation, not the coordinate system. |
|
Rotate the transform by the angle (radians) around the given vector, in other coordinates. Note: this function rotates the transform, not the coordinate system. |
|
Use the given transformation matrix, in this space, to reorient the transformation. Note: this function rotates the transformation, not the coordinate system. |
|
Rotate the transform by the angle (radians) around the given vector, in these coordinates. Note: this function rotates the tranform, not the coordinate system. |
|
Convert a plane in 'this' space to 'other' space. This is an optimized version for which a point on the new plane is known (point). The result is stored in 'result'. |
|
Convert vector v in 'this' space to 'other' space. This is the basic inverse transform operation. |
|
Convert a plane in 'this' space to 'other' space. This version ignores translation. |