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 @@ + + + + +quat + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

quat

+

quat — quaternion helpers

+
+
+

Synopsis

+
+
+#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);
+
+
+
+

Description

+

+

+

+ +

+
+
+

Details

+
+

G3DQuat

+
typedef G3DFloat G3DQuat;
+
+

+Quaternion element type.

+

+ +

+
+
+
+

g3d_quat_add ()

+
gboolean            g3d_quat_add                        (G3DQuat *qr,
+                                                         G3DQuat *q1,
+                                                         G3DQuat *q2);
+

+Add two quats.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

qr :

result quat +

q1 :

first quat +

q2 :

second quat +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_normalize ()

+
gboolean            g3d_quat_normalize                  (G3DQuat *q);
+

+normalize the quaternion to a length of 1.0.

+

+ +

+
++ + + + + + + + + + +

q :

a quaternion +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_rotate ()

+
gboolean            g3d_quat_rotate                     (G3DQuat *q,
+                                                         G3DVector *axis,
+                                                         G3DFloat angle);
+

+Encode a rotation around an axis into quaternion.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

q :

resulting quat +

axis :

rotation axis +

angle :

rotation angle +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_to_matrix ()

+
gboolean            g3d_quat_to_matrix                  (G3DQuat *q,
+                                                         G3DMatrix *matrix);
+

+Convert a quaternion to a transformation matrix.

+

+ +

+
++ + + + + + + + + + + + + + +

q :

source quat +

matrix :

resulting matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_to_rotation_xyz ()

+
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.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

q :

a quaternion +

rx :

rotation around x axis +

ry :

rotation around y axis +

rz :

rotation around z axis +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_trackball ()

+
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.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

q :

resulting quaternion +

x1 :

x value of first point +

y1 :

y value of first point +

x2 :

x value of second point +

y2 :

y value of second point +

r :

radius of virtual trackball, usually 0.8 +

Returns :

TRUE on success, FALSE else +
+
+
+
+ + + -- cgit v1.1