CALL PSLSR (WKID, LSI, LSTYP, LDR, DATREC)
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
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