vispy.util.quaternion.
Quaternion
Bases: object
object
A quaternion is a mathematically convenient way to describe rotations.
conjugate
Obtain the conjugate of the quaternion.
This is simply the same quaternion but with the sign of the imaginary (vector) parts reversed.
copy
Create an exact copy of this quaternion.
create_from_axis_angle
Classmethod to create a quaternion from an axis-angle representation. (angle should be in radians).
create_from_euler_angles
Classmethod to create a quaternion given the euler angles.
exp
Returns the exponent of the quaternion. (not tested)
get_axis_angle
Get the axis-angle representation of the quaternion. (The angle is in radians)
get_matrix
Create a 4x4 homography matrix that represents the rotation of the quaternion.
inverse
returns q.conjugate()/q.norm()**2
So if the quaternion is unit length, it is the same as the conjugate.
log
Returns the natural logarithm of the quaternion. (not tested)
norm
Returns the norm of the quaternion
norm = w**2 + x**2 + y**2 + z**2
normalize
Returns a normalized (unit length) version of the quaternion.
rotate_point
Rotate a Point instance using this quaternion.