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. --- .../mimesh/libg3d-0.0.8/doc/api/xml/vector.xml | 184 +++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml (limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml') diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml new file mode 100644 index 0000000..d306c67 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml @@ -0,0 +1,184 @@ + + + + +vector +3 +LIBG3D Library + + + +vector +Vector manipulation and calculation + + + + +Synopsis + + + +#include <g3d/vector.h> + +typedef G3DVector; +gboolean g3d_vector_normal (G3DFloat ax, + G3DFloat ay, + G3DFloat az, + G3DFloat bx, + G3DFloat by, + G3DFloat bz, + G3DFloat *nx, + G3DFloat *ny, + G3DFloat *nz); +gboolean g3d_vector_unify (G3DFloat *nx, + G3DFloat *ny, + G3DFloat *nz); +gboolean g3d_vector_transform (G3DFloat *x, + G3DFloat *y, + G3DFloat *z, + G3DMatrix *matrix); + + + + + + + + + + + + +Description + +A vector is a one-dimensional array of floating point data. + + +Declare it as statically as: + + +G3DVector vector[3]; + + +or allocate it dynamically with: + + +G3DVector *vector = g3d_vector_new(3, 1); + + + + + + +Details + +G3DVector +G3DVectortypedef G3DFloat G3DVector; + + +Vector element type. + + + + +g3d_vector_normal () +g3d_vector_normalgboolean g3d_vector_normal (G3DFloat ax, + G3DFloat ay, + G3DFloat az, + G3DFloat bx, + G3DFloat by, + G3DFloat bz, + G3DFloat *nx, + G3DFloat *ny, + G3DFloat *nz); + +calculate the normal from a plane defined by two vectors + + + +ax : + x component first vector + +ay : + y component first vector + +az : + z component first vector + +bx : + x component second vector + +by : + y component second vector + +bz : + z component second vector + +nx : + x component resulting normal + +ny : + y component resulting normal + +nz : + z component resulting normal + +Returns : TRUE on success, FALSE else + + + +g3d_vector_unify () +g3d_vector_unifygboolean g3d_vector_unify (G3DFloat *nx, + G3DFloat *ny, + G3DFloat *nz); + +Transforms the given vector to the unit vector. + + + +nx : + x component of vector + +ny : + y component of vector + +nz : + z component of vector + +Returns : TRUE on success, FALSE else + + + +g3d_vector_transform () +g3d_vector_transformgboolean g3d_vector_transform (G3DFloat *x, + G3DFloat *y, + G3DFloat *z, + G3DMatrix *matrix); + +Transforms the given vector corresponding to the given matrix + + + +x : + x component of vector + +y : + y component of vector + +z : + z component of vector + +matrix : + transformation matrix (4x4) + +Returns : TRUE on success, FALSE else + + + + + + + + + -- cgit v1.1