Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <optransfrm.h>
Protected Member Functions | |
csReversibleTransform (const csMatrix3 &o2t, const csMatrix3 &t2o, const csVector3 &pos) | |
Protected Attributes | |
csMatrix3 | m_t2o |
Inverse transformation matrix ('this' to 'other' space). More... | |
![]() | |
csMatrix3 | m_o2t |
Transformation matrix from 'other' space to 'this' space. More... | |
csVector3 | v_o2t |
Location of the origin for 'this' space. More... | |
Friends | |
csVector3 | operator/ (const csVector3 &v, const csReversibleTransform &t) |
Reverse a transformation on a 3D vector. More... | |
csVector3 & | operator/= (csVector3 &v, const csReversibleTransform &t) |
Reverse a transformation on a 3D vector. More... | |
csReversibleTransform & | operator*= (csReversibleTransform &t1, const csReversibleTransform &t2) |
Reverse a transformation on a Plane. More... | |
csReversibleTransform | operator* (const csReversibleTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, with the rightmost being applied first. More... | |
csTransform | operator* (const csTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, with the rightmost being applied first. More... | |
csReversibleTransform & | operator/= (csReversibleTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, reversing t2 then applying t1. More... | |
csReversibleTransform | operator/ (const csReversibleTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, reversing t2 then applying t1. More... | |
A class which defines a reversible transformation from one coordinate system to another by maintaining an inverse transformation matrix. 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.
Definition at line 172 of file optransfrm.h.
|
inlineprotected |
Initialize transform with both transform matrix and inverse tranform.
Definition at line 181 of file optransfrm.h.
|
inline |
Initialize with the identity transformation.
Definition at line 188 of file optransfrm.h.
Referenced by GetInverse().
|
inline |
Daniel: I think that this matrix is in row major order... but it appears to look for the matrix that takes from world to object hence it is the transpose... transpose of transpose is identty...which is what I pass in below
Definition at line 193 of file optransfrm.h.
|
inline |
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.
Definition at line 210 of file optransfrm.h.
References csMatrix3::GetInverse(), csTransform::m_o2t, and m_t2o.
|
inline |
Initialize with the given transformation.
Definition at line 216 of file optransfrm.h.
References csMatrix3::GetInverse(), csTransform::m_o2t, and m_t2o.
|
inline |
|
inline |
Get the inverse of this transform.
Definition at line 235 of file optransfrm.h.
References csReversibleTransform(), csTransform::m_o2t, m_t2o, and csTransform::v_o2t.
|
inline |
Get 'this' to 'other' transformation matrix.
Definition at line 225 of file optransfrm.h.
References m_t2o.
Referenced by csOPCODECollider::Collide().
|
inline |
Get 'this' to 'other' translation.
Definition at line 230 of file optransfrm.h.
References csTransform::m_o2t, and csTransform::v_o2t.
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.
Convert a plane in 'this' space to 'other' space. Convert a plane in 'this' space to 'other' space. This version ignores translation. 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'. Rotate the transform by the angle (radians) around the given vector, in other coordinates. Note: this function rotates the transform, not the coordinate system.
|
inline |
Rotate the transform by the angle (radians) around the given vector, in these coordinates. Note: this function rotates the tranform, not the coordinate system.
|
inline |
|
inlinevirtual |
Set 'other' to 'this' transformation matrix.
Reimplemented from csTransform.
Reimplemented in csOrthoTransform.
Definition at line 241 of file optransfrm.h.
References csMatrix3::GetInverse(), csTransform::m_o2t, and m_t2o.
|
inlinevirtual |
Set 'this' to 'other' transformation matrix.
Reimplemented in csOrthoTransform.
Definition at line 247 of file optransfrm.h.
References csMatrix3::GetInverse(), csTransform::m_o2t, and m_t2o.
Referenced by RotateOther(), and RotateThis().
Convert vector v in 'this' space to 'other' space. This is the basic inverse transform operation.
Definition at line 254 of file optransfrm.h.
References m_t2o, v, and csTransform::v_o2t.
|
friend |
Combine two transforms, with the rightmost being applied first.
Definition at line 338 of file optransfrm.h.
|
friend |
Combine two transforms, with the rightmost being applied first.
|
friend |
Reverse a transformation on a Plane.
Reverse a transformation on a Plane. Combine two transforms, with the rightmost being applied first.
Definition at line 328 of file optransfrm.h.
|
friend |
Reverse a transformation on a 3D vector.
|
friend |
Combine two transforms, reversing t2 then applying t1.
|
friend |
Reverse a transformation on a 3D vector.
|
friend |
Combine two transforms, reversing t2 then applying t1.
|
protected |
Inverse transformation matrix ('this' to 'other' space).
Definition at line 176 of file optransfrm.h.
Referenced by csReversibleTransform(), GetInverse(), GetT2O(), RotateOther(), RotateThis(), SetO2T(), csOrthoTransform::SetO2T(), SetT2O(), csOrthoTransform::SetT2O(), This2Other(), and This2OtherRelative().