Transform API documentation

Version: stable

FUNCTION
Apply() Apply the transform on a point (includes the trans...
Apply() Apply the transform on a vector (excludes the tran...
ApplyNoScaleZ() Apply the transform on a point, but without scalin...
ApplyNoScaleZ() Apply the transform on a vector, but without scali...
ExtractScale() Extract the absolute values of the scale component...
GetRotation() get rotatiom
GetScale() get scale
GetTranslation() get translation
GetUniformScale() Compute a 'uniform' scale for this transform. In t...
Inv() Invert a transform
Mul() Transforms the right-hand transform by the left-ha...
MulNoScaleZ() Transforms the right-hand transform by the left-ha...
MulNoScaleZ() Multiply two matrices without z-scaling the transl...
NormalizeZScale() Eliminate the z scaling components in a matrix
NormalizeZScale() Eliminate the z scaling components in a matrix
ResetScale() Eliminate the scaling components in a matrix
SetIdentity() initialize to identity transform
SetRotation() set rotatiom
SetScale() set scale
SetTranslation() set translation
SetUniformScale() set uniform scale
ToMatrix4() Convert a transform into a 4-dim matrix
ToTransform() Convert a matrix into a transform
Transform() Constructor. Leaves the struct in an uninitialized...
Transform() constructor
Transform() constructor

Functions

Apply()

Apply(t,p)

Apply the transform on a point (includes the transform translation).

PARAMETERS

t dmTransform::Transform& Transform
p dmVMath::Point3& Point

RETURNS

point dmVMath::Point3 Transformed point

Apply()

Apply(t,v)

Apply the transform on a vector (excludes the transform translation).

PARAMETERS

t dmTransform::Transform& Transform
v dmVMath::Vector3& Vector

RETURNS

point dmVMath::Vector3 Transformed vector

ApplyNoScaleZ()

ApplyNoScaleZ(t,p)

Apply the transform on a point, but without scaling the Z-component of the point (includes the transform translation).

PARAMETERS

t dmTransform::Transform& Transform
p dmVMath::Point3& Point

RETURNS

point dmVMath::Point3 Transformed point

ApplyNoScaleZ()

ApplyNoScaleZ(t,v)

Apply the transform on a vector, but without scaling the Z-component of the vector (excludes the transform translation).

PARAMETERS

t dmTransform::Transform& Transform
v dmVMath::Vector3& Vector

RETURNS

point dmVMath::Vector3 Transformed vector

ExtractScale()

ExtractScale(mtx)

Extract the absolute values of the scale component from a matrix.

PARAMETERS

mtx Source matrix

RETURNS

Vector3 with scale values for x,y,z

GetRotation()

GetRotation()

get rotatiom

PARAMETERS

None

RETURNS

rotation dmVMath::Quat

GetScale()

GetScale()

get scale

PARAMETERS

None

RETURNS

scale dmVMath::Vector3

GetTranslation()

GetTranslation()

get translation

PARAMETERS

None

RETURNS

translation dmVMath::Vector3

GetUniformScale()

GetUniformScale()

Compute a 'uniform' scale for this transform. In the event that the scale applied to this transform is not uniform then the value is arbitrary: we make a selection that will not introduce any floating point rounding errors.

PARAMETERS

None

RETURNS

scale float the uniform scale associated with this transform.

Inv()

Inv(t)

Invert a transform

PARAMETERS

t const dmTransform::Transform&

RETURNS

result dmTransform::Transform inverted transform

Mul()

Mul(lhs,rhs)

Transforms the right-hand transform by the left-hand transform

PARAMETERS

lhs const dmTransform::Transform&
rhs const dmTransform::Transform&

RETURNS

result dmTransform::Transform Transformed transform

MulNoScaleZ()

MulNoScaleZ(lhs,rhs)

Transforms the right-hand transform by the left-hand transform, without scaling the Z-component of the transition of the transformed transform

PARAMETERS

lhs const dmTransform::Transform&
rhs const dmTransform::Transform&

RETURNS

result dmTransform::Transform Transformed transform

MulNoScaleZ()

MulNoScaleZ(m1,m2)

Multiply two matrices without z-scaling the translation in m2

PARAMETERS

m1 const dmVMath::Matrix& First matrix
m2 const dmVMath::Matrix& Second matrix

RETURNS

result dmVMath::Matrix The resulting transform

NormalizeZScale()

NormalizeZScale(mtx)

Eliminate the z scaling components in a matrix

PARAMETERS

mtx Matrix to operate on

NormalizeZScale()

NormalizeZScale(source,target)

Eliminate the z scaling components in a matrix

PARAMETERS

source const dmVMath::Matrix& Source matrix
target dmVMath::Matrix* Target matrix

ResetScale()

ResetScale(mtx)

Eliminate the scaling components in a matrix

PARAMETERS

mtx Matrix to operate on

RETURNS

Vector containing the scaling by component

SetIdentity()

SetIdentity()

initialize to identity transform

PARAMETERS

None


SetRotation()

SetRotation(rotation)

set rotatiom

PARAMETERS

rotation dmVMath::Quat

SetScale()

SetScale()

set scale

PARAMETERS

None

RETURNS

scale dmVMath::Vector3

SetTranslation()

SetTranslation(translation)

set translation

PARAMETERS

translation dmVMath::Vector3

SetUniformScale()

SetUniformScale(scale)

set uniform scale

PARAMETERS

scale float

ToMatrix4()

ToMatrix4(t)

Convert a transform into a 4-dim matrix

PARAMETERS

t Transform to convert

RETURNS

Matrix representing the same transform

ToTransform()

ToTransform(mtx)

Convert a matrix into a transform

PARAMETERS

mtx Matrix4 to convert

RETURNS

Transform representing the same transform

Transform()

Transform()

Constructor. Leaves the struct in an uninitialized state

PARAMETERS

None


Transform()

Transform(translation,rotation,scale)

constructor

PARAMETERS

translation dmVMath::Vector3
rotation dmVMath::Quat
scale dmVMath::Vector3

Transform()

Transform(translation,rotation,scale)

constructor

PARAMETERS

translation dmVMath::Vector3
rotation dmVMath::Quat
scale dmVMath::Vector3