paya.runtime.plugs.Quaternion#
- class Quaternion(*args, **kwargs)#
Inheritance
Math
Attribute
Attribute
PyNode
ProxyUnicode
- get(plug=False, default=None, **kwargs)#
Overloads
paya.runtime.plugs.Attribute.get()
to returnQuaternion
instances instead of tuples.
- __add__(other, swap=False)#
Implements addition (
+
).- Parameters
other – a value or plug of dimension 1 or 4
- __sub__(other, swap=False)#
Implements subtraction (
-
).- Parameters
other – a value or plug of dimension 1 or 4
- __mul__(other, swap=False)#
Implements multiplication (
*
). Slerp interpolation from an identity quaternion will be used if other is a scalar.- Parameters
other – a value or plug of dimension 1 or 4
- __neg__()#
Implements unary negation (
-
) viaquatNegate
.
- inverse()#
- Returns
The inverse of this quaternion.
- Return type
- normal()#
- Returns
The normalized quaternion.
- Return type
- conjugate()#
- Returns
The conjugated quaternion.
- Return type
- blend(other, weight=0.5, swap=False, angleInterpolation='Shortest')#
Blends this quaternion towards
other
.- Parameters
other (list,
Quaternion
,Quaternion
) – the quaternion value or plug towards which to blendweight/w (int, float,
Math1D
) – ‘other’ will be fully active at 1.0; defaults to 0.5swap (bool) – reverse operands, defaults to False
angleInterpolation (str (an enum name from
QuatSlerp.angleInterpolation
, int, orMath1D
) – the type of slerp interpolation to use, defaults to ‘Shortest’
- Returns
The blended output.
- Return type
- asEulerRotation(rotateOrder='xyz')#
Returns this quaternion as an euler compound.
- Parameters
rotateOrder/ro (int, str,
Math1D
) – the rotate order, defaults to ‘xyz’- Returns
The euler rotation.
- Return type
Math3D
- asAxisAngle()#
Returns this quaternion as a tuple of axis, angle outputs.
- Returns
The axis (vector) and angle outputs.
- Return type