Next: Opening Graphics Windows Up: Programmer's Reference for the Previous: Compiling and Linking

Types and Macros

There are several types and macros defined for use with the BIC Graphics library, which will be described here:


typedef  enum  {
                 NORMAL_PLANES,
                 OVERLAY_PLANES,
                 N_BITPLANE_TYPES } Bitplane_types;

These refer to the graphics bitplanes, and presently only support the normal bitplanes and the overlay bitplanes.


typedef  enum  { PIXEL_VIEW, SCREEN_VIEW, WORLD_VIEW, MODEL_VIEW,
                 N_VIEW_TYPES }     View_types;

This type defines the various coordinate systems possible for specifying positions. The PIXEL_VIEW specifies a pixel oriented coordinate system, while the SCREEN_VIEW specifies a coordinate system which varies from 0 to 1 across the window. The WORLD_VIEW specifies a three dimensional world coordinate (which will eventually be transformed to a position in the graphics window). The MODEL_VIEW is the same as WORLD_VIEW with the addition of an extra model transformation.


typedef  window_struct   *Gwindow;

This is the basic type for manipulating graphics windows.


typedef  enum {
                DIRECTIONAL_LIGHT,
                POINT_LIGHT,
                SPOT_LIGHT
              } Light_types;

This type defines the three types of lights available in the graphics system.


typedef  enum  { FLAT_SHADING, GOURAUD_SHADING }  Shading_types;

This type defines the two methods of shading surfaces (polygons). Usually the user will desire the smoother GOURAUD_SHADING.


typedef  enum  {
                   NO_EVENT,
                   TERMINATE_INTERACTION_EVENT,
                   KEY_DOWN_EVENT,
                   KEY_UP_EVENT,
                   MOUSE_MOVEMENT_EVENT,
                   LEFT_MOUSE_DOWN_EVENT,
                   LEFT_MOUSE_UP_EVENT,
                   MIDDLE_MOUSE_DOWN_EVENT,
                   MIDDLE_MOUSE_UP_EVENT,
                   RIGHT_MOUSE_DOWN_EVENT,
                   RIGHT_MOUSE_UP_EVENT,
                   REDRAW_OVERLAY_EVENT,
                   WINDOW_REDRAW_EVENT,
                   WINDOW_RESIZE_EVENT,
                   WINDOW_ICONIZED_EVENT,
                   WINDOW_DEICONIZED_EVENT,
                   WINDOW_QUIT_EVENT,
                   WINDOW_LEAVE_EVENT,
                   WINDOW_ENTER_EVENT,
                   N_EVENT_TYPES
               } Event_types;

This is the list of graphics events that can occur in an interactive graphics application.


#define  LEFT_ARROW_KEY   245
#define  RIGHT_ARROW_KEY  246
#define  DOWN_ARROW_KEY   247
#define  UP_ARROW_KEY     248
#define  LEFT_SHIFT_KEY   249
#define  RIGHT_SHIFT_KEY  250
#define  LEFT_CTRL_KEY    251
#define  RIGHT_CTRL_KEY   252
#define  LEFT_ALT_KEY     253
#define  RIGHT_ALT_KEY    254

These are constants which refer to certain special keys on the keyboard.



Next: Opening Graphics Windows Up: Programmer's Reference for the Previous: Compiling and Linking


david@pet.mni.mcgill.ca
Fri Feb 17 15:39:43 EST 1995