From cb3716ffb584fe0f593b6f1669a8efdba1305104 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 29 Mar 2016 02:16:55 +1000 Subject: Added my version of libg3d and friends. --- .../libg3d-0.0.8/doc/api/html/libg3d-quat.html | 346 +++++++++++++++++++++ 1 file changed, 346 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html (limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html') diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html new file mode 100644 index 0000000..af4e6aa --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html @@ -0,0 +1,346 @@ + + +
+ +![]() |
+![]() |
+![]() |
+libg3d Reference Manual | ++ |
---|---|---|---|---|
+ +#include <g3d/quat.h> + +typedef G3DQuat; +gboolean g3d_quat_add (G3DQuat *qr, + G3DQuat *q1, + G3DQuat *q2); +gboolean g3d_quat_normalize (G3DQuat *q); +gboolean g3d_quat_rotate (G3DQuat *q, + G3DVector *axis, + G3DFloat angle); +gboolean g3d_quat_to_matrix (G3DQuat *q, + G3DMatrix *matrix); +gboolean g3d_quat_to_rotation_xyz (G3DQuat *q, + G3DFloat *rx, + G3DFloat *ry, + G3DFloat *rz); +gboolean g3d_quat_trackball (G3DQuat *q, + G3DFloat x1, + G3DFloat y1, + G3DFloat x2, + G3DFloat y2, + G3DFloat r); ++
gboolean g3d_quat_add (G3DQuat *qr, + G3DQuat *q1, + G3DQuat *q2);+
+Add two quats.
++ +
+
|
+result quat + | +
|
+first quat + | +
|
+second quat + | +
Returns : |
+TRUE on success, FALSE else + | +
gboolean g3d_quat_normalize (G3DQuat *q);+
+normalize the quaternion to a length of 1.0.
++ +
+
|
+a quaternion + | +
Returns : |
+TRUE on success, FALSE else + | +
gboolean g3d_quat_rotate (G3DQuat *q, + G3DVector *axis, + G3DFloat angle);+
+Encode a rotation around an axis into quaternion.
++ +
+
|
+resulting quat + | +
|
+rotation axis + | +
|
+rotation angle + | +
Returns : |
+TRUE on success, FALSE else + | +
gboolean g3d_quat_to_matrix (G3DQuat *q, + G3DMatrix *matrix);+
+Convert a quaternion to a transformation matrix.
++ +
+
|
+source quat + | +
|
+resulting matrix + | +
Returns : |
+TRUE on success, FALSE else + | +
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.
++ +
+
|
+a quaternion + | +
|
+rotation around x axis + | +
|
+rotation around y axis + | +
|
+rotation around z axis + | +
Returns : |
+TRUE on success, FALSE else + | +
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.
++ +
+
|
+resulting quaternion + | +
|
+x value of first point + | +
|
+y value of first point + | +
|
+x value of second point + | +
|
+y value of second point + | +
|
+radius of virtual trackball, usually 0.8 + | +
Returns : |
+TRUE on success, FALSE else + | +