class MTransformationMatrix

Jump to documentation

Transformation matrix. (OpenMaya) (OpenMaya.py)

public members:

enum RotationOrder
kInvalid
kXYZ
kYZX
kZXY
kXZY
kYXZ
kZYX
kLast
~MTransformationMatrix ()
MTransformationMatrix ()
MTransformationMatrix ( const MTransformationMatrix & src )
MTransformationMatrix ( const MMatrix & src )
MTransformationMatrix & operator= ( const MTransformationMatrix &src )
MTransformationMatrix & operator= ( const MMatrix &src )
MMatrix asMatrix () const
MMatrix asMatrix (double percent) const
MMatrix asMatrixInverse () const
MMatrix asScaleMatrix () const
MMatrix asRotateMatrix () const
MStatus getScale ( double[3], MSpace::Space ) const
MStatus setScale ( const double[3], MSpace::Space )
MStatus addScale ( const double[3], MSpace::Space )
MQuaternion rotation () const
MTransformationMatrix &rotateTo ( const MQuaternion &q )
MTransformationMatrix &rotateBy ( const MQuaternion &q, MSpace::Space space, MStatus *ReturnStatus = NULL)
MEulerRotation eulerRotation () const
MTransformationMatrix &rotateTo ( const MEulerRotation &e )
MTransformationMatrix &rotateBy ( const MEulerRotation &e, MSpace::Space space, MStatus *ReturnStatus = NULL)
MStatus getRotationQuaternion ( double &x, double &y, double &z, double &w ) const
MStatus setRotationQuaternion ( double x, double y, double z, double w )
MStatus addRotationQuaternion ( double x, double y, double z, double w, MSpace::Space )
MStatus getRotation ( double[3], RotationOrder & order ) const
MStatus setRotation ( const double rotation [3], RotationOrder order )
MStatus addRotation ( const double rotation [3], RotationOrder order, MSpace::Space )
RotationOrder rotationOrder ( MStatus * ReturnStatus = NULL ) const
MStatus reorderRotation ( RotationOrder & order )
MStatus setToRotationAxis ( const MVector &axis, double rotation )
MQuaternion rotationOrientation () const
MTransformationMatrix &setRotationOrientation ( const MQuaternion &q )
MVector getTranslation ( MSpace::Space , MStatus * ReturnStatus=NULL ) const
MStatus setTranslation ( const MVector & vector, MSpace::Space )
MStatus addTranslation ( const MVector & vector, MSpace::Space )
MStatus setShear ( const double[3], MSpace::Space )
MStatus getShear ( double[3], MSpace::Space ) const
MStatus addShear ( const double[3], MSpace::Space )
MPoint scalePivot ( MSpace::Space , MStatus * ReturnStatus = NULL ) const
MStatus setScalePivot ( const MPoint &, MSpace::Space , bool balance )
MVector scalePivotTranslation ( MSpace::Space , MStatus * ReturnStatus=NULL )const
MStatus setScalePivotTranslation ( const MVector & vector, MSpace::Space )
MPoint rotatePivot ( MSpace::Space , MStatus * ReturnStatus=NULL ) const
MStatus setRotatePivot ( const MPoint & point, MSpace::Space , bool balance )
MVector rotatePivotTranslation ( MSpace::Space space, MStatus * ReturnStatus=NULL ) const
MStatus setRotatePivotTranslation ( const MVector & vector, MSpace::Space space )
bool isEquivalent ( const MTransformationMatrix &other, double tolerance = MTransformationMatrix_kTol ) const
bool operator == (const MTransformationMatrix & other ) const
bool operator != ( const MTransformationMatrix & other ) const
MStatus getRotation ( double[3], RotationOrder & order, MSpace::Space ) const
OBSOLETE
MStatus setRotation ( const double rotation [3], RotationOrder order, MSpace::Space )
OBSOLETE
MStatus getRotationQuaternion ( double &x, double &y, double &z, double &w, MSpace::Space ) const
OBSOLETE
MStatus setRotationQuaternion ( double x, double y, double z, double w, MSpace::Space )
OBSOLETE
MVector translation ( MSpace::Space , MStatus * ReturnStatus=NULL ) const
OBSOLETE
static const MTransformationMatrix identity

