OpenMaya.MEulerRotation Class Reference

Class Description

X, Y and Z rotations, applied in a specified order.

Constructors

SignatureParametersDescription
MEulerRotation()  

Default constructor. Returns a new MEulerRotation object, initialized to the identity rotation.

MEulerRotation(src) src - MEulerRotation

Copy constructor. Returns a new MEulerRotation object with the same value as src.

MEulerRotation(vec, order=kXYZ) vec - MVector
order - Rotation Order constant

Returns a new MEulerRotation with the given order and its X, Y and Z rotations set to the corresponding elements of vec.

MEulerRotation(seq, order=kXYZ) seq - sequence of three floats.
order - Rotation Order constant

Returns a new MEulerRotation with the given order and its X, Y and Z rotations set to the corresponding elements of seq.

MEulerRotation(x, y, z, order=kXYZ) x - float
y - float
z - float
order - Rotation Order constant
Returns a new MEulerRotation with the specified x, y and z rotations and the given rotation order.

Sequence Support

An MEulerRotation is treated as a sequence of three float values: [x, y, z].

len() returns 3.

Indexing and element assignment are supported.

Deletion, concatenation, repetition and slicing are not supported.

Number Support

OperationResult
MEulerRotation = MEulerRotation + MEulerRotation

Component-by-component addition. Right operand is first reordered to match left, if necessary.

MEulerRotation += MEulerRotation

In-place addition. Right operand is first reordered to match left, if necessary. Returns a new reference to the rotation.

MEulerRotation = MEulerRotation - MEulerRotation

Component-by-component subtraction. Right operand is first reordered to match left, if necessary.

MEulerRotation -= MEulerRotation

In-place subtraction. Right operand is first reordered to match left, if necessary. Returns a new reference to the rotation.

MEulerRotation = -MEulerRotation

Each component is negated. Rotation order is unchanged.

MEulerRotation = MEulerRotation * MEulerRotation

Multiplication of rotations. Rotation order of left operand is preserved.

MEulerRotation *= MEulerRotation

In-place multiplication of rotations. Rotation order of left operand is preserved. Returns a new reference to the rotation.

MEulerRotation = MEulerRotation * MQuaternion

Multiplication of rotation by a quaternion. Rotation order of left operand is preserved.

MEulerRotation *= MQuaternion

In-place multiplication of rotation by a quaternion. Rotation order of left operand is preserved. Returns a new reference to the rotation.

MEulerRotation = MEulerRotation * float

Component-by-component multiplication by a scalar.

MEulerRotation *= float

In-place multiplication by a scalar. Returns a new reference to the rotation.

Comparison Support

==

Exact equality comparison. True if the order and rotational components of the left operand are exactly equal to those of the right.

!= Exact inequality comparison. True if the order or the left and right operands are different or if any of their rotational components are not exactly equal.

All other comparison operators will raise a TypeError exception.

 


+ Inheritance diagram for OpenMaya.MEulerRotation:

Public Member Functions

__add__ ()
 
__delitem__ ()
 
__eq__ ()
 
__ge__ ()
 
__getitem__ ()
 
__gt__ ()
 
__iadd__ ()
 
__imul__ ()
 
__init__ ()
 
__isub__ ()
 
__le__ ()
 
__len__ ()
 
__lt__ ()
 
__mul__ ()
 
__ne__ ()
 
__neg__ ()
 
__radd__ ()
 
__repr__ ()
 
__rmul__ ()
 
__rsub__ ()
 
__setitem__ ()
 
__str__ ()
 
__sub__ ()
 
alternateSolution ()
 
asMatrix ()
 
asQuaternion ()
 
asVector ()
 
bound ()
 
boundIt ()
 
closestCut ()
 
closestSolution ()
 
incrementalRotateBy ()
 
inverse ()
 
invertIt ()
 
isEquivalent ()
 
isZero ()
 
reorder ()
 
reorderIt ()
 
setToAlternateSolution ()
 
setToClosestCut ()
 
setToClosestSolution ()
 
setValue ()
 

Static Public Member Functions

computeAlternateSolution ()
 
computeBound ()
 
computeClosestCut ()
 
computeClosestSolution ()
 
decompose ()
 

Static Public Attributes

tuple kIdentity = maya.api.OpenMaya.MEulerRotation(0, 0, 0, maya.api.OpenMaya.MEulerRotation.kXYZ)
 
int kTolerance = 1
 
Rotation Orders
int kXYZ = 0
 
