#include <transfrm.h>
Inheritance diagram for csTransform:
Public Methods | |
csTransform () | |
Initialize with the identity transformation. | |
csTransform (const csMatrix3 &other2this, const csVector3 &origin_pos) | |
Initialize with the given transformation. More... | |
const csMatrix3& | GetO2T () const |
Get 'other' to 'this' transformation matrix. More... | |
const csVector3& | GetO2TTranslation () const |
Get 'world' to 'this' translation. More... | |
const csVector3& | GetOrigin () const |
Get origin of transformed coordinate system. More... | |
virtual void | SetO2T (const csMatrix3 &m) |
Set 'other' to 'this' transformation matrix. More... | |
virtual void | SetO2TTranslation (const csVector3 &v) |
Set 'world' to 'this' translation. More... | |
void | SetOrigin (const csVector3 &v) |
Set origin of transformed coordinate system. More... | |
void | Translate (const csVector3 &v) |
Move the 'other' to 'this' translation by a specified amount. More... | |
csVector3 | Other2This (const csVector3 &v) const |
Transform vector in 'other' space v to a vector in 'this' space. More... | |
csVector3 | Other2ThisRelative (const csVector3 &v) const |
Convert vector v in 'other' space to a vector in 'this' space. More... | |
csPlane3 | Other2This (const csPlane3 &p) const |
Convert a plane in 'other' space to 'this' space. More... | |
csPlane3 | Other2ThisRelative (const csPlane3 &p) const |
Convert a plane in 'other' space to 'this' space. More... | |
void | Other2This (const csPlane3 &p, const csVector3 &point, csPlane3 &result) const |
Convert a plane in 'other' space to 'this' space. More... | |
csSphere | Other2This (const csSphere &s) const |
Convert a sphere in 'other' space to 'this' space. | |
Static Public Methods | |
csTransform | GetReflect (const csPlane3 &pl) |
Return a transform that represents a mirroring across a plane. More... | |
Protected Attributes | |
csMatrix3 | m_o2t |
Transformation matrix from 'other' space to 'this' space. | |
csVector3 | v_o2t |
Location of the origin for 'this' space. | |
Friends | |
csVector3 | operator * (const csVector3 &v, const csTransform &t) |
Apply a transformation to a 3D vector. More... | |
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... | |
csPlane3 | operator * (const csPlane3 &p, const csTransform &t) |
Apply a transformation to a Plane. More... | |
csPlane3 | operator * (const csTransform &t, const csPlane3 &p) |
Apply a transformation to a Plane. More... | |
csPlane3& | operator *= (csPlane3 &p, const csTransform &t) |
Apply a transformation to a Plane. More... | |
csSphere | operator * (const csSphere &p, const csTransform &t) |
Apply a transformation to a sphere. More... | |
csSphere | operator * (const csTransform &t, const csSphere &p) |
Apply a transformation to a sphere. More... | |
csSphere& | operator *= (csSphere &p, const csTransform &t) |
Apply a transformation to a sphere. More... | |
csMatrix3 | operator * (const csMatrix3 &m, const csTransform &t) |
Multiply a matrix with the transformation matrix. 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... |
The two coordinate systems are refered to as 'other' and 'this'. The transform defines a transformation from 'other' to 'this'.
|
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. |
|
Get 'other' to 'this' transformation matrix. This is the 3x3 matrix M from the transform equation T=M*(O-V). |
|
Get 'world' to 'this' translation. This is the vector V from the transform equation T=M*(O-V). This is equivalent to calling GetOrigin(). |
|
Get origin of transformed coordinate system. This is equivalent to calling GetO2TTranslation(). |
|
Return a transform that represents a mirroring across a plane. This function will return a csTransform which represents a reflection across the plane pl. |
|
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'. If 'p' is expressed as (N,D) (with N a vector for the A,B,C components of 'p') then this will return a new plane in 'result' which looks like (M*N,-(M*N)*point). |
|
Convert a plane in 'other' space to 'this' space. If 'p' is expressed as (N,D) (with N a vector for the A,B,C components of 'p') then this will return a new plane which looks like (M*N,D+(M*N)*(M*V)). |
|
Transform vector in 'other' space v to a vector in 'this' space. This is the basic transform function. This will calculate and return M*(v-V). |
|
Convert a plane in 'other' space to 'this' space. This version ignores translation. If 'p' is expressed as (N,D) (with N a vector for the A,B,C components of 'p') then this will return a new plane which looks like (M*N,D). |
|
Convert vector v in 'other' space to a vector in 'this' space. Use the origin of 'other' space. This will calculate and return M*v (so the translation or V of this transform is ignored). |
|
Set 'other' to 'this' transformation matrix. This is the 3x3 matrix M from the transform equation T=M*(O-V). Reimplemented in csCamera, csReversibleTransform, and csOrthoTransform. |
|
Set 'world' to 'this' translation. This is the vector V from the transform equation T=M*(O-V). This is equivalent to calling SetOrigin(). Reimplemented in csCamera. |
|
Set origin of transformed coordinate system. This is equivalent to calling SetO2TTranslation(). |
|
Move the 'other' to 'this' translation by a specified amount. Basically this will add 'v' to the origin or translation of this transform so that the new transform looks like T=M*(O-(V+v)). |
|
Combine two transforms, rightmost first. Given the following definitions:
Reimplemented in csReversibleTransform. |
|
Multiply a matrix with the transformation matrix. This will calculate and return M*m. |
|
Multiply a matrix with the transformation matrix. This will calculate and return m*M. |
|
Apply a transformation to a sphere. This corresponds exactly to calling t.Other2This(p). |
|
Apply a transformation to a sphere. This corresponds exactly to calling t.Other2This(p). |
|
Apply a transformation to a Plane. This corresponds exactly to calling t.Other2This(p). |
|
Apply a transformation to a Plane. This corresponds exactly to calling t.Other2This(p). |
|
Apply a transformation to a 3D vector. This corresponds exactly to calling t.Other2This (v). |
|
Apply a transformation to a 3D vector. This corresponds exactly to calling t.Other2This (v). |
|
Multiply a matrix with the transformation matrix. This corresponds exactly to m*=M. |
|
Apply a transformation to a sphere. This corresponds exactly to calling p = t.Other2This(p). |
|
Apply a transformation to a Plane. This corresponds exactly to calling p = t.Other2This(p). |
|
Apply a transformation to a 3D vector. This corresponds exactly to calling v = t.Other2This(v). |