Contained Within
Find More Documentation
Featured Support Resources
| PDF로 이 문서 다운로드
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
FORTRAN Syntax
-
SUBROUTINE pslss ( NACT, NDEACT, ACT, DEACT )
-
-
INTEGER NACT length of activation list
INTEGER NDEACT length of deactivation list
INTEGER ACT(NACT) light source activation list
INTEGER DEACT(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 PLUS and is not part of the PHIGS standard.
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 {
-
-
Pint num_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 {
-
-
Pint num_ints; /* number of light sources to activate * /
Pint * ints; /* list of light sources to activate * /
- } Pint_list;
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
-
- 005
- Ignoring function, function requires state (PHOP, * ,STOP, * )
SEE ALSO
-
SET LIGHT SOURCE REPRESENTATION (3PP)
-
INQUIRE LIGHT SOURCE FACILITIES (3PP)
|
|