unit handling: >>> from pymel.all import * >>> import pymel.core.datatypes as dt >>> >>> currentUnit(angle=’degree’) u’degree’ >>> e = dt.EulerRotation([math.pi,0,0], unit=’radians’) >>> e dt.EulerRotation([3.14159265359, 0.0, 0.0], unit=’radians’) >>> e2 = dt.EulerRotation([180,0,0], unit=’degrees’) >>> e2 dt.EulerRotation([180.0, 0.0, 0.0]) >>> e.isEquivalent( e2 ) True >>> e == e2 True
units are only displayed when they do not match the current ui unit >>> dt.Angle.getUIUnit() # check current angular unit ‘degrees’ >>> e dt.EulerRotation([3.14159265359, 0.0, 0.0], unit=’radians’) >>> dt.Angle.setUIUnit(‘radians’) # change to radians >>> e dt.EulerRotation([3.14159265359, 0.0, 0.0])
Returns an alternate solution to this rotation. The resulting rotation will be bound between +/- PI, and the rotation order will remain unchanged.
Return type: | EulerRotation |
---|
Derived from api method maya.OpenMaya.MEulerRotation.alternateSolution
alias of MEulerRotation
Converts an euler rotation to a rotation matrix.
Return type: | Matrix |
---|
Derived from api method maya.OpenMaya.MEulerRotation.asMatrix
Converts an euler rotation to a vector. The rotation order component is dropped.
Return type: | Vector |
---|
Derived from api method maya.OpenMaya.MEulerRotation.asVector
Wrap the Quaternion api assign method
Returns the result of bounding this rotation to be within +/- PI. Bounding a rotation to be within +/- PI is defined to be the result of offsetting the rotation by +/- 2nPI (term by term) such that the offset is within +/- PI.
Return type: | EulerRotation |
---|
Derived from api method maya.OpenMaya.MEulerRotation.bound
Sets this euler rotation to be the input rotation that has been bound to be within +/- PI. Bounding a rotation to be within +/- PI is defined to be the result of offsetting the rotation by +/- 2nPI (term by term) such that the offset is within +/- PI.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.boundIt
Returns the closest cut of this rotation to “dst”. The closest cut of rotation A to rotation B is defined to be the rotation that is +/- 2nPI to rotation A (term by term) and within +/- PI to rotation B.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.closestCut
Returns the euler rotation that is the closest solution to the “dst” euler rotation.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.closestSolution
Decompose a rotation matrix into the desired euler angles with the specified order.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.decompose
Wrap the MEulerRotation api get method
Perform an incremental rotation by the specified axis and angle. The rotation is broken down and performed in smaller steps so that the angles update properly.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.incrementalRotateBy
Returns the inverse of this euler rotation. The rotation order will be reversed.
Return type: | EulerRotation |
---|
Derived from api method maya.OpenMaya.MEulerRotation.inverse
Performs an in place inversion of this euler rotation. The rotation order will be reversed.
Return type: | EulerRotation |
---|
Derived from api method maya.OpenMaya.MEulerRotation.invertIt
This method returns true if this euler rotation is zero, within some given tolerance.
Parameters : |
|
---|---|
Return type: | bool |
Derived from api method maya.OpenMaya.MEulerRotation.isZero
Returns the reordering of this euler rotation, such that the euler rotation will have the specified rotation order.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.reorder
Performs an in place reordering of this euler rotation, such that the euler rotation will have the specified rotation order.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.reorderIt
Sets this euler rotation to an alternate solution of the input rotation. The resulting rotation will be bound between +/- PI, and the rotation order will remain unchanged.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.setToAlternateSolution
Sets this rotation to be the closest cut of “src” to “dst”. The closest cut of rotation A to rotation B is defined to be the rotation that is +/- 2nPI to rotation A (term by term) and within +/- PI to rotation B.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.setToClosestCut
Sets this euler rotation to the euler rotation that is the closest solution of the “src” euler rotation to the “dst” euler rotation.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.setToClosestSolution
Sets the euler rotation to the values contained in the vector and with the specified rotation order.
Parameters : |
|
---|---|
Return type: |
Derived from api method maya.OpenMaya.MEulerRotation.setValue