Contained Within
Find More Documentation
Featured Support Resources
| Descargar este libro en PDF
NAME
- INQUIRE LIGHT SOURCE FACILITIES - inquire for list of workstation light source facilities for specified workstation type
SYNOPSIS
C Syntax
-
void
-
pinq_light_src_facs ( type, length, start, error_ind, facilities, total_length )
-
-
Pwstype type; workstation type
Pint length; length of application list
Pint start; starting position
Pint * error_ind; OUT error indicator
Plight_src_facs * facilities; OUT light source facilities
Pint * total_length; OUT length of list in PHIGS
FORTRAN Syntax
-
SUBROUTINE pqlsf ( WKTYPE, ILS, ERRIND, NLSI, LSI, NPDEF )
-
-
INTEGER WKTYPE workstation type
INTEGER ILS index into the light source list
INTEGER ERRIND OUT error indicator
INTEGER NLSI OUT number of light sources indices
INTEGER LSI OUT ILS-th element of light sources
INTEGER NPDEF OUT number of predefined indices
Required PHIGS Operating States
- (PHOP, * ,* ,* )
DESCRIPTION
Purpose
- INQUIRE LIGHT SOURCE FACILITIES inquires for a list of workstation light source facilities.
- This is a SunPHIGS Extension function based on PHIGS PLUS and is not part of the PHIGS standard.
C Input Parameters
-
-
type
- The workstation type for which the light source facilities are being inquired.
-
-
length
- The number of ints in the facilities.types output parameter for which the application has allocated memory. length is the number of list elements that the system can return in facilites.types.ints . If a value of 0 is used here, no data will be returned in the facilites.types.ints list, but the total number of elements will be returned in total_length.
-
-
start
- Starting position of inquiry. The elements in the list, beginning with the item number specified by start, are copied sequentially into facilites.types.ints until facilites.types.ints is full or all the elements have been copied.
C Output Parameters
-
error_ind
- A pointer to the location to store the error number.
-
facilities
- A pointer to the location in which to return the light source facilities.
- Plight_src_facs is defined as:
- typedef struct {
-
-
Pint_list types; /* types of light source supported * /
Pint max; /* maximum number of simultaneously
active lights * /
Pint num_pred_inds /* number of predefined bundles * /
- } Plight_src_facs;
-
-
types is a pointer to the types of light sources that are supported:
- 1
- PLIGHT_AMBIENT
-
- 2
- PLIGHT_DIRECTIONAL
-
- 3
- PLIGHT_POSITIONAL
-
- 4
- PLIGHT_SPOT
- Pint_list is defined in phigs.h as follows:
- typedef struct {
-
-
Pint num_ints; /* number of Pints in list * /
Pint * ints; /* list of integers * /
- } Pint_list;
- The num_ints component specifies the number of elements in the list. The ints component is a pointer to a list num_ints long.
- Prior to calling this function, the ints field of the Pint_list structure must contain a pointer to an application-supplied buffer. This buffer must be at least as large as the corresponding length parameter.
- The light types supported are:
-
-
1 Ambient A light source that affects all surface primitives
uniformly. Ambient light sources have only a color
attribute.
-
- 2
- WCS _ Vector
-
A light source that is specified in world coordinates
-
-
with a color and a direction vector.
-
- 3
- WCS _ Point
-
A light source that is specified in world coordinates with a
-
-
color, a position, and two attenuation coefficients.
-
- 4
- WCS _ Spot
-
A light source that is specified in world coordinates with a
-
-
color, a position, a direction vector, a concentration
exponent, two attenuation coefficients, and a spread
angle.
-
total_length
- A pointer to an integer in which the system returns the total number of elements in the list. This is the value required for length if all elements in the list are to be returned.
FORTRAN Input Parameters
-
WKTYPE
- The workstation type for which the light source facilities are being inquired.
-
-
ILS
- The index of the entry desired from the list of light source indices.
FORTRAN Output Parameters
-
ERRIND
- The error number of any error detected by this function.
-
-
NLSI
- The number of light source types supported.
-
-
LSI
- The requested element from the defined list of light source indices.
-
NPDEF The number of predefined light source type indices.
Execution
- If the inquired information is available, the error indicator is returned as zero, and values are returned in the output parameters.
- If the inquired information is not available, then the values returned in the output parameters are undefined, and the error indicator is set to one of the following error numbers to indicate the reason for nonavailability.
- Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function.
ERRORS
-
- 002
- Ignoring function, function requires state (PHOP, * ,* ,* )
-
- 051
- Ignoring function, this information unavailable for this workstation type
-
- 052
- Ignoring function, workstation type not recognized by the implementation
-
- 062
- Ignoring function, this information is not available for this MO workstation type
SEE ALSO
-
SET LIGHT SOURCE REPRESENTATION (3PP)
-
INQUIRE LIST OF LIGHT SOURCE INDICES (3PP)
-
INQUIRE LIGHT SOURCE REPRESENTATION (3PP)
-
INQUIRE PREDEFINED LIGHT SOURCE REPRESENTATION (3PP)
|
|