Documentation

Class for constructing transformation matrices
Description

An MTransformationMatrix allows the manipulation of the individual transformation components (eg scale, rotation, shear, etc) of a four by four transformation matrix.

The transformation in the node is represented as a 4x4 transformation matrix. This class allows access to the whole matrix, or the individual components (eg scale, rotation, shear, etc) of the transformation. This breakdown provides animators fine control over the animation of these parameters. Therefore, it is necessary to describe the order in which these attributes are applied to build the final matrix attribute.

A transformation matrix is composed of the following components:

Note that the default RotationOrder is kXYZ.

The matrices are post-multiplied in Maya. For example, to transform a point P from object-space to world-space (P') you would need to post-multiply by the worldMatrix. (P' = P x WM)

The transformation matrix is then constructed as follows:

     -1                       -1
  [Sp]x[S]x[Sh]x[Sp]x[St]x[Rp]x[Ro]x[R]x[Rp]x[Rt]x[T]

where 'x' denotes matrix multiplication and '-1' denotes matrix inversion

     Sp = |  1    0    0    0 |     St = |  1    0    0    0 |
          |  0    1    0    0 |          |  0    1    0    0 |
          |  0    0    1    0 |          |  0    0    1    0 |
          | spx  spy  spz   1 |          | sptx spty sptz  1 |
  
     S  = |  sx   0    0    0 |     Sh = |  1    0    0    0 |
          |  0    sy   0    0 |          | shxy  1    0    0 |
          |  0    0    sz   0 |          | shxz shyz  1    0 | 
          |  0    0    0    1 |          |  0    0    0    1 |
  
     Rp = |  1    0    0    0 |     Rt = |  1    0    0    0 |
          |  0    1    0    0 |          |  0    1    0    0 |
          |  0    0    1    0 |          |  0    0    1    0 |
          | rpx  rpy  rpz   1 |          | rptx rpty rptz  1 |
  
     Ro = AX * AY * AZ
  
     AX = |  1    0    0    0 |     AY = |  cy   0   -sy   0 |
          |  0    cx   sx   0 |          |  0    1    0    0 |
          |  0   -sx   cx   0 |          |  sy   0    cy   0 |
          |  0    0    0    1 |          |  0    0    0    1 |
  
     AZ = |  cz   sz   0    0 |     sx = sin(rax), cx = cos(rax)
          | -sz   cz   0    0 |     sy = sin(ray), cx = cos(ray)
          |  0    0    1    0 |     sz = sin(raz), cz = cos(raz)
          |  0    0    0    1 |
  
  	 R  = RX * RY * RZ  (Note: order is determined by rotateOrder)
  
     RX = |  1    0    0    0 |     RY = |  cy   0   -sy   0 |
          |  0    cx   sx   0 |          |  0    1    0    0 |
          |  0   -sx   cx   0 |          |  sy   0    cy   0 |
          |  0    0    0    1 |          |  0    0    0    1 |
  
     RZ = |  cz   sz   0    0 |     sx = sin(rx), cx = cos(rx)
          | -sz   cz   0    0 |     sy = sin(ry), cx = cos(ry)
          |  0    0    1    0 |     sz = sin(rz), cz = cos(rz)
          |  0    0    0    1 |
  
     T  = |  1    0    0    0 |
          |  0    1    0    0 |
          |  0    0    1    0 |
          |  tx   ty   tz   1 |

Functions

MTransformationMatrix:: MTransformationMatrix ()

Description

Class Constructor.

MTransformationMatrix:: MTransformationMatrix (const MTransformationMatrix &src)

Description

Class Copy Constructor.

Arguments

  • src transform matrix to be copied

MTransformationMatrix:: MTransformationMatrix (const MMatrix & src)

Description

Class Constructor.

Arguments

  • src matrix to be copied

