SET LIGHT SOURCE STATE(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET LIGHT SOURCE STATE − create structure element to enable and disable light sources
SYNOPSIS
C Syntax
void
pset_light_src_state ( activation, deactivation )
Pint_list∗activation;activation list
Pint_list∗deactivation;deactivation list
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
SET LIGHT SOURCE STATE creates an element in the currently open structure enabling and disabling specified light source representations on the table of defined light sources stored on the workstation state list. The current light source state determines the number and type of light sources used to shade the primitives that follow in the structure network.
C Input Parameters
activation
This is a list of light sources to be activated. This structure specifies both an integer value indicating the number of light source representations to be activated and a pointer to a list specifying the index numbers of the light source representations to be activated. Pint_list is defined as:
typedef struct {
Pintnum_ints;/∗ number of light sources to activate ∗/
Pint∗ints;/∗ list of light sources to activate ∗/
} Pint_list;
deactivation
This is a list of light sources to be deactivated. This structure specifies both an integer value indicating the number of light source representations to be deactivated and a pointer to a list specifying the index numbers of the light source representations to be deactivated. Pint_list is defined as:
typedef struct {
Pintnum_ints;/∗ number of light sources to activate ∗/
Pint∗ints;/∗ list of light sources to activate ∗/
} Pint_list;
Execution
Depending on the edit mode, a SET LIGHT SOURCE STATE element is inserted into the open structure after the element pointer or replaces the element pointed at by the element pointer. The element pointer is then updated to point to this SET LIGHT SOURCE STATE element.
When the SET LIGHT SOURCE STATE element is traversed, the light source representations listed in the activation list are added to the current light source state entry in the traversal state list, and the representations listed in the deactivation list are deleted. The light source representations are defined with the SET LIGHT SOURCE REPRESENTATION subroutine.
The current light source state list defines the ambient, diffuse, and specular light sources that may be used when applying lighting and shading to area-defining or polyline primitives. The types of light sources used are defined by the SET INTERIOR SHADING METHOD and SET POLYLINE SHADING METHOD subroutines.
ERRORS
005Ignoring function, function requires state (PHOP,∗,STOP,∗)
133Ignoring function, one of the entries in the activation list or deactivation list is less than one (1)
135Ignoring function, the same entry exists in both the activation list and the deactivation list
SEE ALSO
SET LIGHT SOURCE REPRESENTATION (3P+)
INQUIRE LIGHT SOURCE FACILITIES (3P+)
September 02, 1992