Name | Type | Description |
---|---|---|
kIdentity | MEulerRotation | Rotation (0, 0, 0), kXYZ order |
kTolerance | float | Default tolerance for non-exact equality tests. |
Rotation Orders | ||
kXYZ | int | |
kYZX | int | |
kZXY | int | |
kXZY | int | |
kYXZ | int | |
kZYX | int |
Name | Parameters | Returns | Description |
---|---|---|---|
computeAlternateSolution(rot) | rot - MEulerRotation | MEulerRotation | Returns a rotation equivalent to rot which is not simply a multiple of it. |
computeBound(rot) | rot - MEulerRotation | MEulerRotation | Returns a rotation equivalent to rot but bound within +/- PI. |
computeClosestCut(src, target) | src - MEulerRotation
target - MEulerRotation |
MEulerRotation | Returns the rotation which is full spin multiples of src and comes closest to target. |
computeClosestSolution(src, target) | src - MEulerRotation
target - MEulerRotation |
MEulerRotation | Returns the rotation equivalent to src which comes closest to target. |
decompose(matrix, order) | matrix - MMatrix
order - Rotation Order constant |
MEulerRotation | 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. |
None.
Signature | Parameters | Description |
---|---|---|
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. |
Signature | Parameters | Returns | Description |
---|---|---|---|
alternateSolution() | MEulerRotation | 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. | |
asMatrix() | MMatrix | Returns the rotation as an equivalent matrix. | |
asQuaternion() | MQuaternion | Returns the rotation as an equivalent quaternion. | |
asVector() | MVector | Returns the X, Y and Z rotations as a vector. Rotation order is ignored. | |
bound() | MEulerRotation | Returns a new MEulerRotation having this rotation, but with each rotation component bound within +/- PI. | |
boundIt() | Reference to self. | In-place bounding of each rotation component to lie wthin +/- PI. | |
boundIt(rot) | rot - MEulerRotation | Reference to self. | Replace this rotation with the bound version of rot. |
closestCut(target) | target - MEulerRotation | MEulerRotation | Returns a new MEulerRotation containing the rotation which is full spin multiples of this one and comes closest to target. |
closestSolution(target) | target - MEulerRotation | MEulerRotation | Returns a new MEulerRotation containing the rotation equivalent to this one which comes closest to target. |
incrementalRotateBy(axis, angle) | axis - MVector
angle - float |
Reference to self. | Increase this rotation by angle radians around the specified axis. The update is done in series of small increments to avoid flipping. |
inverse() | MEulerRotation | Returns a new MEulerRotation containing the inverse rotation of this one and reversed rotation order. | |
invertIt() | Reference to self. | In-place inversion of the rotation. Rotation order is also reversed. | |
isEquivalent(other, tolerance=kTolerance) | other - MEulerRotation
tolerance - float |
bool | 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. |
isZero(tolerance=kTolerance) | tolerance - float | bool | Inexact zero test. Returns true if the X, Y and Z components are each within tolerance of 0.0. |
reorder(order) | order - Rotation Order constant | MEulerRotation | Returns a new MEulerRotation having this rotation, reordered to use the given rotation order. |
reorderIt(order) | order - Rotation Order constant | Reference to self. | In-place reordering to use the given rotation order. |
setToAlternateSolution() | Reference to self. | Replace with a different but equivalent rotation, having the same rotation order and with each rotation component lying wthin +/- PI. | |
setToAlternateSolution(rot) | rot - MEulerRotation | Reference to self. | Replace this rotation with the alternate solution for rot. |
setToClosestCut(target) | target - MEulerRotation | Reference to self. | Replace this rotation with the one which is full spin multiples of this one and comes closest to target. |
setToClosestCut(src, target) | src - MEulerRotation
target - MEulerRotation |
Reference to self. | Replace this rotation with the closest cut of src to target. |
setToClosestSolution(target) | target - MEulerRotation | Reference to self. | Replace this rotation with the equivalent rotation which comes closest to target. |
setToClosestSolution(src, target) | src - MEulerRotation
target - MEulerRotation |
Reference to self. | Replace this rotation with the closest solution of src to target. |
setValue(rot) | rot - MEulerRotation | Reference to self. | Set the rotation and order to match that of rot. |
setValue(quat) | quat - MQuaternion | Reference to self. | Set the rotation and order to provide a rotation equivalent to that of rot. |
setValue(mat) | mat - MMatrix | Reference to self. | 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. |
setValue(vec, order=kXYZ) | vec - MVector
order - Rotation Order constant |
Reference to self. | Set the rotation order to order and set the X, Y and Z rotations to the corresponding components of vec. |
setValue(seq, order=kXYZ) | seq - sequence of three floats
order - Rotation Order constant |
Reference to self. | Set the rotation order to order and the X, Y and Z rotations to the corresponding components of seq. |
setValue(x, y, z, order=kXYZ) | x - float
y - float z - float order - Rotation Order constant |
Reference to self. | Set the given rotation order and x, y and z rotation components. |
Name | Type | Access | Description |
---|---|---|---|
x | float | RW | X component of rotation, in radians |
y | float | RW | Y component of rotation, in radians |
z | float | RW | Z component of rotation, in radians |
order | int | RW | One of the Rotation Order constants. |
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.
Operation | Result |
---|---|
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. |
== | 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.
© 2011 Autodesk, Inc. All rights reserved.