Previous Next Up Title Contents Index Functions Index Top Library

SET LIGHT SOURCE REPRESENTATION

PSLSR


CALL SEQUENCE

CALL PSLSR (WKID, LSI, LSTYP, LDR, DATREC)

INPUT PARAMETERS

INTEGER WKID
Workstation identifier
INTEGER LSI
Light source index
INTEGER LSTYP
Light source type
INTEGER LDR
Length of data record array
CHARACTER*80 DATREC(LDR)
Data record

PHIGS STATE

(PHOP, WSOP,*,*)

EFFECT

The values are placed in the light source bundle table at index LSI in the workstation state list.

The light source bundle table is initialized from the WKID workstation description table

Light source TYPES are:

PAMB ambient

PDIRE directional

PPOSI positional

PSPOT spot

During structure traversal, the current light source state in the traversal state list is used to select zero or more entries in the light source table of a workstation. Entries in the current light source state, that are not defined in a workstation's light source table are ignored.

During structure traversal, if the colour type of any selected light source representation is indirect, and the colour index is not defined on the workstation, colour index 1 is used for that light source.

DATREC parameters to build LIGHT SOURCE DATA RECORD for LSTYP = 1(PAMB) :

The IA array contains :

- The colour type (CT)

- The actual data of colour index, if CT is indirect.

- The number of components of colour value(NCC)

The RA array contains :

- The actual data of colour component values as required by CT.

Common element :

IL = 1+*

IA(1) = colour type = CT

IA(2) = number of components of colour value = NCC

RL = *

RA = ()

SL = O

LSTR = ()

STR = ()

Individual element :

CASE colour type = 0(indirect) :

IA(2) = specular colour index

CASE colour type = 1(RGB) or 2(CIE) or 3(HSV) or 4(HLS) :

RA = element 1 through NCC contain the specular colour components

DATREC parameters to build LIGHT SOURCE DATA RECORD for LSTYP = 2(PDIRE):

The IA array contains :

- The colour type (CT)

- The actual data of colour index, if CT is indirect.

- The number of components of colour value(NCC)

The RA array contains :

- The actual data of direction vector

- The actual data of colour component values as required by CT.

Common element :

IL = 1+*

IA(1) = colour type = CT

IA(2) = number of components of colour value = NCC

RL = 3+*

RA(1) = x-value of direction vector (WC)

RA(2) = y-value of direction vector (WC)

RA(3) = z-value of direction vector (WC)

SL = O

LSTR = ()

STR = ()

Individual element :

CASE colour type = 0(indirect) :

IA(2) = colour index

CASE colour type = 1(RGB) or 2(CIE) or 3(HSV) or 4(HLS) :

RA = element 4 through 3+NCC contain the specular colour components

DATREC parameters to build LIGHT SOURCE DATA RECORD for LSTYP = 3(PPOSI) :

The IA array contains :

- The colour type (CT)

- The actual data of colour index, if CT is indirect.

- The number of components of colour value(NCC)

The RA array contains :

- The actual data of direction vector

- The actual data of attenuation coefficients

- The actual data of colour component values as required by CT.

Common element :

IL = 1+*

IA(1) = colour type = CT

IA(2) = number of components of colour value = NCC

RL = 5+*

RA(1) = x-value of direction vector (WC)

RA(2) = y-value of direction vector (WC)

RA(3) = z-value of direction vector (WC)

RA = element 4 through 5 contain the attenuation coefficients

SL = O

LSTR = ()

STR = ()

Individual element :

CASE colour type = 0(indirect) :

IA(2) =colour index

CASE colour type = 1(RGB) or 2(CIE) or 3(HSV) or 4(HLS) :

RA = element 4 through 3+NCC contain the specular colour components

DATREC parameters to build LIGHT SOURCE DATA RECORD for LSTYP = 4(PSPOT) :

The IA array contains :

- The colour type (CT)

- The actual data of colour index, if CT is indirect.

- The number of components of colour value(NCC)

The RA array contains :

- The actual data of light source position

- The actual data of direction vector of light source

- The actual data of concentration exponent

- The actual data of attenuation coefficients

- The actual data of spread angle

- The actual data of colour component values as required by CT.

Common element :

IL = 1+*

IA(1) = colour type = CT

IA(2) = number of components of colour value = NCC

RL = 10+*

RA = (1) = x-coordinate of light source position (WC)

RA = (2) = y-coordinate of light source position (WC)

RA = (3) = z-coordinate of light source position (WC)

RA = (4) = x-value of light source direction (WC)

RA = (5) = y-value of light source direction (WC)

RA = (6) = z-value of light source direction (WC)

RA = (7) = concentration exponent

RA = element 8 through 9 contain attenuation coefficients

RA(10) = spread angle

SL = O

LSTR = ()

STR = ()

Individual element :

CASE colour type = 0(indirect) :

IA(2) = colour index

CASE colour type = 1(RGB) or 2(CIE) or 3(HSV) or 4(HLS) :

RA = element 4 through 3+NCC contain the specular colour components

ERRORS

3
Ignoring function, function requires state (PHOP, WSOP,*,*)
54
Ignoring function, the specified workstation is not open
59
Ignoring function, the specified workstation does not have output capability (i.e. the workstation category is neither OUTPUT, OUTIN, nor MO)
103
Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation
110
Ignoring function, the specified colour model is not available on the workstation
113
Ignoring function, the colour index value is less than zero
136
Ignoring function, one of the components of the colour specification is out of range
129
Ignoring function, the light source index is less than one
131
Ignoring function, the specified light source type is not available on the workstation
132
Ignoring function, the specified spot light spread angle is out of range
138
Ignoring function, one or more of the fields in the specified data record is inconsistent with the specified type

SEE ALSO

set light source state, set individual asf, inquire light source representation, inquire predefined light source representation, inquire light source facilities, inquire workstation state table length plus


Previous Next Up Title Contents Index Functions Index Top Library