Documentation for vtkTransform

vtkTransform - a general matrix transformation class

Super Class: vtkObject

Description:

vtkTransform maintains a stack of 4x4 transformation matrices. A variety of methods are provided to manipulate the translation, scale, and rotation components of the matrix. Methods operate on the matrix at the top of the stack. Many objects, such as vtkActor and vtkCamera, use this class for performing their matrix operations. It is very important to realize that this class performs all of its operations in a right handed coordinate system with right handed rotations. Some other graphics libraries use left handed coordinate systems and rotations.

 

Caveats:

By default the initial matrix is the identity matrix.

 

See Also:

vtkMatrix4x4 vtkTransformCollection vtkTransformFilter vtkTransformPolyDataFilter

 

Methods:

void vtkTransform ()
void vtkTransform (const vtkTransform &)
void vtkTransform ()
static vtkTransform *New ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
void Identity ()
void Pop ()
void PostMultiply ()
void PreMultiply ()
void Push ()
void RotateX (float )
void RotateY (float )
void RotateZ (float )
void RotateWXYZ (float ,float ,float ,float )
void Scale (float ,float ,float )
void Translate (float ,float ,float )
void Transpose ()
void GetTranspose (vtkMatrix4x4 *)
void Inverse ()
void GetInverse (vtkMatrix4x4 *)
float *GetOrientation ()
void GetOrientation (float * ,float * ,float *)
void GetOrientation (float & ,float & ,float &)
float *GetOrientationWXYZ ()
float *GetPosition ()
void GetPosition (float * ,float * ,float *)
void GetPosition (float & ,float & ,float &)
float *GetScale ()
void GetScale (float * ,float * ,float *)
void GetScale (float & ,float & ,float &)
void SetMatrix (vtkMatrix4x4 &)
vtkMatrix4x4 *GetMatrixPointer ()
void GetMatrix (vtkMatrix4x4 *)
void Concatenate (vtkMatrix4x4 *)
void Multiply4x4 (vtkMatrix4x4 * ,vtkMatrix4x4 * ,vtkMatrix4x4 *)
void MultiplyPoint (float ,float )
void MultiplyPoints (vtkPoints * ,vtkPoints *)
void MultiplyVectors (vtkVectors * ,vtkVectors *)
void MultiplyNormals (vtkNormals * ,vtkNormals *)
float *GetPoint ()
void GetPoint (float )
void SetPoint (float ,float ,float ,float )
void SetPoint (float *)
void Multiply4x4 (vtkMatrix4x4 & ,vtkMatrix4x4 & ,vtkMatrix4x4 &)
void Concatenate (vtkMatrix4x4 &)
void GetMatrix (vtkMatrix4x4 &)
void GetTranspose (vtkMatrix4x4 &)
void GetInverse (vtkMatrix4x4 &)
vtkMatrix4x4 &GetMatrix ()

 

Detailed Method Descriptions:

Constructs a transform and sets the following defaults preMultiplyFlag = 1 stackSize = 10. It then creates an identity matrix as the top matrix on the stack.

void vtkTransform ()

Copy constructor. Creates an instance of vtkTransform and then copies its instance variables from the values in t.

void vtkTransform (const vtkTransform &)

Creates an identity matrix and makes it the current transformation matrix.

void Identity ()

Deletes the transformation on the top of the stack and sets the top to the next transformation on the stack.

void Pop ()

Sets the internal state of the transform to post multiply. All subsequent matrix operations will occur after those already represented in the current transformation matrix.

void PostMultiply ()

Sets the internal state of the transform to pre multiply. All subsequent matrix operations will occur before those already represented in the current transformation matrix.

void PreMultiply ()

Pushes the current transformation matrix onto the transformation stack.

void Push ()

Creates an x rotation matrix and concatenates it with the current transformation matrix. The angle is specified in degrees.

void RotateX (float )

Creates a y rotation matrix and concatenates it with the current transformation matrix. The angle is specified in degrees.

void RotateY (float )

