![]() | ![]() | ![]() | Gtk OpenGL Toolkit (gtkogltk) Reference Manual | ![]() |
---|
#include <ogltk/gear.h> struct glo_gear; GLobject* glo_gear_new (gfloat inner_radius, gfloat outer_radius, gfloat width, gint teeth, gfloat tooth_depth); gboolean glo_gear_set_inner_radius (glo_gear *gear, gfloat inner); gboolean glo_gear_set_outer_radius (glo_gear *gear, gfloat outer); gboolean glo_gear_set_width (glo_gear *gear, gfloat width); gboolean glo_gear_set_teeth (glo_gear *gear, gint teeth); gboolean glo_gear_set_tooth_depth (glo_gear *gear, gfloat depth); gfloat glo_gear_get_inner_radius (glo_gear *gear); gfloat glo_gear_get_outer_radius (glo_gear *gear); gfloat glo_gear_get_width (glo_gear *gear); gint glo_gear_get_teeth (glo_gear *gear); gfloat glo_gear_get_tooth_depth (glo_gear *gear);
struct glo_gear { GLobject parent_instance; /* Properties */ gfloat inner_radius; gfloat outer_radius; gfloat width; gint teeth; gfloat tooth_depth; };
GLobject* glo_gear_new (gfloat inner_radius, gfloat outer_radius, gfloat width, gint teeth, gfloat tooth_depth);
Create an instance of a 3D gear object.
inner_radius : | Radius of the outer edge of the gear. |
outer_radius : | Radius of the middle space of the gear. |
width : | Width of the gear |
teeth : | How many teeth (total) on the gear |
tooth_depth : | How high is each tooth. |
Returns : | Instance of a 3D gear as type GLobject. |
gboolean glo_gear_set_inner_radius (glo_gear *gear, gfloat inner);
Set the space (hollow) in the middle part of the gear.
gear : | Gear GLobject |
inner : | Inner Radius of the gear |
Returns : | True if the inner radius was set. |
gboolean glo_gear_set_outer_radius (glo_gear *gear, gfloat outer);
Set the radius of the entire wheel (not including) the size of the teeth
gear : | Gear GLobject |
outer : | Total size of the gear |
Returns : | True if the the outer radius has been set. |
gboolean glo_gear_set_width (glo_gear *gear, gfloat width);
Set the thickness of the gear (wheel).
gear : | Gear GLobject |
width : | The width of the gear. |
Returns : | True if the width was set. |
gboolean glo_gear_set_teeth (glo_gear *gear, gint teeth);
Set the total number of teeth which will circle the outter edge of the gear.
gear : | Gear GLobject |
teeth : | Number of teeth for the gear. |
Returns : |
|
gboolean glo_gear_set_tooth_depth (glo_gear *gear, gfloat depth);
Set the height of each tooth on the gear.
gear : | Gear GLobject |
depth : | Height of each tooth. |
Returns : | True if the depth was set. |
gfloat glo_gear_get_inner_radius (glo_gear *gear);
Get the inner radius size of the gear.
gear : | Gear GLobject |
Returns : | The inner radius as a float |
gfloat glo_gear_get_outer_radius (glo_gear *gear);
Get the outer radius size of the gear.
gear : | Gear GLobject |
Returns : | The outer radius as a float |
gfloat glo_gear_get_width (glo_gear *gear);
Get the width size of the gear.
gear : | Gear GLobject |
Returns : | The width as a float |
gint glo_gear_get_teeth (glo_gear *gear);
Get the number of teeth on the gear.
gear : | Gear GLobject |
Returns : | The number of teeth as an signed integer. |
<<< glo-cube | glu-disk >>> |