TorqueScript Reference
Functions

Functions

String MatrixCreate (posVec, rotVec)
 
String MatrixCreateFromEuler (rotVec)
 
String MatrixMulPoint (transform, point)
 
String MatrixMultiply (transformA, transformB)
 
String MatrixMulVector (transform, vector)
 

Detailed Description

Function Documentation

String MatrixCreate ( posVec  ,
rotVec   
)

Use the matrixCreate function to create a transform matrix from a three-element floating-point translation vector and a four-element floating-point rotation vector.

Parameters
posVecA three-element floating-point translation vector: PosY PosZ.
rotVecA four-element floating-point rotation vector: RotY RotZ.
Thesere rotations about the specified axes.
Returns
Returns a transform matrix of the form PosY PosZ RotX RotY RotZ theta.
See also
MatrixCreateFromEuler
String MatrixCreateFromEuler ( rotVec  )

Use the MatrixCreateFromEuler function to calculate a transform matrix from a three-element floating-point rotation vector.

Parameters
rotVecA three-element floating-point rotation vector: RotY RotZ. These are rotations about the specified axes.
Returns
Returns a transform matrix of the form \0 0 0 X Y Z theta.
See also
MatrixCreate
String MatrixMulPoint ( transform  ,
point   
)

Use the MatrixMulPoint function to multiply a seven element transform matrix by a three element point vector, producing a three element position vector.

Parameters
transformA seven-element transform matrix.
pointA three-element point/position vector.
Returns
Returns a three-element position vector.
See also
MatrixMultiply, MatrixMulVector
String MatrixMultiply ( transformA  ,
transformB   
)

Use the MatrixMultiply function to multiply two seven-element transform matrices to produce a new seven element matrix.

Parameters
transformAA seven-element transform matrix of the form PosY PosZ RotX RotY RotZ theta.
transformBA seven-element transform matrix of the form PosY PosZ RotX RotY RotZ theta.
Returns
Returns a seven-element matrix resulting from transiformA x transformB.
See also
MatrixMulPoint, MatrixMulVector
String MatrixMulVector ( transform  ,
vector   
)

Use the MatrixMulVector function to multiply a seven-element transform matrix with a three-element matrix.

Parameters
transformA seven-element transform matrix of the form PosY PosZ RotX RotY RotZ theta.
vectorA three-element vector.
Returns
Returns three-element resulting from vector * transform.
See also
MatrixMulPoint, MatrixMultiply