![]() | ![]() | ![]() | Gtk OpenGL Toolkit (gtkogltk) Reference Manual | ![]() |
---|
#include <ogltk/glt_matrix.h> struct glt_coordinates; struct glt_rotation; gboolean glt_coordinate_set_x (gltCoord *coord, gfloat x); gboolean glt_coordinate_set_y (gltCoord *coord, gfloat y); gboolean glt_coordinate_set_z (gltCoord *coord, gfloat z); gfloat glt_coordinate_get_x (gltCoord *coord); gfloat glt_coordinate_get_y (gltCoord *coord); gfloat glt_coordinate_get_z (gltCoord *coord); gboolean glt_rotate_enable (gltRotate *rotate, gboolean enable); gboolean glt_rotate_set_angle (gltRotate *rotate, gfloat angle); gboolean glt_rotate_set_x (gltRotate *rotate, gfloat x); gboolean glt_rotate_set_y (gltRotate *rotate, gfloat y); gboolean glt_rotate_set_z (gltRotate *rotate, gfloat z); gboolean glt_rotate_is_enabled (gltRotate *rotate); gfloat glt_rotate_get_angle (gltRotate *rotate); gfloat glt_rotate_get_x (gltRotate *rotate); gfloat glt_rotate_get_y (gltRotate *rotate); gfloat glt_rotate_get_z (gltRotate *rotate); #define glt_translate_set_x (o,x) #define glt_translate_set_y (o,x) #define glt_translate_set_z (o,x) #define glt_translate_get_x (o) #define glt_translate_get_y (o) #define glt_translate_get_z (o)
struct glt_rotation { gboolean set; gfloat angle; gfloat x; gfloat y; gfloat z; };
gboolean glt_coordinate_set_x (gltCoord *coord, gfloat x);
Set X axis in gltCoord object.
coord : | gltCoord Object |
x : | X value; |
Returns : | True if set. |
gboolean glt_coordinate_set_y (gltCoord *coord, gfloat y);
Set Y axis in gltCoord object.
coord : | gltCoord Object |
y : | Y value; |
Returns : | True if set. |
gboolean glt_coordinate_set_z (gltCoord *coord, gfloat z);
Set Z axis in gltCoord object.
coord : | gltCoord Object |
z : | Z value; |
Returns : | True if set. |
gfloat glt_coordinate_get_x (gltCoord *coord);
Get X axis in gltCoord object.
coord : | gltCoord Object |
Returns : | gfloat. |
gfloat glt_coordinate_get_y (gltCoord *coord);
Get Y axis in gltCoord object.
coord : | gltCoord Object |
Returns : | gfloat. |
gfloat glt_coordinate_get_z (gltCoord *coord);
Get Z axis in gltCoord object.
coord : | gltCoord Object |
Returns : | gfloat. |
gboolean glt_rotate_enable (gltRotate *rotate, gboolean enable);
Enable the rotation flag.
rotate : | gltRotate Object |
enable : | Enable rotation matrix |
Returns : | True if state changed. |
gboolean glt_rotate_set_angle (gltRotate *rotate, gfloat angle);
Set the angle to rotate.
rotate : | gltRotate Object |
angle : | Angle to rotate |
Returns : | True if set. |
gboolean glt_rotate_set_x (gltRotate *rotate, gfloat x);
Set the angle to rotate along the X axis.
rotate : | gltRotate Object |
x : | Rotate along axis |
Returns : | True if set. |
gboolean glt_rotate_set_y (gltRotate *rotate, gfloat y);
Set the angle to rotate along the Y axis.
rotate : | gltRotate Object |
y : | Rotate along axis |
Returns : | True if set. |
gboolean glt_rotate_set_z (gltRotate *rotate, gfloat z);
Set the angle to rotate along the Z axis.
rotate : | gltRotate Object |
z : | Rotate along axis |
Returns : | True if set. |
gboolean glt_rotate_is_enabled (gltRotate *rotate);
Check if rotation is enabled
rotate : | gltRotate Object |
Returns : | True if enabled. |
gfloat glt_rotate_get_angle (gltRotate *rotate);
Get the angle set to rotate.
rotate : | gltRotate Object |
Returns : | Angle. |
gfloat glt_rotate_get_x (gltRotate *rotate);
Check if rotation is along the X axis.
rotate : | gltRotate Object |
Returns : | 1.0 if set, 0.0 if not.. |
gfloat glt_rotate_get_y (gltRotate *rotate);
Check if rotation is along the Y axis.
rotate : | gltRotate Object |
Returns : | 1.0 if set, 0.0 if not.. |
gfloat glt_rotate_get_z (gltRotate *rotate);
Check if rotation is along the Z axis.
rotate : | gltRotate Object |
Returns : | 1.0 if set, 0.0 if not.. |
#define glt_translate_set_x(o,x) glt_coordinate_set_x((gltCoord*)o,x)
Set the translation X axis
o : | gltCoord object |
x : | Set Axis |
#define glt_translate_set_y(o,x) glt_coordinate_set_y((gltCoord*)o,x)
Set the translation Y axis
o : | gltCoord object |
x : | Set Axis |
#define glt_translate_set_z(o,x) glt_coordinate_set_z((gltCoord*)o,x)
Set the translation Z axis
o : | gltCoord object |
x : | Set Axis |
#define glt_translate_get_x(o) glt_coordinate_get_x((gltCoord*)o)
Get the translation X axis
o : | gltCoord object |
#define glt_translate_get_y(o) glt_coordinate_get_y((gltCoord*)o)
Get the translation Y axis
o : | gltCoord object |
#define glt_translate_get_z(o) glt_coordinate_get_z((gltCoord*)o)
Get the translation Z axis
o : | gltCoord object |
<<< glt-color | Bibliography >>> |