int kXZY = 3
 
int kYXZ = 4
 
int kYZX = 1
 
int kZXY = 2
 
int kZYX = 5
 

Properties

 order
 
 x
 
 y
 
 z
 

Constructor & Destructor Documentation

OpenMaya.MEulerRotation.__init__ ( )
x.__init__(...) initializes x; see help(type(x)) for signature

Member Function Documentation

OpenMaya.MEulerRotation.__add__ ( )
x.__add__(y) <==> x+y
OpenMaya.MEulerRotation.__delitem__ ( )
x.__delitem__(y) <==> del x[y]
OpenMaya.MEulerRotation.__eq__ ( )
x.__eq__(y) <==> x==y
OpenMaya.MEulerRotation.__ge__ ( )
x.__ge__(y) <==> x>=y
OpenMaya.MEulerRotation.__getitem__ ( )
x.__getitem__(y) <==> x[y]
OpenMaya.MEulerRotation.__gt__ ( )
x.__gt__(y) <==> x>y
OpenMaya.MEulerRotation.__iadd__ ( )
x.__iadd__(y) <==> x+=y
OpenMaya.MEulerRotation.__imul__ ( )
x.__imul__(y) <==> x*=y
OpenMaya.MEulerRotation.__isub__ ( )
x.__isub__(y) <==> x-=y
OpenMaya.MEulerRotation.__le__ ( )
x.__le__(y) <==> x<=y
OpenMaya.MEulerRotation.__len__ ( )
x.__len__() <==> len(x)
OpenMaya.MEulerRotation.__lt__ ( )
x.__lt__(y) <==> x<y
OpenMaya.MEulerRotation.__mul__ ( )
x.__mul__(y) <==> x*y
OpenMaya.MEulerRotation.__ne__ ( )
x.__ne__(y) <==> x!=y
OpenMaya.MEulerRotation.__neg__ ( )
x.__neg__() <==> -x
OpenMaya.MEulerRotation.__radd__ ( )
x.__radd__(y) <==> y+x
OpenMaya.MEulerRotation.__repr__ ( )
x.__repr__() <==> repr(x)
OpenMaya.MEulerRotation.__rmul__ ( )
x.__rmul__(y) <==> y*x
OpenMaya.MEulerRotation.__rsub__ ( )
x.__rsub__(y) <==> y-x
OpenMaya.MEulerRotation.__setitem__ ( )
x.__setitem__(i, y) <==> x[i]=y
OpenMaya.MEulerRotation.__str__ ( )
x.__str__() <==> str(x)
OpenMaya.MEulerRotation.__sub__ ( )
x.__sub__(y) <==> x-y
OpenMaya.MEulerRotation.alternateSolution ( )
Returns an equivalent rotation which is not simply a multiple.
Signature: alternateSolution()
Parameters:  
Returns: MEulerRotation
Description: Returns a new MEulerRotation with a different rotation which is equivalent to this one and has the same rotation order. Each rotation component will lie within +/- PI.
OpenMaya.MEulerRotation.asMatrix ( )
Returns the rotation as an equivalent matrix.
Signature: asMatrix()
Parameters:  
Returns: MMatrix
Description: Returns the rotation as an equivalent matrix.
OpenMaya.MEulerRotation.asQuaternion ( )
Returns the rotation as an equivalent quaternion.
Signature: asQuaternion()
Parameters:  
Returns: MQuaternion
Description: Returns the rotation as an equivalent quaternion.
OpenMaya.MEulerRotation.asVector ( )
Returns the X, Y and Z rotations as a vector.
Signature: asVector()
Parameters:  
Returns: MVector
Description: Returns the X, Y and Z rotations as a vector. Rotation order is ignored.
OpenMaya.MEulerRotation.bound ( )
Returns a new MEulerRotation having this rotation, but with each rotation component bound within +/- PI.
Signature: bound()
Parameters:  
Returns: MEulerRotation
Description: Returns a new MEulerRotation having this rotation, but with each rotation component bound within +/- PI.
OpenMaya.MEulerRotation.boundIt ( )
In-place bounding of each rotation component to lie wthin +/- PI.
Signature: boundIt()
Parameters:  
Returns: Reference to self.
Description: In-place bounding of each rotation component to lie wthin +/- PI.
Signature: boundIt(rot)
Parameters: rot - MEulerRotation
Returns: Reference to self.
Description: Replace this rotation with the bound version of rot.
OpenMaya.MEulerRotation.closestCut ( )
Returns the rotation which is full spin multiples of this one and comes closest to target.
Signature: closestCut(target)
Parameters: target - MEulerRotation
Returns: MEulerRotation
Description: Returns a new MEulerRotation containing the rotation which is full spin multiples of this one and comes closest to target.
OpenMaya.MEulerRotation.closestSolution ( )
Returns the equivalent rotation which comes closest to a target.
Signature: closestSolution(target)
Parameters: target - MEulerRotation
Returns: MEulerRotation
Description: Returns a new MEulerRotation containing the rotation equivalent to this one which comes closest to target.
OpenMaya.MEulerRotation.computeAlternateSolution ( )
static
Returns an equivalent rotation which is not simply a multiple.
Name: computeAlternateSolution(rot)
Parameters: rot - MEulerRotation
Returns: MEulerRotation
Description: Returns a rotation equivalent to rot which is not simply a multiple of it.
OpenMaya.MEulerRotation.computeBound ( )
static
Returns an equivalent rotation with each rotation component bound within +/- PI.
Name: computeBound(rot)
Parameters: rot - MEulerRotation
Returns: MEulerRotation
Description: Returns a rotation equivalent to rot but bound within +/- PI.
OpenMaya.MEulerRotation.computeClosestCut ( )
static
Returns the rotation which is full spin multiples of the src and comes closest to target.
Name: computeClosestCut(src, target)
Parameters: src - MEulerRotation
target - MEulerRotation
Returns: MEulerRotation
Description: Returns the rotation which is full spin multiples of src and comes closest to target.
OpenMaya.MEulerRotation.computeClosestSolution ( )
static
Returns the equivalent rotation which comes closest to a target.
Name: computeClosestSolution(src, target)
Parameters: src - MEulerRotation
target - MEulerRotation
Returns: MEulerRotation
Description: Returns the rotation equivalent to src which comes closest to target.
OpenMaya.MEulerRotation.decompose ( )
static
Extracts a rotation from a matrix.
Name: decompose(matrix, order)
Parameters: matrix - MMatrix
order - Rotation Order constant
Returns: MEulerRotation
Description: Extracts from matrix a valid rotation having the specified rotation order. Note that this may be just one of several different rotations which could each give rise to the same matrix.
OpenMaya.MEulerRotation.incrementalRotateBy ( )
Increase this rotation by a given angle around the specified axis. The update is done in series of small increments to avoid flipping.
Signature: incrementalRotateBy(axis, angle)
Parameters: axis - MVector
angle - float
Returns: Reference to self.
Description: Increase this rotation by angle radians around the specified axis. The update is done in series of small increments to avoid flipping.
OpenMaya.MEulerRotation.inverse ( )
Returns a new MEulerRotation containing the inverse rotation of this one and reversed rotation order.
Signature: inverse()
Parameters:  
Returns: MEulerRotation
Description: Returns a new MEulerRotation containing the inverse rotation of this one and reversed rotation order.
OpenMaya.MEulerRotation.invertIt ( )
In-place inversion of the rotation. Rotation order is also reversed.
Signature: invertIt()
Parameters:  
Returns: Reference to self.
Description: In-place inversion of the rotation. Rotation order is also reversed.
OpenMaya.MEulerRotation.isEquivalent ( )
Returns true if this rotation has the same order as another and their X, Y and Z components are within a tolerance of each other.
Signature: isEquivalent(other, tolerance=kTolerance)
Parameters: other - MEulerRotation
tolerance - float
Returns: bool
Description: Inexact equality test. Returns true if this rotation has the same order as other and their X, Y and Z components are within tolerance of each other.
OpenMaya.MEulerRotation.isZero ( )
Returns true if the X, Y and Z components are each within a tolerance of 0.0.
Signature: isZero(tolerance=kTolerance)
Parameters: tolerance - float
Returns: bool
Description: Inexact zero test. Returns true if the X, Y and Z components are each within tolerance of 0.0.
OpenMaya.MEulerRotation.reorder ( )
Returns a new MEulerRotation having this rotation, reordered to use the given rotation order.
Signature: reorder(order)
Parameters: order - Rotation Order constant
Returns: MEulerRotation
Description: Returns a new MEulerRotation having this rotation, reordered to use the given rotation order.
OpenMaya.MEulerRotation.reorderIt ( )
In-place reordering to use the given rotation order.
Signature: reorderIt(order)
Parameters: order - Rotation Order constant
Returns: Reference to self.
Description: In-place reordering to use the given rotation order.
OpenMaya.MEulerRotation.setToAlternateSolution ( )
Replace this rotation with an alternate solution.
Signature: setToAlternateSolution()
Parameters:  
Returns: Reference to self.
Description: Replace with a different but equivalent rotation, having the same rotation order and with each rotation component lying wthin +/- PI.
Signature: setToAlternateSolution(rot)
Parameters: rot - MEulerRotation
Returns: Reference to self.
Description: Replace this rotation with the alternate solution for rot.
OpenMaya.MEulerRotation.setToClosestCut ( )
Replace this rotation with the closest cut to a target.
Signature: setToClosestCut(target)
Parameters: target - MEulerRotation
Returns: Reference to self.
Description: Replace this rotation with the one which is full spin multiples of this one and comes closest to target.
Signature: setToClosestCut(src, target)
Parameters: src - MEulerRotation
target - MEulerRotation
Returns: Reference to self.
Description: Replace this rotation with the closest cut of src to target.
OpenMaya.MEulerRotation.setToClosestSolution ( )
Replace this rotation with the closest solution to a target.
Signature: setToClosestSolution(target)
Parameters: target - MEulerRotation
Returns: Reference to self.
Description: Replace this rotation with the equivalent rotation which comes closest to target.
Signature: setToClosestSolution(src, target)
Parameters: src - MEulerRotation
target - MEulerRotation
Returns: Reference to self.
Description: Replace this rotation with the closest solution of src to target.
OpenMaya.MEulerRotation.setValue ( )
Set the rotation.
Signature: setValue(rot)
Parameters: rot - MEulerRotation
Returns: Reference to self.
Description: Set the rotation and order to match that of rot.
Signature: setValue(quat)
Parameters: quat - MQuaternion
Returns: Reference to self.
Description: Set the rotation and order to provide a rotation equivalent to that of rot.
Signature: setValue(mat)
Parameters: mat - MMatrix
Returns: Reference to self.
Description: Set the rotation order and the X, Y and Z rotations to those extracted from mat, as per the decompose() method, using the current order.
Signature: setValue(vec, order=kXYZ)
Parameters: vec - MVector
order - Rotation Order constant
Returns: Reference to self.
Description: Set the rotation order to order and set the X, Y and Z rotations to the corresponding components of vec.
Signature: setValue(seq, order=kXYZ)
Parameters: seq - sequence of three floats
order - Rotation Order constant
Returns: Reference to self.
Description: Set the rotation order to order and the X, Y and Z rotations to the corresponding components of seq.
Signature: setValue(x, y, z, order=kXYZ)
Parameters: x - float
y - float
z - float
order - Rotation Order constant
Returns: Reference to self.
Description: Set the given rotation order and x, y and z rotation components.

