PSLSR(3g) — Subroutines
Name
PSLSR − Defines the attributes of a light source.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS PLUS function
Old Syntax
DSLSR (WKID, LSI, LSTYPE, LDR, DATREC)
Argument Data Type Access Description
---------------------------------------------------------------------------
WKID Integer Read Workstation identifier
LSI Integer Read Light source index
LSTYPE Integer Read Light source type
LDR Integer Read Length of data record
DATREC(LDR) Array of Read Data record
character ∗80
---------------------------------------------------------------------------
New Syntax
PSLSR (WKID, LSI, LSTYP, LDR, DATREC)
Constants
Description
PSLSR creates or redefines an entry for the light source table by associating the light table index with the light source type and data record values in the light source table. This table is in the workstation state list for the workstation specified by the workstation identifier.
The new function syntax conforms to the ISO Fortran standard. Digital recommends that you code using the new function syntax.
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
PQPLSR
PQWSLP
PSLSS
PSRFM
PSRFP