Top | ![]() |
![]() |
![]() |
![]() |
gboolean | g3d_quat_add () |
gboolean | g3d_quat_normalize () |
gboolean | g3d_quat_rotate () |
gboolean | g3d_quat_to_matrix () |
gboolean | g3d_quat_to_rotation_xyz () |
gboolean | g3d_quat_trackball () |
gboolean
g3d_quat_normalize (G3DQuat *q
);
normalize the quaternion to a length of 1.0.
gboolean g3d_quat_rotate (G3DQuat *q
,G3DVector *axis
,G3DFloat angle
);
Encode a rotation around an axis into quaternion.
gboolean g3d_quat_to_matrix (G3DQuat *q
,G3DMatrix *matrix
);
Convert a quaternion to a transformation matrix.
gboolean g3d_quat_to_rotation_xyz (G3DQuat *q
,G3DFloat *rx
,G3DFloat *ry
,G3DFloat *rz
);
Calculate the rotation around the three coordinate axes from a given quaternion.
gboolean g3d_quat_trackball (G3DQuat *q
,G3DFloat x1
,G3DFloat y1
,G3DFloat x2
,G3DFloat y2
,G3DFloat r
);
Emulate a virtual trackball movement and return rotation as quaternion. The x and y values of the starting and end point of the movement have to be in the range -1.0 .. 1.0.