Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE LIGHT SOURCE FACILITIES(3P+)  —  Kubota Pacfic Computer Inc. (15 August 1991)

NAME

INQUIRE LIGHT SOURCE FACILITIES − inquire list of workstation light source facilities for a specified workstation type

SYNOPSIS

C Syntax

void
pinq_light_src_facs ( type, length, start, error_ind, facilities, total_length)
Pinttype;workstation type
Pintlength;length of application list
Pintstart;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

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE LIGHT SOURCE FACILITIES obtains a list of workstation light source facilities. 

C Input Parameters

typeThe workstation type for which the light source facilities are being inquired. 

lengthThe number of ints in the facilites→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. 

startStarting 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_listtypes;/∗ types of light source supported ∗/
Pintmax;/∗ max. no. of simultaneously active lights ∗/
Pintnum_pred_inds/∗ number of predefined bundles ∗/
} Plight_src_facs;

types is a pointer to the types of light sources that are supported:

1PLIGHT_AMBIENT
2PLIGHT_DIRECTIONAL
3PLIGHT_POSITIONAL
4PLIGHT_SPOT

Pint_list is defined in phigs.h as follows:

typedef struct {
Pintnum_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:

1AmbientA light source that affects all surface primitives uniformly.
Ambient light sources have only a color attribute.
2WCS_VectorA light source that is specified in world coordinates
with a color and a direction vector.
3WCS_PointA light source that is specified in world coordinates with
a color, a position, and two attenuation coefficients.
4WCS_SpotA 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. 

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, 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

002Ignoring function, function requires state (PHOP,∗,∗,∗)

051Ignoring function, this information unavailable for this workstation type

052Ignoring function, workstation type not recognized by the implementation

059Ignoring function, the specified workstation does not have output capability (i.e. the workstation category is neither OUTPUT, OUTIN, nor MO)

062Ignoring function, this information is not available for this MO workstation type

SEE ALSO

SET LIGHT SOURCE REPRESENTATION (3P+)
INQUIRE LIST OF LIGHT SOURCE INDICES (3P+)
INQUIRE LIGHT SOURCE REPRESENTATION (3P+)
INQUIRE PREDEFINED LIGHT SOURCE REPRESENTATION (3P+)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026