Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <optransfrm.h>
Public Member Functions | |
csTransform () | |
csTransform (const csMatrix3 &other2this, const csVector3 &origin_pos) | |
const csMatrix3 & | GetO2T () const |
const csVector3 & | GetO2TTranslation () const |
const csVector3 & | GetOrigin () const |
virtual void | SetO2T (const csMatrix3 &m) |
virtual void | SetO2TTranslation (const csVector3 &v) |
void | SetOrigin (const csVector3 &v) |
void | Translate (const csVector3 &v) |
csVector3 | Other2This (const csVector3 &v) const |
csVector3 | Other2ThisRelative (const csVector3 &v) const |
Protected Attributes | |
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 csTransform &t) |
csVector3 | operator* (const csTransform &t, const csVector3 &v) |
Apply a transformation to a 3D vector. More... | |
csVector3 & | operator*= (csVector3 &v, const csTransform &t) |
Apply a transformation to a 3D vector. More... | |
csMatrix3 | operator* (const csMatrix3 &m, const csTransform &t) |
Apply a transformation to a Plane. More... | |
csMatrix3 | operator* (const csTransform &t, const csMatrix3 &m) |
Multiply a matrix with the transformation matrix. More... | |
csMatrix3 & | operator*= (csMatrix3 &m, const csTransform &t) |
Multiply a matrix with the transformation matrix. More... | |
csTransform | operator* (const csTransform &t1, const csReversibleTransform &t2) |
Combine two transforms, rightmost first. More... | |
A class which defines a transformation from one coordinate system to another. The two coordinate systems are refered to as 'other' and 'this'. The transform defines a transformation from 'other' to 'this'.
Definition at line 33 of file optransfrm.h.
|
inline |
Initialize with the identity transformation.
Definition at line 45 of file optransfrm.h.
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 54 of file optransfrm.h.
|
inline |
Get 'other' to 'this' transformation matrix. This is the 3x3 matrix M from the transform equation T=M*(O-V).
Definition at line 61 of file optransfrm.h.
References m_o2t.
|
inline |
Get 'world' to 'this' translation. This is the vector V from the transform equation T=M*(O-V).
Definition at line 67 of file optransfrm.h.
References v_o2t.
Referenced by csOPCODECollider::Collide().
|
inline |
Get origin of transformed coordinate system.
Definition at line 72 of file optransfrm.h.
References v_o2t.
|
inlinevirtual |
Set 'other' to 'this' transformation matrix. this is the 3x3 matrix M from the transform equation T=M*(O-V).
Reimplemented in csOrthoTransform, and csReversibleTransform.
Definition at line 78 of file optransfrm.h.
References m_o2t.
|
inlinevirtual |
Set 'world' to 'this' translation. This is the vector V from the transform equation T=M*(O-V).
Definition at line 84 of file optransfrm.h.
Referenced by Unit::InsideCollideTree(), SetOrigin(), and Translate().
|
inline |
Set origin of transformed coordinate system.
Definition at line 89 of file optransfrm.h.
References SetO2TTranslation().
|
inline |
Move the 'other' to 'this' translation by a specified amount.
Definition at line 94 of file optransfrm.h.
References SetO2TTranslation(), and v_o2t.
|
friend |
Convert a plane in 'other' space to 'this' space. Convert a plane in 'other' space to 'this' space. This version ignores translation. Convert a plane in 'other' space to 'this' space. This is an optimized version for which a point on the new plane is known (point). The result is stored in 'result'. Apply a transformation to a 3D vector.
|
friend |
Apply a transformation to a 3D vector.
|
friend |
|
friend |
Multiply a matrix with the transformation matrix.
|
friend |
Combine two transforms, rightmost first.
|
friend |
Apply a transformation to a 3D vector.
|
friend |
Multiply a matrix with the transformation matrix.
|
protected |
Transformation matrix from 'other' space to 'this' space.
Definition at line 37 of file optransfrm.h.
Referenced by csReversibleTransform::csReversibleTransform(), csReversibleTransform::GetInverse(), GetO2T(), csReversibleTransform::GetT2OTranslation(), Other2This(), Other2ThisRelative(), SetO2T(), csReversibleTransform::SetO2T(), csOrthoTransform::SetO2T(), csReversibleTransform::SetT2O(), and csOrthoTransform::SetT2O().
|
protected |
Location of the origin for 'this' space.
Definition at line 39 of file optransfrm.h.
Referenced by csReversibleTransform::GetInverse(), GetO2TTranslation(), GetOrigin(), csReversibleTransform::GetT2OTranslation(), Other2This(), SetO2TTranslation(), csReversibleTransform::This2Other(), and Translate().