Quat

This is a Python binding to the C++ class Mantid::Kernel::Quat.

class mantid.kernel.Quat((object)self)

Quaternions are the 3D generalization of complex numbers. Quaternions are used for roations in 3D spaces and often implemented for computer graphics applications.

__init__((object)self) → None :
Construct a default Quat that will perform no transformation.
__init__( (object)self, (float)w, (float)a, (float)b, (float)c) -> None :
Constructor with values
__init__( (object)self, (V3D)src, (V3D)dest) -> None :
Construct a Quat between two vectors
__init__( (object)self, (V3D)rX, (V3D)rY, (V3D)rZ) -> None :
Construct a Quaternion that performs a reference frame rotation. The initial X,Y,Z vectors are aligned as expected: X=(1,0,0), Y=(0,1,0), Z=(0,0,1)
__init__( (object)self, (float)deg, (V3D)axis) -> None :
Constructor from an angle(degrees) and an axis.
getEulerAngles((Quat)self[, (str)convention='YZX']) → std_vector_dbl :

Default convention is ‘YZX’.

imagI((Quat)self) → float :

Returns the ith imaginary component

imagJ((Quat)self) → float :

Returns the jth imaginary component

imagK((Quat)self) → float :

Returns the kth imaginary component

len((Quat)self) → float :

Returns the ‘length’ of the quaternion

len2((Quat)self) → float :

Returns the square of the ‘length’ of the quaternion

real((Quat)self) → float :

Returns the real part of the quaternion

rotate((Quat)self, (V3D)v) → None :

Rotate the quaternion by the given vector