C++ API Reference
|
Base class of all user defined transformation matrices with pre-rotation. More...
#include <MPxTransformationMatrix.h>
Public Member Functions | |
MPxTransformationMatrixPreRotation () | |
Class Constructor. | |
MPxTransformationMatrixPreRotation (const MTransformationMatrix &) | |
Class constructor. More... | |
MPxTransformationMatrixPreRotation (const MPxTransformationMatrixPreRotation &) | |
A copy constructor. More... | |
MPxTransformationMatrixPreRotation (const MMatrix &) | |
MMatrix copy constructor. More... | |
~MPxTransformationMatrixPreRotation () override | |
Class destructor. | |
virtual MQuaternion | preRotation () const |
Returns preRotation which is an optional rotation that can be applied after the rotation channel and before the translation channel in the transform matrix. More... | |
Public Member Functions inherited from MPxTransformationMatrix | |
MPxTransformationMatrix () | |
Class Constructor. | |
MPxTransformationMatrix (const MTransformationMatrix &) | |
Class constructor. More... | |
MPxTransformationMatrix (const MPxTransformationMatrix &) | |
A copy constructor. More... | |
MPxTransformationMatrix (const MMatrix &) | |
MMatrix copy constructor. More... | |
virtual | ~MPxTransformationMatrix () |
Class destructor. | |
virtual void | copyValues (MPxTransformationMatrix *) |
This method should be overridden for any transform that uses more then the default transform values. More... | |
virtual MTypeId | typeId () const |
Returns the MTypeId of this transformation matrix. More... | |
MPxTransformationMatrix & | operator= (const MPxTransformationMatrix &src) |
Assignment operator. More... | |
MPxTransformationMatrix & | operator= (const MMatrix &src) |
Assignment operator. More... | |
MPxTransformationMatrix & | operator= (const MTransformationMatrix &src) |
Assignment operator. More... | |
bool | operator== (const MPxTransformationMatrix &) |
Equality operator. More... | |
bool | operator!= (const MPxTransformationMatrix &) |
Inequality operator. More... | |
bool | operator== (const MTransformationMatrix &) |
Equality operator. More... | |
bool | operator!= (const MTransformationMatrix &) |
Inequality operator. More... | |
bool | operator== (const MMatrix &) |
Equality operator. More... | |
bool | operator!= (const MMatrix &) |
Equality operator. More... | |
virtual bool | isEquivalent (const MPxTransformationMatrix &, double tolerance=MMatrix_kTol) const |
Determine if the MPxTransformationMatrix is equivalent within a specified tolerance. More... | |
virtual bool | isEquivalent (const MTransformationMatrix &, double tolerance=MMatrix_kTol) const |
Determine if the MTransformationMatrix is equivalent within a specified tolerance. More... | |
virtual bool | isEquivalent (const MMatrix &, double tolerance=MMatrix_kTol) const |
Determine if the MMatrix is equivalent within a specified tolerance. More... | |
virtual MPxTransformationMatrix | reverse () const |
Returns the negated translate, rotate, and scale without taking the pivots into account. More... | |
virtual MPxTransformationMatrix & | transformBy (const MTransformationMatrix &) |
Transforms the transformation matrix by the passed MTransformationMatrix. More... | |
virtual MMatrix | asMatrix () const |
Returns the four by four matrix that describes this transformation. More... | |
virtual MMatrix | asMatrixInverse () const |
Returns the inverse of the four by four matrix that describes this transformation. More... | |
virtual MMatrix | asScaleMatrix () const |
Returns scale matrix. More... | |
virtual MMatrix | asScaleMatrixInverse () const |
Returns inverse of the scale matrix. More... | |
virtual MMatrix | asRotateMatrix () const |
Returns the rotate section of the transformation matrix. More... | |
virtual MMatrix | asRotateMatrixInverse () const |
Returns the inverse of the rotate matrix. More... | |
virtual MMatrix | asMatrix (double percent) const |
Returns a matrix that represents the specified percentage of this transformation matrix. More... | |
virtual MMatrix | asInterpolationMatrix (const MTransformationMatrix &toM, double percent, bool rot, int direction=0) const |
Returns a matrix that represents the specified percentage of this transformation matrix. More... | |
virtual MTransformationMatrix | asTransformationMatrix () const |
Returns the custom transformation matrix as a standard MTransformationMatrix. More... | |
virtual MVector | translation (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the translation component of the transformation matrix as a MVector in centimeters (the internal Maya linear unit). More... | |
virtual MStatus | translateTo (const MVector &vector, MSpace::Space=MSpace::kTransform) |
Sets the translate component of the transformation matrix in centimeters. More... | |
virtual MStatus | translateBy (const MVector &vector, MSpace::Space=MSpace::kTransform) |
Add to the translate component by translating relative to the existing transformation. More... | |
virtual MQuaternion | rotation (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the rotation component of the transformation matrix as a quaternion. More... | |
virtual MEulerRotation | eulerRotation (MSpace::Space space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the rotation component of the transformation matrix as a euler rotation. More... | |
virtual MStatus | rotateTo (const MQuaternion &q, MSpace::Space=MSpace::kTransform) |
Sets the rotation component of the transformation matrix using a quaternion. More... | |
virtual MStatus | rotateBy (const MQuaternion &q, MSpace::Space=MSpace::kTransform) |
Rotates relative to the current rotation value of the transformation matrix. More... | |
virtual MStatus | rotateTo (const MEulerRotation &e, MSpace::Space=MSpace::kTransform) |
Sets the rotation component of the transformation matrix using an euler rotation. More... | |
virtual MStatus | rotateBy (const MEulerRotation &e, MSpace::Space=MSpace::kTransform) |
Rotates relative to the current rotation value of the transformation matrix. More... | |
virtual MTransformationMatrix::RotationOrder | rotationOrder (MStatus *ReturnStatus=NULL) const |
Returns the rotation order used by the rotation component of the transformation matrix. More... | |
virtual MStatus | setRotationOrder (MTransformationMatrix::RotationOrder, bool preserve=true) |
Sets the rotation order used by the rotation component of the transformation matrix. More... | |
virtual MQuaternion | rotateOrientation (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the rotate orientation for the transformation matrix as a quaternion. More... | |
virtual MStatus | setRotateOrientation (const MQuaternion &q, MSpace::Space=MSpace::kTransform, bool balance=true) |
Sets the rotate orientation for the transformation matrix to the passed quaternion. More... | |
virtual MEulerRotation | eulerRotateOrientation (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the rotate orientation for the transformation matrix as an euler rotation. More... | |
virtual MStatus | setRotateOrientation (const MEulerRotation &euler, MSpace::Space=MSpace::kTransform, bool balance=true) |
Sets the rotate orientation for the transformation matrix to the passed euler rotation. More... | |
virtual MVector | scale (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the scale component of the transformation matrix. More... | |
virtual MStatus | scaleTo (const MVector &, MSpace::Space=MSpace::kTransform) |
Set the scale component of the transformation matrix. More... | |
virtual MStatus | scaleBy (const MVector &, MSpace::Space=MSpace::kTransform) |
Apply a relative scale to the existing scale. More... | |
virtual MVector | shear (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the shear component of the transformation matrix. More... | |
virtual MStatus | shearTo (const MVector &shear, MSpace::Space=MSpace::kTransform) |
Sets the shear component of the transformation matrix. More... | |
virtual MStatus | shearBy (const MVector &shear, MSpace::Space=MSpace::kTransform) |
Apply a new shear to the existing shear component of the transformation matrix. More... | |
virtual MPoint | scalePivot (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the pivot used by the scale. More... | |
virtual MStatus | setScalePivot (const MPoint &, MSpace::Space=MSpace::kTransform, bool balance=true) |
Set the pivot used by the scale. More... | |
virtual MVector | scalePivotTranslation (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the scale pivot translation, which is used to compensate for changes of the scale pivot. More... | |
virtual MStatus | setScalePivotTranslation (const MVector &vector, MSpace::Space=MSpace::kTransform) |
Set the scale pivot translation. More... | |
virtual MPoint | rotatePivot (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the pivot used by the rotation. More... | |
virtual MStatus | setRotatePivot (const MPoint &, MSpace::Space=MSpace::kTransform, bool balance=true) |
Set the pivot used by the rotation. More... | |
virtual MVector | rotatePivotTranslation (MSpace::Space=MSpace::kTransform, MStatus *ReturnStatus=NULL) const |
Returns the rotate pivot translation, which is used to compensate for changes of the rotate pivot. More... | |
virtual MStatus | setRotatePivotTranslation (const MVector &vector, MSpace::Space=MSpace::kTransform) |
Set the rotate pivot translation. More... | |
virtual MStatus | unSquishIt () |
Remove any shearing and any non-proportional scaling from this transform. More... | |
virtual MMatrix | unSquishMatrix () const |
Remove any shearing and any non-proportional scaling. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from MPxTransformationMatrix | |
static MPxTransformationMatrix * | creator () |
A method to use when registering a custom transform that uses a default MPxTransformationMatrix. More... | |
static MEulerRotation::RotationOrder | convertTransformationRotationOrder (MTransformationMatrix::RotationOrder, MStatus *ReturnStatus=NULL) |
Convert from MTransformationMatrix::RotationOrder to MEulerRotation::RotationOrder. More... | |
static MTransformationMatrix::RotationOrder | convertEulerRotationOrder (MEulerRotation::RotationOrder, MStatus *ReturnStatus=NULL) |
Convert from MEulerRotation::RotationOrder to MTransformationMatrix::RotationOrder. More... | |
static MEulerRotation::RotationOrder | convertRotationOrder (MTransformationMatrix::RotationOrder, MStatus *ReturnStatus=NULL) |
This method is obsolete. More... | |
static MTransformationMatrix::RotationOrder | convertRotationOrder (MEulerRotation::RotationOrder, MStatus *ReturnStatus=NULL) |
This method is obsolete. More... | |
Static Public Attributes inherited from MPxTransformationMatrix | |
static const MPxTransformationMatrix | identity |
The identity transformation matrix. | |
static MTypeId | baseTransformationMatrixId = MTypeId(0x58A00001) |
Type id for the default MPxTransformationMatrix. | |
Protected Member Functions inherited from MPxTransformationMatrix | |
virtual MStatus | decomposeMatrix (const MMatrix &) |
This method converts a passed MMatrix into individual transformation matrix components. More... | |
Static Protected Member Functions inherited from MPxTransformationMatrix | |
static const char * | className () |
Returns the name of this class. More... | |
Protected Attributes inherited from MPxTransformationMatrix | |
MVector | scaleValue |
Scale component of transformation. | |
MEulerRotation | rotationValue |
Rotation component of transformation. | |
MVector | translationValue |
Translation component of transformation. | |
MVector | shearValue |
Shear component of transformation. | |
MPoint | scalePivotValue |
Position of pivot used for scaling. | |
MVector | scalePivotTranslationValue |
Translation to compensate for movement of the scale pivot. | |
MPoint | rotatePivotValue |
Position of pivot used for rotation. | |
MVector | rotatePivotTranslationValue |
Translation to compensate for movement of the rotate pivot. | |
MQuaternion | rotateOrientationValue |
Orientation of the local rotation space. | |
Base class of all user defined transformation matrices with pre-rotation.
This is a temporary class that allows a user defined transformation matrix to supply a pre-rotation (that will be applied between the rotation and translation) in order to replicate jointOrient behaviour in a custom transform.
This functionality will be added directly to MPxTransformationMatrix in a future release and this class will be removed at that point.
MPxTransformationMatrixPreRotation | ( | const MTransformationMatrix & | rhs | ) |
Class constructor.
The contents of the passed MTransformationMatrix are used to initialize the new MPxTransformationMatrixPreRotation.
[in] | src | matrix to be copied. |
A copy constructor.
The contents of the passed MPxTransformationMatrixPreRotation are used to initialize this MPxTransformationMatrixPreRotation.
[in] | src | The transformation matrix to copy. |
MPxTransformationMatrixPreRotation | ( | const MMatrix & | rhs | ) |
MMatrix copy constructor.
The contents of the passed MMatrix are used to initialize the new MPxTransformationMatrixPreRotation. In order to fill the individual components of the transformation matrix, decomposeMatrix() is called with the passed MMatrix.
[in] | src | The matrix used for transformation initialization. |
|
virtual |
Returns preRotation which is an optional rotation that can be applied after the rotation channel and before the translation channel in the transform matrix.
It is functionally equivalent to jointOrient and can be used to replicate joint-like behavior in a custom transform.