Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_light_source_state(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET LIGHT SOURCE STATE(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

SET LIGHT SOURCE STATE − create structure element to enable and disable light sources

SYNOPSIS

C Syntax

void
psetlightsrcstate ( activation, deactivation )
Pintlst∗activation;activation list
Pintlst∗deactivation;deactivation list

FORTRAN Syntax

SUBROUTINE pslss ( NACT, NDEACT, ACT, DEACT )
INTEGERNACTlength of activation list
INTEGERNDEACTlength of deactivation list
INTEGERACT(NACT)light source activation list
INTEGERDEACT(NDEACT)light source 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 which follow in the structure network. 

This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard. 

C Input Parameters

All of the following data types are predefined in phigs.h. 

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. Pintlst is defined as:

typedef struct {
Pintnumber;/∗ number of light sources to activate ∗/
Pint∗integers;/∗ list of light sources to activate ∗/
} Pintlst;

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. Pintlst is defined as:

typedef struct {
Pintnumber;/∗ number of light sources to deactivate ∗/
Pint    ∗integers;/∗ list of light sources to deactivate ∗/
} Pintlst;

FORTRAN Input Parameters

NACT
The length of the light source list to be activated.

NDEACT
The length of the light source list to be deactivated.

ACT(NACT)
The light source list to be activated.

DEACT(NDEACT)
The light source list to be deactivated.

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 activate are added to the current light source state entry in the PHIGS Extension traversal state list, and the representations listed in deactivate are deleted from the list. 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,∗)

SEE ALSO

SET LIGHT SOURCE REPRESENTATION (3P+)
INQUIRE LIGHT SOURCE FACILITIES (3P+)

Sun Release 4.0  —  Last change: 13 July 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026