quaternion
- class granoo3.lib.quaternion
Bases:
Boost.Python.instancea quaternion able to model rigid body rotation and rotating frame operation
Attributes Summary
r real component
x imaginary component
y imaginary component
z imaginary component
Methods Summary
angle(arg1)get the angle value
axis(arg1)get the axis value of the quaternion
axis_angle(arg1, arg2, arg3)get the axis and the angle
clear(arg1)clear the quaternion component values
clear_unit(arg1)make a unit quaternion (0,0,0,1)
conjugate(arg1)get the conjugate of the current quaternion
get_r(arg1)get the r real component value
get_x(arg1)get the x imaginary component value
get_y(arg1)get the x imaginary component value
get_z(arg1)get the y imaginary component value
inverse_rotate(arg1, arg2)inverse rotate a vector
norm(arg1)get the norm
normalize(arg1)normalize the current quaternion
rotate(arg1, arg2)rotate a vector
set_angle(arg1, arg2)set the angle of the quaternion
set_axis_angle(arg1, arg2, arg3)set the axis/angle values of the quaternion
set_vec_from_to(arg1, arg2, arg3)set the quaternion for rotating a unit vector to another one
slerp(arg1, arg2, arg3)slerp a quaternion (spherical interpolation)
squared_norm(arg1)get the squared norm
to_rotation_tensor(arg1)get the corresponding rotation matrix
Attributes Documentation
- r
r real component
- x
x imaginary component
- y
y imaginary component
- z
z imaginary component
Methods Documentation
- angle((quaternion)arg1) float[STATIC]
get the angle value
- axis_angle((quaternion)arg1, (vector)arg2, (float)arg3) None[STATIC]
get the axis and the angle
- clear((quaternion)arg1) None[STATIC]
clear the quaternion component values
- clear_unit((quaternion)arg1) None[STATIC]
make a unit quaternion (0,0,0,1)
- conjugate((quaternion)arg1) quaternion[STATIC]
get the conjugate of the current quaternion
- get_r((quaternion)arg1) float[STATIC]
get the r real component value
- get_x((quaternion)arg1) float[STATIC]
get the x imaginary component value
- get_y((quaternion)arg1) float[STATIC]
get the x imaginary component value
- get_z((quaternion)arg1) float[STATIC]
get the y imaginary component value
- norm((quaternion)arg1) float[STATIC]
get the norm
- normalize((quaternion)arg1) float[STATIC]
normalize the current quaternion
- set_angle((quaternion)arg1, (float)arg2) None[STATIC]
set the angle of the quaternion
- set_axis_angle((quaternion)arg1, (vector)arg2, (float)arg3) None[STATIC]
set the axis/angle values of the quaternion
- set_vec_from_to((quaternion)arg1, (vector)arg2, (vector)arg3) None[STATIC]
set the quaternion for rotating a unit vector to another one
- slerp((quaternion)arg1, (quaternion)arg2, (float)arg3) quaternion[STATIC]
slerp a quaternion (spherical interpolation)
- squared_norm((quaternion)arg1) float[STATIC]
get the squared norm