Creates a z rotation matrix and concatenates it with the current transformation matrix. The angle is specified in degrees.

void RotateZ (float )

Creates a matrix that rotates angle degrees about an axis through the origin and x, y, z. It then concatenates this matrix with the current transformation matrix.

void RotateWXYZ (float ,float ,float ,float )

Scales the current transformation matrix in the x, y and z directions. A scale factor of zero will automatically be replaced with one.

void Scale (float ,float ,float )

Translate the current transformation matrix by the vector {x, y, z}.

void Translate (float ,float ,float )

Transposes the current transformation matrix.

void Transpose ()

Obtain the transpose of the current transformation matrix.

void GetTranspose (vtkMatrix4x4 *)

Invert the current transformation matrix.

void Inverse ()

Return the inverse of the current transformation matrix.

void GetInverse (vtkMatrix4x4 *)

Get the x, y, z orientation angles from the transformation matrix as an array of three floating point values.

float *GetOrientation ()

Get the x, y, z orientation angles from the transformation matrix.

void GetOrientation (float * ,float * ,float *)

Return the wxyz quaternion representing the current orientation.

void GetOrientation (float & ,float & ,float &)
float *GetOrientationWXYZ ()

Return the position from the current transformation matrix as an array of three floating point numbers. This is simply returning the translation component of the 4x4 matrix.

float *GetPosition ()

Return the x, y, z positions from the current transformation matrix. This is simply returning the translation component of the 4x4 matrix.

void GetPosition (float * ,float * ,float *)

Return the x, y, z scale factors of the current transformation matrix as an array of three float numbers.

void GetPosition (float & ,float & ,float &)
float *GetScale ()

Return the x, y, z scale factors of the current transformation matrix.

void GetScale (float * ,float * ,float *)

Set the current matrix directly (copies m).

void GetScale (float & ,float & ,float &)
void SetMatrix (vtkMatrix4x4 &)

Returns the current transformation matrix.

vtkMatrix4x4 *GetMatrixPointer ()
void GetMatrix (vtkMatrix4x4 *)

Concatenates the input matrix with the current transformation matrix. The resulting matrix becomes the new current transformation matrix. The setting of the PreMultiply flag determines whether the matrix is PreConcatenated or PostConcatenated.

void Concatenate (vtkMatrix4x4 *)

Multiplies matrices a and b and stores the result in c.

void Multiply4x4 (vtkMatrix4x4 * ,vtkMatrix4x4 * ,vtkMatrix4x4 *)

Multiply a xyzw point by the transform and store the result in out.

void MultiplyPoint (float ,float )

Multiplies a list of points (inPts) by the current transformation matrix. Transformed points are appended to the output list (outPts).

void MultiplyPoints (vtkPoints * ,vtkPoints *)

Multiplies a list of vectors (inVectors) by the current transformation matrix. The transformed vectors are appended to the output list (outVectors). This is a special multiplication, since these are vectors. It multiplies vectors by the transposed inverse of the matrix, ignoring the translational components.

void MultiplyVectors (vtkVectors * ,vtkVectors *)

Multiplies a list of normals (inNormals) by the current transformation matrix. The transformed normals are appended to the output list (outNormals). This is a special multiplication, since these are normals.

void MultiplyNormals (vtkNormals * ,vtkNormals *)

Returns the result of multiplying the currently set Point by the current transformation matrix. Point is expressed in homogeneous coordinates. The setting of the PreMultiplyFlag will determine if the Point is Pre or Post multiplied.

float *GetPoint ()
void GetPoint (float )

Set the point to use in the GetPoint calculations.

void SetPoint (float ,float ,float ,float )
void SetPoint (float *)

 

void Multiply4x4 (vtkMatrix4x4 & ,vtkMatrix4x4 & ,vtkMatrix4x4 &)
void Concatenate (vtkMatrix4x4 &)
void GetMatrix (vtkMatrix4x4 &)
void GetTranspose (vtkMatrix4x4 &)
void GetInverse (vtkMatrix4x4 &)
vtkMatrix4x4 &GetMatrix ()