![]() |
![]() |
![]() |
Libg3d Reference Manual | ![]() |
---|---|---|---|---|
gboolean g3d_matrix_identity (gfloat *matrix); gboolean g3d_matrix_multiply (gfloat *m1, gfloat *m2, gfloat *rm); gboolean g3d_matrix_translate (gfloat x, gfloat y, gfloat z, gfloat *rm); gboolean g3d_matrix_rotate (gfloat angle, gfloat ax, gfloat ay, gfloat az, gfloat *rm); gboolean g3d_matrix_rotate_xyz (gfloat rx, gfloat ry, gfloat rz, gfloat *rm); gboolean g3d_matrix_scale (gfloat x, gfloat y, gfloat z, gfloat *rm); gboolean g3d_matrix_transpose (gfloat *matrix); gboolean g3d_matrix_dump (gfloat *matrix);
gboolean g3d_matrix_identity (gfloat *matrix);
Sets the given matrix to the identity matrix.
matrix : |
4x4 matrix (float[16]) |
Returns : | TRUE on success, FALSE else |
gboolean g3d_matrix_multiply (gfloat *m1, gfloat *m2, gfloat *rm);
Multiplies the matrixes.
m1 : |
first matrix |
m2 : |
second matrix |
rm : |
resulting matrix |
Returns : | TRUE on success, FALSE else |
gboolean g3d_matrix_translate (gfloat x, gfloat y, gfloat z, gfloat *rm);
Adds a translation to the the matrix.
x : |
x translation |
y : |
y translation |
z : |
z translation |
rm : |
resulting matrix |
Returns : | TRUE on success, FALSE else |
gboolean g3d_matrix_rotate (gfloat angle, gfloat ax, gfloat ay, gfloat az, gfloat *rm);
Adds a rotation to the matrix.
angle : |
rotation angle |
ax : |
x component of rotation axis |
ay : |
y component of rotation axis |
az : |
z component of rotation axis |
rm : |
resulting matrix |
Returns : | TRUE on success, FALSE else |
gboolean g3d_matrix_rotate_xyz (gfloat rx, gfloat ry, gfloat rz, gfloat *rm);
Adds a rotation around the 3 coordinate system axes to the matrix.
rx : |
rotation around x axis |
ry : |
rotation around y axis |
rz : |
rotation around z axis |
rm : |
resulting matrix |
Returns : | TRUE on success, FALSE else |
gboolean g3d_matrix_scale (gfloat x, gfloat y, gfloat z, gfloat *rm);
Adds a scaling to the matrix.
x : |
x factor |
y : |
y factor |
z : |
z factor |
rm : |
resulting matrix |
Returns : | TRUE on success, FALSE else |
gboolean g3d_matrix_transpose (gfloat *matrix);
Transposes the matrix.
matrix : |
the matrix |
Returns : | TRUE on success, FALSE else |