Next: Drawing Objects Up: Programmer's Reference for the Previous: Defining the View

Defining Lights

Each window has a set of N_LIGHTS lights, each of which can be configured with different types, attributes, and on/off state. The routines which control these are:


public  void  G_set_ambient_light(
    Gwindow        window,
    Colour         colour )

Sets the amount of ambient light globally available in the scene.


public  void  G_define_light(
    Gwindow         window,
    int             light_index,
    Light_types     type,
    Colour          colour,
    Vector          *direction,
    Point           *position,
    Real            spot_exponent,
    Real            spot_angle )

Defines the light corresponding to the specified index to be one of the types DIRECTIONAL_LIGHT, POINT_LIGHT, or SPOT_LIGHT. The direction argument is only used for DIRECTIONAL_LIGHT and SPOT_LIGHT types. The position argument is only used for POINT_LIGHT and SPOT_LIGHT types. The spot_exponent and spot_angle are only used for SPOT_LIGHT types.


public  void  G_set_light_state(
    Gwindow         window,
    int             light_index,
    BOOLEAN         state )

Turns on or off the specified light.



Next: Drawing Objects Up: Programmer's Reference for the Previous: Defining the View


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