c4d.Quaternion¶
- 
class 
c4d.Quaternion¶ Has methods for conversion to and from a rotation matrix:
GetMatrix/SetMatrix/SetMatrixNorm.New in version R17.048.
Attributes
Methods Signatures
Returns a new   | 
Derives a rotation matrix from the quaternion.  | 
|
Derives quaternion values from a rotation matrix.  | 
|
Derives quaternion values from a normalized rotation matrix.  | 
|
Derives quaternion values from a HPB rotation.  | 
|
Sets the quaternion values directly.  | 
Methods Documentation
- 
Quaternion.__init__(self)¶ Returns a new
Quaternioninstance.
- 
Quaternion.GetMatrix(self)¶ Derives a rotation matrix from the quaternion.
- Return type
 - Returns
 The rotation matrix.
- 
Quaternion.SetMatrix(self, m)¶ Derives quaternion values from a rotation matrix.
- Parameters
 m (c4d.Matrix) – The rotation matrix to set.
- 
Quaternion.SetMatrixNorm(self, m)¶ Derives quaternion values from a normalized rotation matrix.
- Parameters
 m (c4d.Matrix) – The normalized rotation matrix to set.
- 
Quaternion.SetHPB(self, hpb)¶ Derives quaternion values from a HPB rotation.
- Parameters
 hpb (c4d.Vector) – The HPB rotation.
- 
Quaternion.SetAxis(self, ax, ww)¶ Sets the quaternion values directly.
- Parameters
 ax (c4d.Vector) – The direction vector.
ww (float) – The rotation angle.