![]() |
![]() |
![]() |
Libg3d Reference Manual | ![]() |
---|---|---|---|---|
gboolean g3d_vector_normal (gfloat ax, gfloat ay, gfloat az, gfloat bx, gfloat by, gfloat bz, gfloat *nx, gfloat *ny, gfloat *nz); gboolean g3d_vector_unify (gfloat *nx, gfloat *ny, gfloat *nz); gboolean g3d_vector_transform (gfloat *x, gfloat *y, gfloat *z, gfloat *matrix);
gboolean g3d_vector_normal (gfloat ax, gfloat ay, gfloat az, gfloat bx, gfloat by, gfloat bz, gfloat *nx, gfloat *ny, gfloat *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 |
gboolean g3d_vector_unify (gfloat *nx, gfloat *ny, gfloat *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 |
gboolean g3d_vector_transform (gfloat *x, gfloat *y, gfloat *z, gfloat *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 |