| Gtk OpenGL Toolkit (gtkogltk) Reference Manual |
|---|
#include <ogltk/glu_cylinder.h> struct glu_cylinder; enum eGluCylinderCap; GLobject* glu_cylinder_new (gdouble base, gdouble top, gdouble height, gint slices, gint loops); gboolean glu_cylinder_set_base (glu_cylinder *cylinder, gdouble base); gboolean glu_cylinder_set_top (glu_cylinder *cylinder, gdouble top); gboolean glu_cylinder_set_height (glu_cylinder *cylinder, gdouble height); gboolean glu_cylinder_set_slices (glu_cylinder *cylinder, gint slices); gboolean glu_cylinder_set_loops (glu_cylinder *cylinder, gint loops); gboolean glu_cylinder_set_cap (glu_cylinder *cylinder, eGluCylinderCap cap); gdouble glu_cylinder_get_base (glu_cylinder *cylinder); gdouble glu_cylinder_get_top (glu_cylinder *cylinder); gdouble glu_cylinder_get_height (glu_cylinder *cylinder); gint glu_cylinder_get_slices (glu_cylinder *cylinder); gint glu_cylinder_get_loops (glu_cylinder *cylinder); eGluCylinderCap glu_cylinder_get_cap (glu_cylinder *cylinder);
struct glu_cylinder {
glo_gluquad parent_instance;
gdouble base;
gdouble top;
gdouble height;
gint slices;
gint loops;
eGluCylinderCap cap;
};typedef enum
{
GLU_CYLINDER_CAP_NONE,
GLU_CYLINDER_CAP_TOP,
GLU_CYLINDER_CAP_LAST
}eGluCylinderCap;GLobject* glu_cylinder_new (gdouble base,
gdouble top,
gdouble height,
gint slices,
gint loops);Create an instance of GLobject of type gluquad/cylinder.
| base : | Set the base size. |
| top : | Set the top size. |
| height : | Set the height. |
| slices : | Set the number of sides. |
| loops : | Set the number of segments along z-axis. |
| Returns : | A new instance of gluquad/cylinder. |
gboolean glu_cylinder_set_base (glu_cylinder *cylinder, gdouble base);
Set the base size of the cylinder.
| cylinder : | gluquad Cylinder Object. |
| base : | Base size of cylinder. |
| Returns : | True if set. |
gboolean glu_cylinder_set_top (glu_cylinder *cylinder, gdouble top);
Set the top size of the cylinder.
| cylinder : | gluquad Cylinder Object. |
| top : | Top size of cylinder. |
| Returns : | True if set. |
gboolean glu_cylinder_set_height (glu_cylinder *cylinder, gdouble height);
Set the height of the cylinder.
| cylinder : | gluquad Cylinder Object. |
| height : | Hieght of cylinder. |
| Returns : | True if set. |
gboolean glu_cylinder_set_slices (glu_cylinder *cylinder, gint slices);
Set the number of slices which make up the cylinder.
| cylinder : | gluquad Cylinder Object. |
| slices : | Number of slices which make up the cylinder. |
| Returns : | True if set. |
gboolean glu_cylinder_set_loops (glu_cylinder *cylinder, gint loops);
Set the number of segments which make up the cylinder along the z-axis.
| cylinder : | gluquad Cylinder Object. |
| loops : | Number of segments along z-axis. |
| Returns : | True if set. |
gboolean glu_cylinder_set_cap (glu_cylinder *cylinder, eGluCylinderCap cap);
Place a cap on the cylinder (So you can't see through the ends. Note: This only works for one end of the cylinder for now. (FIXME)
| cylinder : | gluquad Cylinder Object. |
| cap : | End which has a cap put on it. |
| Returns : | True if cap was set. |
gdouble glu_cylinder_get_base (glu_cylinder *cylinder);
Get the base size of the cylinder.
| cylinder : | gluquad Cylinder Object. |
| Returns : | Base size of cylinder. |
gdouble glu_cylinder_get_top (glu_cylinder *cylinder);
Get the top size of the cylinder.
| cylinder : | gluquad Cylinder Object. |
| Returns : | Top size of cylinder. |
gdouble glu_cylinder_get_height (glu_cylinder *cylinder);
Get the height of the cylinder.
| cylinder : | gluquad Cylinder Object. |
| Returns : | Height of cylinder. |
gint glu_cylinder_get_slices (glu_cylinder *cylinder);
Get the number of slices which make up the cylinder.
| cylinder : | gluquad Cylinder Object. |
| Returns : | Number of slices. |
gint glu_cylinder_get_loops (glu_cylinder *cylinder);
Get the number of segments which make up the cylinder..
| cylinder : | gluquad Cylinder Object. |
| Returns : | Number of segments. |
eGluCylinderCap glu_cylinder_get_cap (glu_cylinder *cylinder);
Get were the caps are put on the cylinder. Note : (FIXME) Will only return top cuz that is the only place where it works right now.
| cylinder : | gluquad Cylinder Object. |
| Returns : | eGluCylinderCap |
| <<< glu-disk | Ogltk Type Reference >>> |