| Gtk OpenGL Toolkit (gtkogltk) Reference Manual |
|---|
#include <ogltk/glo_sphere.h> #define GLO_SPHERE_H struct glo_sphere; struct glo_sphere_class; GLobject* glo_sphere_new (gdouble radius, gint slices, gint stacks); gboolean glo_sphere_set_radius (glo_sphere *sphere, gdouble radius); gboolean glo_sphere_set_slices (glo_sphere *sphere, gint slices); gboolean glo_sphere_set_stacks (glo_sphere *sphere, gint stacks);
struct glo_sphere {
GLobject parent_instance;
gdouble radius;
gint slices;
gint stacks;
};GLobject* glo_sphere_new (gdouble radius,
gint slices,
gint stacks);Create an instance of a 3D sphere object.
| radius : | Radius. |
| slices : | Slices. |
| stacks : | Stacks. |
| Returns : | Instance of a 3D sphere as type GLobject. |
gboolean glo_sphere_set_radius (glo_sphere *sphere, gdouble radius);
Set the radius of the sphere
| sphere : | Ogltk Sphere object |
| radius : | Radius. |
| Returns : | TRUE if successful |
gboolean glo_sphere_set_slices (glo_sphere *sphere, gint slices);
Set the number of slices of the sphere on the Z-Axis
| sphere : | Ogltk Sphere object |
| slices : | Slices in Sphere. |
| Returns : | TRUE if successful |
gboolean glo_sphere_set_stacks (glo_sphere *sphere, gint stacks);
Set the number of stacks of the sphere on the Z-Axis
| sphere : | Ogltk Sphere object |
| stacks : | Stacks in Sphere. |
| Returns : | TRUE if successful |
| <<< glo-gear | glo-triangle >>> |