Member Data Documentation

OpenMaya.MEulerRotation.kIdentity = maya.api.OpenMaya.MEulerRotation(0, 0, 0, maya.api.OpenMaya.MEulerRotation.kXYZ)
static
Name: kIdentity
Type: MEulerRotation
Description: Rotation (0, 0, 0), kXYZ order
OpenMaya.MEulerRotation.kTolerance = 1
static
Name: kTolerance
Type: float
Description: Default tolerance for non-exact equality tests.
OpenMaya.MEulerRotation.kXYZ = 0
static
Name: kXYZ
Type: int
Description:  
OpenMaya.MEulerRotation.kXZY = 3
static
Name: kXZY
Type: int
Description:  
OpenMaya.MEulerRotation.kYXZ = 4
static
Name: kYXZ
Type: int
Description:  
OpenMaya.MEulerRotation.kYZX = 1
static
Name: kYZX
Type: int
Description:  
OpenMaya.MEulerRotation.kZXY = 2
static
Name: kZXY
Type: int
Description:  
OpenMaya.MEulerRotation.kZYX = 5
static
Name: kZYX
Type: int
Description:  

Property Documentation

OpenMaya.MEulerRotation.order
static
 Rotation order
Name: order
Type: int
Access: RW
Description: One of the Rotation Order constants.
OpenMaya.MEulerRotation.x
static
 X rotation in radians
Name: x
Type: float
Access: RW
Description: X component of rotation, in radians
OpenMaya.MEulerRotation.y
static
 Y rotation in radians
Name: y
Type: float
Access: RW
Description: Y component of rotation, in radians
OpenMaya.MEulerRotation.z
static
 Z rotation in radians
Name: z
Type: float
Access: RW
Description: Z component of rotation, in radians