MTransformationMatrix:: ~MTransformationMatrix ()
Description

Class Destructor.

MTransformationMatrix & MTransformationMatrix:: operator= (const MTransformationMatrix &src)

Description

Copy operator.

Arguments

  • src transform matrix to be copied

MTransformationMatrix & MTransformationMatrix:: operator= (const MMatrix & src)

Description

Copy operator.

Arguments

  • src matrix to be copied

Return Value

  • this transformation matrix

MMatrix MTransformationMatrix:: asMatrix () const

Description

Returns the four by four matrix that describes this transformation

Return Value

  • the matrix

MMatrix MTransformationMatrix:: asMatrixInverse () const

Description

Returns the inverse of the four by four matrix that describes this transformation.

Return Value

  • the matrix

MMatrix MTransformationMatrix:: asScaleMatrix () const
Description

Returns scale space matrix. The scale space matrix takes points from object space to the space immediately following scale and shear transformations.

Return Value

  • the scale space matrix

MMatrix MTransformationMatrix:: asRotateMatrix () const
Description

Returns rotate space matrix. The rotate space matrix takes points from object space to the space immediately following the scale/shear/rotation transformations.

Return Value

  • the rotate space matrix

MMatrix MTransformationMatrix:: asMatrix (double percent) const
Description

Returns a matrix that represents the specified percentage of this transformation matrix.

Arguments

  • percent percent of the transformation to return

Return Value

  • the percentatge matrix

MStatus MTransformationMatrix:: setScale (const double scale[3], MSpace::Space space)
Description

Set the scale component of the transformation matrix.

Arguments

  • scale new scale component
  • space transform space in which to perform the scale

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MStatus MTransformationMatrix:: getScale ( double scale[3], MSpace::Space space ) const
Description

Get the scale component of the transformation matrix.

Arguments

  • scale storage for the scale component
  • space transform space in which to get the scale

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MStatus MTransformationMatrix:: addScale (const double scale[3], MSpace::Space space )
Description

Add to the scale component by scaling relative to the existing transformation.

Arguments

  • scale relative value to scale by
  • space transform space in which to perform the scale

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MQuaternion MTransformationMatrix:: rotation () const

Description

Returns the rotation component of the transformation matrix as a quaternion. The rotation is returned in MSpace::kTransform space.

Return Value

  • quaternion that is the rotation component of the transformation matrix

MTransformationMatrix &MTransformationMatrix:: rotateTo (const MQuaternion &q)

Description

Sets the rotation component of the transformation matrix using a quaternion. The rotation is performed in MSpace::kTransform space.

Arguments

  • q the quaternion to which the rotation component of the transformation matrix should be set

Return Value

  • a reference to the resulting transformation matrix

MTransformationMatrix &MTransformationMatrix:: rotateBy (const MQuaternion &q, MSpace::Space space, MStatus *ReturnStatus)

Description

Adds to the rotation component of the rotation matrix by rotating relative to the existing transformation using a quaternion. The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kPreTransform/MSpace::kObject. All other spaces are treated as being equivalent to MSpace::kTransform.

Arguments

  • q the quaternion that indicates how much the transformation matrix will be rotated by
  • space the space in which the rotation is performed
  • ReturnStatus return status

Return Value

  • a reference to the resulting transformation matrix

Status Codes

  • MS::kSuccess operation successful
  • MS::kInvalidParameter invalid space

MEulerRotation MTransformationMatrix:: eulerRotation () const

Description

Returns the rotation component of the transformation matrix as an euler rotation.

Return Value

  • euler rotation that is the rotation component of the transformation matrix

MTransformationMatrix &MTransformationMatrix:: rotateTo (const MEulerRotation &e)

Description

Sets the rotation component of the transformation matrix using an euler rotation. The rotation is performed in MSpace::kTransform space.

Arguments

  • e the euler rotation to which the rotation component of the transformation matrix should be set

Return Value

  • a reference to the resulting transformation matrix

MTransformationMatrix &MTransformationMatrix:: rotateBy (const MEulerRotation &e, MSpace::Space space, MStatus *ReturnStatus)

Description

Adds to the rotation component of the rotation matrix by rotating relative to the existing transformation using an euler rotation. The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kPreTransform/MSpace::kObject. All other spaces are treated as being equivalent to MSpace::kTransform.

Arguments

  • e the euler rotation that indicates how much the transformation matrix will be rotated by
  • space the space in which the rotation is performed
  • ReturnStatus return status

Return Value

  • a reference to the resulting transformation matrix

Status Codes

  • MS::kSuccess operation successful
  • MS::kInvalidParameter invalid space

MStatus MTransformationMatrix:: getRotationQuaternion ( double &x, double &y, double &z, double &w ) const
Description

Get the rotation component of the transformation matrix as a quaternion. The rotation is retrieved in MSpace::kTransform space.

Arguments

  • x storage for the x component of the quaternion
  • y storage for the y component of the quaternion
  • z storage for the z component of the quaternion
  • w storage for the w component of the quaternion

Return Value

  • return status

Status Codes

  • MS::kSuccess Success

MStatus MTransformationMatrix:: setRotationQuaternion (double x, double y, double z, double w)

Description

Set the rotation component of the transformation matrix using a quaternion. The rotation is set in MSpace::kTransform space.

Arguments

  • x x component of new quaternion
  • y y component of new quaternion
  • z z component of new quaternion
  • w w component of new quaternion

Return Value

  • return status

Status Codes

  • MS::kSuccess Success

MStatus MTransformationMatrix:: addRotationQuaternion (double x, double y, double z, double w, MSpace::Space space)
Description

Add to the rotation component by rotating relative to the existing transformation. Rotation is a quaternion. The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kPreTransform. All other spaces are treated as being equivalent to MSpace::kTransform.

Arguments

  • x x component of quaternion
  • y y component of quaternion
  • z z component of quaternion
  • w w component of quaternion

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MStatus MTransformationMatrix:: getRotation ( double rot[3], MTransformationMatrix::RotationOrder & order ) const

Description

Get the rotation component of the transformation matrix in radians. The rotation is retrieved in MSpace::kTransform space.

Arguments

  • rot storage for the rotation in radians
  • order storage for the rotation order

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter NULL double array

MStatus MTransformationMatrix:: setRotation ( const double rot[3], MTransformationMatrix::RotationOrder order )

Description

Set the rotation component of the transformation matrix. The rotation is set in MSpace::kTransform space.

Arguments

  • rot new rotation component in radians
  • order order in which to apply rotations

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter NULL double array or rotation order is invalid

MStatus MTransformationMatrix:: addRotation (const double rot[3], MTransformationMatrix::RotationOrder order, MSpace::Space space )
Description

Add to the rotation component by rotating relative to the existing transformation. The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kPreTransform. All other spaces are treated as being equivalent to MSpace::kTransform.

Arguments

  • quat relative value to rotate by
  • space transform space in which to perform the rotation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MTransformationMatrix::RotationOrder MTransformationMatrix:: rotationOrder ( MStatus * ReturnStatus ) const
Description

Returns the rotation order for the transform matrix. That is the order in which the Euler angles are applied to create the end rotation.

Arguments

  • ReturnStatus return status

Return Value

  • rotation order

Status Codes

  • MS::kSuccess Success

MStatus MTransformationMatrix:: reorderRotation ( RotationOrder & order )
Description

Reorders the x, y, and z components of the rotation of this transform. The overall rotation will remain the same. This operation is not unique, so spin information will be lost.

Arguments

  • order new order of the rotations

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid rotation order

MStatus MTransformationMatrix:: setToRotationAxis ( const MVector &axis, double rotation )
Description

Sets the rotation given an axis and a rotation about it.

Arguments

  • axis axis to rotate about
  • rotation rotation in radians

Return Value

  • return status

Status Codes

  • MS::kSuccess Success

MQuaternion MTransformationMatrix:: rotationOrientation () const

Description

Returns the rotation orientation for the transformation matrix. The rotation orientation is the rotation that orients the local rotation space. The rotation is returned in MSpace::kTransform space.

Return Value

  • rotation orientation

MTransformationMatrix &MTransformationMatrix:: setRotationOrientation ( const MQuaternion &q)

Description

Sets the rotation orientation for the transformation matrix. The rotation orientation is the rotation that orients the local rotation space. The rotation is set in MSpace::kTransform space.

Return Value

  • rotation orientation

MStatus MTransformationMatrix:: setTranslation (const MVector & vector, MSpace::Space space )
Description

Set the translation component of the transformation matrix in centimeters.

Arguments

  • vector new translation component in centimeters.
  • space transform space in which to perform the translation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MVector MTransformationMatrix:: getTranslation ( MSpace::Space space, MStatus * ReturnStatus ) const
Description

Returns the translation component of the translation as a vector in centimeters.

Arguments

  • space space in which to perform the translation
  • ReturnStatus return status

Return Value

  • translation vector in centimeters

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MVector MTransformationMatrix:: translation ( MSpace::Space space, MStatus * ReturnStatus ) const
Description

THIS IS AN OBSOLETE METHOD

Returns the translation component of the translation as a vector in centimeters. This method has been replaced by MTransformationMatrix::getTranslation and will be removed in a future Maya release.

Arguments

  • space space in which to perform the translation
  • ReturnStatus return status

Return Value

  • translation vector in centimeters

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MStatus MTransformationMatrix:: addTranslation (const MVector & vector, MSpace::Space space )
Description

Add to the translation component by translating relative to the existing transformation.

Arguments

  • vector relative value to translate by
  • space transform space in which to perform the scale

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MStatus MTransformationMatrix:: setShear (const double shear[3], MSpace::Space space )
Description

Set the shear component of the transformation matrix. The shear values represent (xy, xz, yx).

Arguments

  • shear new shear component
  • space transform space in which to perform the shear

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MStatus MTransformationMatrix:: getShear ( double shear[3], MSpace::Space space ) const
Description

Get the shear component of the transformation matrix.

Arguments

  • scale storage for the shear component
  • shear transform space in which to get the shear

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MStatus MTransformationMatrix:: addShear ( const double shear[3], MSpace::Space space )
Description

Add to the shear component by shearing relative to the existing transformation.

Arguments

  • shear relative value to shear by
  • space transform space in which to perform the shear

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MStatus MTransformationMatrix:: setScalePivot (const MPoint & point, MSpace::Space space, bool balance)
Description

Set the pivot around which the scale is applied.

If balance if true, then the overall transformation matrix will not change and a compensating transformation will be added to the scale transformation to achieve this.

Arguments

  • point new scale pivot
  • space transform space in which to set the scale pivot
  • balance whether to balanc the matrix

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MPoint MTransformationMatrix:: scalePivot ( MSpace::Space space, MStatus * ReturnStatus ) const
Description

Returns the pivot around which the scale is applied.

Arguments

  • space space in which to get the pivot
  • ReturnStatus return status

Return Value

  • scale pivot point

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MStatus MTransformationMatrix:: setScalePivotTranslation ( const MVector & vector, MSpace::Space space )
Description

Set the pivot translation. This component is used to preserve existing scale transformations when moving pivot. This method will only be useful to advanced users.

Arguments

  • vector new scale pivot translation
  • space transform space in which to set the scale translation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MVector MTransformationMatrix:: scalePivotTranslation ( MSpace::Space space, MStatus * ReturnStatus ) const
Description

Returns the scale pivot translation. This is the translation that is used to compensate for the movement of the scale pivot.

Arguments

  • space space in which to get the pivot
  • ReturnStatus return status

Return Value

  • scale pivot translation

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MStatus MTransformationMatrix:: setRotatePivot (const MPoint & point, MSpace::Space space, bool balance)
Description

Set the pivot around which the rotation is applied.

If balance if true, then the overall transformation matrix will not change and a compensating transformation will be added to the rotation transformation to achieve this.

