glo-gluquad

Name

glo-gluquad -- Base class for GLU QUAD objects.

Synopsis


#include <ogltk/glo_gluquad.h>


struct      glo_gluquad;
enum        eGLUQuadDrawStyle;
enum        eGLUQuadNormal;
enum        eGLUQuadOrientation;
gboolean    glo_gluquad_set_draw_style      (glo_gluquad *quad,
                                             eGLUQuadDrawStyle style);
gboolean    glo_gluquad_set_normal          (glo_gluquad *quad,
                                             eGLUQuadNormal normal);
gboolean    glo_gluquad_set_orientation     (glo_gluquad *quad,
                                             eGLUQuadOrientation orient);
gboolean    glo_gluquad_set_texture         (glo_gluquad *quad,
                                             gboolean enable);
eGLUQuadDrawStyle glo_gluquad_get_draw_style
                                            (glo_gluquad *quad);
eGLUQuadNormal glo_gluquad_get_normal       (glo_gluquad *quad);
eGLUQuadOrientation glo_gluquad_get_orientation
                                            (glo_gluquad *quad);
gboolean    glo_gluquad_get_texture         (glo_gluquad *quad);

Description

Details

struct glo_gluquad

struct glo_gluquad {

    GLobject                parent_instance;
    
    eGLUQuadDrawStyle       drawstyle;
    eGLUQuadNormal          normal;
    eGLUQuadOrientation     orientation;
    gboolean                texture;
    
    GLUquadricObj           *quad_obj;
};


enum eGLUQuadDrawStyle

typedef enum
{
    GLUQUAD_DRAW_NONE,

    GLUQUAD_DRAW_POINT          = GLU_POINT,
    GLUQUAD_DRAW_LINE           = GLU_LINE,
    GLUQUAD_DRAW_FILL           = GLU_FILL,
    GLUQUAD_DRAW_SILHOUETTE     = GLU_SILHOUETTE,
    
    GLUQUAD_DRAW_LAST           = 0xFFFFFFFF
    
}eGLUQuadDrawStyle;


enum eGLUQuadNormal

typedef enum
{
    /* This is the order in which values are defined in glu.h */
    GLUQUAD_NORMAL_SMOOTH       = GLU_SMOOTH,
    GLUQUAD_NORMAL_FLAT         = GLU_FLAT,
    GLUQUAD_NORMAL_NONE         = GLU_NONE,
    
    GLUQUAD_NORMAL_LAST         = 0xFFFFFFFF

}eGLUQuadNormal;


enum eGLUQuadOrientation

typedef enum
{
    GLUQUAD_ORIENTATION_NONE,
    
    GLUQUAD_ORIENTATION_OUTSIDE = GLU_OUTSIDE,
    GLUQUAD_ORIENTATION_INSIDE  = GLU_INSIDE,
    
    GLUQUAD_ORIENTATION_LAST    = 0xFFFFFFFF

}eGLUQuadOrientation;


glo_gluquad_set_draw_style ()

gboolean    glo_gluquad_set_draw_style      (glo_gluquad *quad,
                                             eGLUQuadDrawStyle style);

Set the drawing style for a gluquad object.

quad :

Radius of the outer edge of the gear.

style :

Drawing style for object.

Returns :

True if the style was set successfully.


glo_gluquad_set_normal ()

gboolean    glo_gluquad_set_normal          (glo_gluquad *quad,
                                             eGLUQuadNormal normal);

Set the normal drawing type for this object.

quad :

Radius of the outer edge of the gear.

normal :

Normal for object.

Returns :

True if the drawing normal was set.


glo_gluquad_set_orientation ()

gboolean    glo_gluquad_set_orientation     (glo_gluquad *quad,
                                             eGLUQuadOrientation orient);

Set the view orientation of the object.

quad :

Radius of the outer edge of the gear.

orient :

View orientation of object.

Returns :

True if the orientation was set.


glo_gluquad_set_texture ()

gboolean    glo_gluquad_set_texture         (glo_gluquad *quad,
                                             gboolean enable);

Enable texture mapping for this gluquad object.

quad :

Radius of the outer edge of the gear.

enable :

Enable textures for this gluqaud object.

Returns :

True if state was changed.


glo_gluquad_get_draw_style ()

eGLUQuadDrawStyle glo_gluquad_get_draw_style
                                            (glo_gluquad *quad);

Get the drawing style for this object.

quad :

Radius of the outer edge of the gear.

Returns :

eGLUQuadDrawStyle


glo_gluquad_get_normal ()

eGLUQuadNormal glo_gluquad_get_normal       (glo_gluquad *quad);

Get the drawing normal for this object.

quad :

Radius of the outer edge of the gear.

Returns :

eGLUQuadNormal


glo_gluquad_get_orientation ()

eGLUQuadOrientation glo_gluquad_get_orientation
                                            (glo_gluquad *quad);

Get the drawing orientation for this object.

quad :

Radius of the outer edge of the gear.

Returns :

eGLUQuadOrientation


glo_gluquad_get_texture ()

gboolean    glo_gluquad_get_texture         (glo_gluquad *quad);

Check if texture mapping is enabled.

quad :

Radius of the outer edge of the gear.

Returns :

True if texture mapping is enabled.