PQPLSR(3g) — Subroutines
Name
PQPLSR − Returns predefined light source type and data record for the light source.
Operating States: PHOP, ∗, ∗, ∗
PHIGS PLUS function
Old Syntax
DQPLS (WTYPE, PLSI, MLDR, ERRIND, LSTYPE, LDR, DATREC)
Argument Data Type Access Description
---------------------------------------------------------------------------
WTYPE Integer Read Workstation type
PLSI Integer Read Predefined light source index
MLDR Integer Read Length of data record
ERRIND Integer Write Error indicator
LSTYPE Integer Write Light source type
LDR Integer Write Length of data record
DATREC(MLDR) Character ∗80 Write Data record
---------------------------------------------------------------------------
New Syntax
PQPLSR (WTYPE, PLSI, MLDR, ERRIND, LSTYP, LDR, DATREC)
Argument Data Type Access Description
---------------------------------------------------------------------------
WTYPE Integer Read Workstation type
PLSI Integer Read Predefined light source index
MLDR Integer Read Length of data record
ERRIND Integer Write Error indicator
LSTYP Integer Write Light source type
LDR Integer Write Length of data record
DATREC(MLDR) Character ∗80 Write Data record
---------------------------------------------------------------------------
Constants
Defined Argument Constant Description
---------------------------------------------------------------------------
LSTYP PAMB Ambient light
PDIRE Infinite (directional) light
PPOSI Positional light
PSPOT Spot light
---------------------------------------------------------------------------
Description
PQPLSR returns the light source type and the data record that describes the light source. See the PSLSR function description in Part 1 for information about returned data record formats.
Data Record Information
If LSTYP is PAMB, the data record format is as follows:
INTEGER IL = 2 Number of integer values
INTEGER IA(1) = Color type
INTEGER RL = ∗ Actual data of the color values as required by CT
RA() =
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA(2) = Color index
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(2) = Number of color value components (NCC)
RA = Elements 1 through NCC contain the color values
If LSTYP is PDIRE, the data record format is as follows:
INTEGER IL = 2 Number of integer values
INTEGER IA(1) = Color type
INTEGER RL = 3+∗
REAL RA(1) = x-value of the direction vector, in
world coordinates
REAL RA(2) = y-value of the direction vector, in
world coordinates
REAL RA(3) = z-value of the direction vector, in
world coordinates
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA(2) = Color index
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(2) = Number of color value components (NCC)
RA = Elements 4 through 3+NCC contain the color values
If LSTYP is PPOSI, the data record format is as follows:
INTEGER IL = 2 Number of integer values
INTEGER IA(1) = Color type
INTEGER RL = 5+∗ Number of real values
REAL RA(1) = x-value of the direction vector, in
world coordinates
REAL RA(2) = y-value of the direction vector, in
world coordinates
REAL RA(3) = z-value of the direction vector, in
world coordinates
REAL RA(4) = Attenuation coefficient 1
REAL RA(5) = Attenuation coefficient 2
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA(2) = Color index
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(2) = Number of color value components (NCC)
RA = Elements 6 through 5+NCC contain the color values
If LSTYP is PSPOT, the data record format is as follows:
INTEGER IL = 2 Number of integer values
INTEGER IA(1) = Color type
INTEGER RL = 10+∗ Number of real values
REAL RA(1) = x-coordinate of the light source position,
in world coordinates
REAL RA(2) = y-coordinate of the light source position,
in world coordinates
REAL RA(3) = z-coordinate of the light source position,
in world coordinates
REAL RA(4) = x-value of the light source direction,
in world coordinates
REAL RA(5) = y-value of the light source direction,
in world coordinates
REAL RA(6) = z-value of the light source direction,
in world coordinates
REAL RA(7) = Concentration exponent
REAL RA(8) = Attenuation coefficient 1
REAL RA(9) = Attenuation coefficient 2
REAL RA(10) = Spread angle, in radians
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA(2) = Color index
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(2) = Number of color value components (NCC)
RA = Elements 11 through 10+NCC contain the color values
See Also
PQLSF
PQLSR
PQELSI
PSLSR
PSLSS