[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
The graPHIGS Programming Interface : Subroutine Reference
GPQLSR - Inquire Light Source Representation
GPQLSR
(wsid,
index,
type,
errind,
lstype,
color,
data) |
Note:
This subroutine is a Workstation State List (WSL)
inquiry.
For an overview, see
"WSL Inquiries"
Purpose
Use
GPQLSR to inquire the current attribute
values in the specified entry in the light source table of
the specified workstation.
If the inquired information is available, then the graPHIGS API
sets the error indicator to zero and returns the values in
the output parameters.
If the inquired information is unavailable, then the error
indicator (errind) contains an error number indicating the
reason, and the values returned in the output parameters are
unpredictable.
The data parameter
(data) must be large
enough to include the maximum number of light source
parameters.
Parameters
wsid -- specified by user, fullword integer
Workstation identifier.
index -- specified by user, fullword integer
Light source table index (>=1)
type -- specified by user, fullword integer
Type of returned values
(1=SET
)
errind -- returned by the graPHIGS API, fullword integer
Error indicator. If the error indicator is zero, the request has been
completed. Otherwise, one of the following errors exists:
- 25
- SPECIFIED WORKSTATION DOES NOT EXIST
- 35
- WORKSTATION HAS ONLY INPUT CAPABILITIES
- 254
- LIGHT SOURCE INDEX < ONE
- 255
- LIGHT SOURCE INDEX EXCEEDS THE WORKSTATION TABLE CAPACITY
- 534
- TYPE VALUE IS INVALID
lstype -- returned by the graPHIGS API, fullword integer
Light source type
(1=AMBIENT, 2=DIRECTIONAL, 3=POSITIONAL, 4=SPOT
)
color -- returned by the graPHIGS API, four fullwords of data
Light source color.
This parameter includes one of the following two formats:
indexed format direct format
------------- -------------
0 | 1| fullword integer 0 | 2| fullword integer
|-----------| |-----------|
4 |color index| fullword integer 4 |component 1| short floating-point number
|-----------| |-----------|
8 | reserved| fullword integer 8 |component 2| short floating-point number
|-----------| |-----------|
12 | reserved| fullword integer 12 |component 3| short floating-point number
------------- -------------
data -- returned by the graPHIGS API,
array of short floating-point numbers
List of light source parameters.
Values returned to this parameter depend on the light source
type.
The application must supply storage for this parameter that
is large enough to contain the maximum data listed
below:
1=AMBIENT
None
2=DIRECTIONAL
Light source direction -
3 short floating-point numbers (WC)
3=POSITIONAL
Light source position -
3 short floating-point numbers (WC)
Attenuation coefficients -
2 short floating-point numbers
4=SPOT
Light source position -
3 short floating-point numbers (WC)
Light source direction -
3 short floating-point numbers (WC)
Concentration exponent - short floating-point number
Attenuation coefficients - 2 short floating-point numbers
Spread angle - short floating-point number
Error Codes
None
Related Subroutines
- GPLSR
- Set Light Source Representation
RCP code
201339150
(X'0C00310E')
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]