Arguments

  • point new rotation pivot
  • space transform space in which to set the pivot
  • balance whether to balance the matrix

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MPoint MTransformationMatrix:: rotatePivot ( MSpace::Space space, MStatus * ReturnStatus ) const
Description

Returns the pivot around which the rotation is applied.

Arguments

  • space space in which to get the pivot
  • ReturnStatus return status

Return Value

  • rotation pivot point

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MStatus MTransformationMatrix:: setRotatePivotTranslation (const MVector & vector, MSpace::Space space )
Description

Set the pivot translation. This component is used to preserve existing transformations when moving pivot. This method will only be useful to advanced users.

Arguments

  • vector new rotation pivot translation
  • space transform space in which to set the rotation translation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MVector MTransformationMatrix:: rotatePivotTranslation ( MSpace::Space space, MStatus * ReturnStatus ) const
Description

Returns the rotation pivot translation. This is the translation that is used to compensate for the movement of the rotation pivot.

Arguments

  • space space in which to get the pivot translation
  • ReturnStatus return status

Return Value

  • scale pivot translation

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

bool MTransformationMatrix:: isEquivalent (const MTransformationMatrix & other, double tol ) const
Description

Returns true if this transform matrix is equivalent to the one passed in within a certain tolerance.

Arguments

  • other transform matrix to test against
  • tol tolerance to test using

Return Value

  • true if equivalent

bool MTransformationMatrix:: operator == (const MTransformationMatrix & other) const
Description

Equality operator.

Arguments

  • other transform matrix to test against

Return Value

  • true if equal

bool MTransformationMatrix:: operator != (const MTransformationMatrix & other) const
Description

Inequality operator.

Arguments

  • other transform matrix to test against

Return Value

  • true if not equal

MStatus MTransformationMatrix:: getRotation ( double rot[3], MTransformationMatrix::RotationOrder & order, MSpace::Space space ) const

Description

THIS IS AN OBSOLETE METHOD

This method will be removed in a future Maya release. The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument. Please use the other MTransformationMatrix::getRotation method for equivalent functionality.

Get the rotation component in radians of the transformation matrix.

Arguments

  • rot storage for the rotation in radians
  • order storage for the rotation order
  • space transform space in which to get the rotation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MStatus MTransformationMatrix:: setRotation ( const double rot[3], MTransformationMatrix::RotationOrder order, MSpace::Space space )

Description

THIS IS AN OBSOLETE METHOD

This method will be removed in a future Maya release. The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument. Please use the other MTransformationMatrix::setRotation method for equivalent functionality.

Set the rotation component of the transformation matrix.

Arguments

  • rot new rotation component
  • order order in which to apply rotations
  • space transform space in which to perform the rotation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space or NULL double array

MStatus MTransformationMatrix:: getRotationQuaternion ( double &x, double &y, double &z, double &w, MSpace::Space space ) const

Description

THIS IS AN OBSOLETE METHOD

This method will be removed in a future Maya release. The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument. Please use the other MTransformationMatrix::getRotationQuaternion method for equivalent functionality.

Get the rotation component of the transformation matrix as a quaternion.

Arguments

  • x storage for the x component of the quaternion
  • y storage for the y component of the quaternion
  • z storage for the z component of the quaternion
  • w storage for the w component of the quaternion
  • space transform space in which to get the rotation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

MStatus MTransformationMatrix:: setRotationQuaternion (double x, double y, double z, double w, MSpace::Space space)

Description

THIS IS AN OBSOLETE METHOD

This method will be removed in a future Maya release. The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument. Please use the other MTransformationMatrix::setRotationQuaternion method for equivalent functionality.

Set the rotation component of the transformation matrix using a quaternion.

Arguments

  • x x component of new quaternion
  • y y component of new quaternion
  • z z component of new quaternion
  • w w component of new quaternion
  • space transform space in which to perform the rotation

Return Value

  • return status

Status Codes

  • MS::kSuccess Success
  • MS::kInvalidParameter Invalid space

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright