Python API 2.0 Reference
OpenMaya.MTransformationMatrix Class Reference
+ Inheritance diagram for OpenMaya.MTransformationMatrix:

Public Member Functions

def __eq__ ()
 
def __ge__ ()
 
def __gt__ ()
 
def __init__ ()
 
def __le__ ()
 
def __lt__ ()
 
def __ne__ ()
 
def asMatrix ()
 
def asMatrixInverse ()
 
def asRotateMatrix ()
 
def asScaleMatrix ()
 
def isEquivalent ()
 
def reorderRotation ()
 
def rotateBy ()
 
def rotateByComponents ()
 
def rotatePivot ()
 
def rotatePivotTranslation ()
 
def rotation ()
 
def rotationComponents ()
 
def rotationOrder ()
 
def rotationOrientation ()
 
def scale ()
 
def scaleBy ()
 
def scalePivot ()
 
def scalePivotTranslation ()
 
def setRotatePivot ()
 
def setRotatePivotTranslation ()
 
def setRotation ()
 
def setRotationComponents ()
 
def setRotationOrientation ()
 
def setScale ()
 
def setScalePivot ()
 
def setScalePivotTranslation ()
 
def setShear ()
 
def setToRotationAxis ()
 
def setTranslation ()
 
def shear ()
 
def shearBy ()
 
def translateBy ()
 
def translation ()
 

Static Public Member Functions

def __new__ ()
 

Static Public Attributes

 kIdentity = <OpenMaya.MTransformationMatrixobject>
 
int kTolerance = 1
 
Rotation Order
int kInvalid = 0
 
int kLast = 7
 
int kXYZ = 1
 
int kXZY = 4
 
int kYXZ = 5
 
int kYZX = 2
 
int kZXY = 3
 
int kZYX = 6
 

Detailed Description

Manipulate the individual components of a transformation.

Constructors

SignatureParametersDescription
MTransformationMatrix()  

Default constructor. Returns a new MTransformationMatrix object, set to the identity transformation.

MTransformationMatrix(src) src - MTransformationMatrix or MMatrix

Returns a new MTransformationMatrix object with the same value as src.

Comparison Support

==

Exact equality comparison. True if the matrices of both transformations are identical.

!= Exact inequality comparison. True if the matrices of the two transformations are different.

All other comparison operators will raise a TypeError exception.

 


Constructor & Destructor Documentation

def OpenMaya.MTransformationMatrix.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMaya.MTransformationMatrix.__eq__ ( )
Return self==value.
def OpenMaya.MTransformationMatrix.__ge__ ( )
Return self>=value.
def OpenMaya.MTransformationMatrix.__gt__ ( )
Return self>value.
def OpenMaya.MTransformationMatrix.__le__ ( )
Return self<=value.
def OpenMaya.MTransformationMatrix.__lt__ ( )
Return self<value.
def OpenMaya.MTransformationMatrix.__ne__ ( )
Return self!=value.
def OpenMaya.MTransformationMatrix.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
OpenMaya.MTransformationMatrix.asMatrix ( )
Interpolates between the identity transformation and that currently in the object, returning the result as an MMatrix.
Signature: asMatrix(interp=1.0)
Parameters: interp - float
Returns: MMatrix
Description: Interpolates between the identity transformation and that currently in the object, returning the result as an MMatrix. When interp is 0.0 the result will be the identity matrix. When it is 1.0 the result will be the full transformation. If interp is less than 0.0 or greater than 1.0 the result will properly extrapolated.
OpenMaya.MTransformationMatrix.asMatrixInverse ( )
Returns the inverse of the matrix representing the transformation.
Signature: asMatrixInverse()
Parameters:  
Returns: MMatrix
Description: Returns the inverse of the matrix representing the transformation.
OpenMaya.MTransformationMatrix.asRotateMatrix ( )
Returns the matrix which takes points from object space to the space immediately following the scale/shear/rotation transformations.
Signature: asRotateMatrix()
Parameters:  
Returns: MMatrix
Description: Returns the matrix which takes points from object space to the space immediately following the scale/shear/rotation transformations.
OpenMaya.MTransformationMatrix.asScaleMatrix ( )
Returns the matrix which takes points from object space to the space immediately following scale and shear transformations.
Signature: asScaleMatrix()
Parameters:  
Returns: MMatrix
Description: Returns the matrix which takes points from object space to the space immediately following scale and shear transformations.
OpenMaya.MTransformationMatrix.isEquivalent ( )
Returns true if this transformation's matrix is within tolerance of another's matrix.
Signature: isEquivalent(other, tolerance=kTolerance)
Parameters: other -
tolerance - float
Returns: bool
Description: Inexact equality test. Returns true if this transformation's matrix is within tolerance of other's matrix.
OpenMaya.MTransformationMatrix.reorderRotation ( )
Reorders the transformation's rotate component to give the same overall rotation but using a new order or rotations.
Signature: reorderRotation(order)
Parameters: order - Rotation Order constant
Returns: Reference to self.
Description: Reorders the transformation's rotate component to give the same overall rotation but using the new order or rotations.
OpenMaya.MTransformationMatrix.rotateBy ( )
Adds to the transformation's rotation component.
Signature: rotateBy(rot, space)
Parameters: rot - MQuaternion or MEulerRotation
space - MSpace constant
Returns: Reference to self.
Description: Adds rot to the transformation's rotation component.
OpenMaya.MTransformationMatrix.rotateByComponents ( )
Adds to the transformation's rotation component.
Signature: rotateByComponents(seq, space, asQuaternion=False)
Parameters: seq - sequence of 4 floats or 3 floats and a Rotation Order constant
space - MSpace constant
asQuaternion - bool
Returns: Reference to self.
Description: Adds the rotation represented by the four parameter values to the transformation's rotate component. If asQuaternion is True then seq must contain four floats representing the x, y, z and w components of a quaternion rotation. If asQuaternion is False then seq must contain three floats representing the x, y and z angles, followed by a Rotation Order constant, which together form an Euler rotation.
OpenMaya.MTransformationMatrix.rotatePivot ( )
Returns the transformation's rotate pivot component.
Signature: rotatePivot(space)
Parameters: space - MSpace constant
Returns: MPoint
Description: Returns the transformation's rotate pivot component.
OpenMaya.MTransformationMatrix.rotatePivotTranslation ( )
Returns the transformation's rotate pivot translation component.
Signature: rotatePivotTranslation(space)
Parameters: space - MSpace constant
Returns: MVector
Description: Returns the transformation's rotate pivot translation component.
OpenMaya.MTransformationMatrix.rotation ( )
Returns the transformation's rotation component as either an Euler rotation or a quaternion.
Signature: rotation(asQuaternion=False)
Parameters: asQuaternion - bool
Returns: MEulerRotation or MQuaternion
Description: Returns the transformation's rotation component as either an Euler rotation or a quaternion.
OpenMaya.MTransformationMatrix.rotationComponents ( )
Returns a list containing the four components of the transformation's rotate component.
Signature: rotationComponents(asQuaternion=False)
Parameters: asQuaternion - bool
Returns: [x, y, z, order] or [x, y, z, w]
Description: Returns a list containing the four components of the transformation's rotate component. If asQuaternion is True then the first three elements are the quaternion's unreal x, y, and z components, and the fourth is its real w component. If asQuaternion is False then the first three components are the x, y and z Euler rotation angles and the fourth is a Rotation Order constant.
OpenMaya.MTransformationMatrix.rotationOrder ( )
Returns the order of rotations when the transformation's rotate component is expressed as an euler rotation.
Signature: rotationOrder()
Parameters:  
Returns: Rotation Order constant
Description: Returns the order of rotations when the transformation's rotate component is expressed as an euler rotation.
OpenMaya.MTransformationMatrix.rotationOrientation ( )
Returns a quaternion which orients the local rotation space.
Signature: rotationOrientation()
Parameters:  
Returns: MQuaternion
Description: Returns the rotation which orients the local rotation space.
OpenMaya.MTransformationMatrix.scale ( )
Returns a list containing the transformation's scale components.
Signature: scale(space)
Parameters: space - MSpace constant
Returns: [sx, sy, sz]
Description: Returns a list containing the transformation's scale components.
OpenMaya.MTransformationMatrix.scaleBy ( )
Multiplies the transformation's scale components by the three floats in the provided sequence.
Signature: scaleBy(seq, space)
Parameters: seq - sequence of 3 floats
space - MSpace constant
Returns: Reference to self.
Description: Multiplies the transformation's scale components by the three floats in seq.
OpenMaya.MTransformationMatrix.scalePivot ( )
Returns the transformation's scale pivot component.
Signature: scalePivot(space)
Parameters: space - MSpace constant
Returns: MPoint
Description: Returns the transformation's scale pivot component.
OpenMaya.MTransformationMatrix.scalePivotTranslation ( )
Returns the transformation's scale pivot translation component.
Signature: scalePivotTranslation(space)
Parameters: space - MSpace constant
Returns: MVector
Description: Returns the transformation's scale pivot translation component.
OpenMaya.MTransformationMatrix.setRotatePivot ( )
Sets the transformation's rotate pivot component.
Signature: setRotatePivot(pivot, space, balance))
Parameters: pivot - MPoint
space - MSpace constant
balance - bool
Returns: Reference to self.
Description: Sets the transformation's rotate pivot component.
OpenMaya.MTransformationMatrix.setRotatePivotTranslation ( )
Sets the transformation's rotate pivot translation component.
Signature: setRotatePivotTranslation(trans, space)
Parameters: trans - MVector
space - MSpace constant
Returns: Reference to self.
Description: Sets the transformation's rotate pivot translation component.
OpenMaya.MTransformationMatrix.setRotation ( )
Sets the transformation's rotation component.
Signature: setRotation(rot)
Parameters: rot - MQuaternion or MEulerRotation
Returns: Reference to self.
Description: Sets the transformation's rotation component to rot.
OpenMaya.MTransformationMatrix.setRotationComponents ( )
Sets the transformation's rotate component from the four values in the provided sequence.
Signature: setRotationComponents(seq, asQuaternion=False)
Parameters: seq - sequence of 4 floats or 3 floats and a Rotation Order constant
asQuaternion - bool
Returns: Reference to self.
Description: Sets the transformation's rotate component. If asQuaternion is True then seq must contain four floats representing the x, y, z and w components of a quaternion rotation. If asQuaternion is False then seq must contain three floats representing the x, y and z angles, followed by a Rotation Order constant, which together form an Euler rotation.
OpenMaya.MTransformationMatrix.setRotationOrientation ( )
Sets a quaternion which orients the local rotation space.
Signature: setRotationOrientation(rot)
Parameters: rot - MQuaternion
Returns: Reference to self
Description: Sets the rotation which orients the local rotation space.
OpenMaya.MTransformationMatrix.setScale ( )
Sets the transformation's scale components to the three floats in the provided sequence.
Signature: setScale(seq, space)
Parameters: seq - sequence of 3 floats
space - MSpace constant
Returns: Reference to self.
Description: Sets the transformation's scale components to the three floats in seq.
OpenMaya.MTransformationMatrix.setScalePivot ( )
Sets the transformation's scale pivot component.
Signature: setScalePivot(pivot, space, balance)
Parameters: pivot - MPoint
space - MSpace constant
balance - bool
Returns: Reference to self.
Description: Sets the transformation's scale pivot component.
OpenMaya.MTransformationMatrix.setScalePivotTranslation ( )
Sets the transformation's scale pivot translation component.
Signature: setScalePivotTranslation(trans, space)
Parameters: trans - MVector
space - MSpace constant
Returns: Reference to self.
Description: Sets the transformation's scale pivot translation component.
OpenMaya.MTransformationMatrix.setShear ( )
Sets the transformation's shear component.
Signature: setShear(seq, space)
Parameters: seq - sequence of 3 floats
space - MSpace constant
Returns: Reference to self.
Description: Sets the transformation's shear component.
OpenMaya.MTransformationMatrix.setToRotationAxis ( )
Sets the transformation's rotate component to be a given axis vector and angle in radians.
Signature: setToRotationAxis(axis, rot)
Parameters: axis - MVector
rot - float
Returns: Reference to self.
Description: Sets the transformation's rotate component to be rot radians around axis.
OpenMaya.MTransformationMatrix.setTranslation ( )
Sets the transformation's translation component.
Signature: setTranslation(trans, space)
Parameters: trans - MVector
space - MSpace constant
Returns: Reference to self.
Description: Sets the transformation's translation component.
OpenMaya.MTransformationMatrix.shear ( )
Returns a list containing the transformation's shear components.
Signature: shear(space)
Parameters: space - MSpace constant
Returns: [x, y, z]
Description: Returns a list containing the transformation's shear component.
OpenMaya.MTransformationMatrix.shearBy ( )
Multiplies the transformation's shear components by the three floats in the provided sequence.
Signature: shearBy(seq, space)
Parameters: seq - sequence of 3 floats
space - MSpace constant
Returns: Reference to self.
Description: Multiplies the transformation's shear components by the elements of seq.
OpenMaya.MTransformationMatrix.translateBy ( )
Adds a vector to the transformation's translation component.
Signature: translateBy(vec, space)
Parameters: vec - MVector
space - MSpace constant
Returns: Reference to self.
Description: Adds vec to the transformation's translation component.
OpenMaya.MTransformationMatrix.translation ( )
Returns the transformation's translation component as a vector.
Signature: translation(space)
Parameters: space - MSpace constant
Returns: MVector
Description: Returns the transformation's translation component as a vector.

Member Data Documentation

OpenMaya.MTransformationMatrix.kIdentity = <OpenMaya.MTransformationMatrixobject>
static
Name: kIdentity
Type: MTransformationMatrix
Description: Identity transformation.
OpenMaya.MTransformationMatrix.kInvalid = 0
static
Name: kInvalid
Type: int
Description:  
OpenMaya.MTransformationMatrix.kLast = 7
static
Name: kLast
Type: int
Description: Last entry. Used for counting.
OpenMaya.MTransformationMatrix.kTolerance = 1
static
Name: kTolerance
Type: float
Description: Default tolerance for non-exact equality tests.
OpenMaya.MTransformationMatrix.kXYZ = 1
static
Name: kXYZ
Type: int
Description:  
OpenMaya.MTransformationMatrix.kXZY = 4
static
Name: kXZY
Type: int
Description:  
OpenMaya.MTransformationMatrix.kYXZ = 5
static
Name: kYXZ
Type: int
Description:  
OpenMaya.MTransformationMatrix.kYZX = 2
static
Name: kYZX
Type: int
Description:  
OpenMaya.MTransformationMatrix.kZXY = 3
static
Name: kZXY
Type: int
Description:  
OpenMaya.MTransformationMatrix.kZYX = 6
static
Name: kZYX
Type: int
Description: