Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pqlsr(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE LIGHT SOURCE REPRESENTATION(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

INQUIRE LIGHT SOURCE REPRESENTATION − inquire light source representation for a given workstation

SYNOPSIS

C Syntax

void
pinqlightsrcrep ( wsid, index, type, error_ind, rep )
Pintwsid;workstation identifier
Pintindex;light source index
Pinqtypetype;type of returned value (PSET,PREALIZED)
Pint∗error_ind;OUT error indicator
Plightsrcbundl∗rep;OUT light source representation

FORTRAN Syntax

SUBROUTINE pqlsr ( WKID, ILS, ITYPE, MLDR, ERRIND, LSTYPE, LDR, DATREC )
INTEGERWKIDworkstation identifier
INTEGERILSindex into the light source list
INTEGERITYPEtype of returned values (PSET,PREALI)
INTEGERMLDRdimension of data record array
INTEGERERRINDOUT error indicator
INTEGERLSTYPEOUT light source type
INTEGERLDROUT actual size of the data record
CHARACTER∗80(∗)DATREC(LDR) OUT data record

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE LIGHT SOURCE REPRESENTATION inquires a light source representation for a given workstation. 

This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard. 

C Input Parameters

All of the following data types are predefined in phigs.h. 

wsidThe workstation identifier. 

indexThe light source index. 

typeAn enumerated value specifying whether the values to be returned are those originally specified by the application (PSET), or those resulting after PHIGS mapped them to ones available on the workstation (PREALIZED).  A Pinqtype structure is defined as:

typedef enum {
PSET,
PREALIZED
} Pinqtype;

C Output Parameters

error_ind
A pointer to the location to store the error number of any error detected by this function.

repA pointer to the location in which to return the light source representation. The Plightsrcbundl data structure contains values needed to define the specified type of light source representation. Plightsrcbundl is defined as:

typedef struct {
Pinttype;/∗ light source type ∗/
Plightsrcrecrec;/∗ light source data record ∗/
} Plightsrcbundl;

Plightsrcrec is defined as:

typedef union {
Pamblightsrcrecambient;
Pdirlightsrcrecdirectional;
Pposlightsrcrecpositional;
Pspotlightsrcrecspot;
} Plightsrcrec;

Pamblightsrcrec is defined as:

typedef struct {
Pgcolrcolour;/∗ light source colour ∗/
} Pamblightsrcrec;

Pgcolr is defined as:

typedef struct {
Pint type;/∗ indirect, RGB, CIE, HSV, HLS ∗/
union {
   Pintindex;/∗ colour table index ∗/
   struct {
Pfloatx;/∗ red, hue, etc. ∗/
Pfloaty;/∗ green, saturation, lightness, etc. ∗/
Pfloatz;/∗ blue, value, saturation, etc. ∗/
   } general;
} val;
} Pgcolr;

Pdirlightsrcrec is defined as:

typedef struct {
Pgcolrcolour;/∗ light source colour ∗/
Pvector3dir;/∗ light source direction ∗/
} Pdirlightsrcrec;

Pgcolr is defined above. Pvector3 is defined as:

typedef struct {
Pfloatx;/∗ x magnitude ∗/
Pfloaty;/∗ y magnitude ∗/
Pfloatz;/∗ z magnitude ∗/
} Pvector3;

Pposlightsrcrec is defined as:

typedef struct {
Pgcolrcolour;/∗ light source colour ∗/
Ppoint3pos;/∗ light source position ∗/
Pfloatcoef[2];/∗ attenuation coefficients ∗/
} Pposlightsrcrec;

Pgcolr is defined above. 

Ppoint3 is defined as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;

Pspotlightsrcrec is defined as:

typedef struct {
Pgcolrcolour;/∗ light source colour ∗/
Ppoint3pos;/∗ light source position ∗/
Pvector3dir;/∗ light source direction ∗/
Pfloatexp;/∗ concentration exponent ∗/
Pfloatcoef[2];/∗ attenuation coefficients ∗/
Pfloatangle;/∗ spread angle ∗/
} Pspotlightsrcrec;

Pgcolr, Ppoint3, and Pvector3 are defined above. 

FORTRAN Input Parameters

All of the following data types are predefined in phigs77.h. 

WKIDThe identifier of the workstation for which the light source indicies list is being inquired. 

ILSAn index into the light source table of the workstation state list. 

ITYPE
An enumerated value specifying whether the values to be returned are those originally specified by the application (Set), or those resulting after PHIGS mapped them to ones available on the  workstation (Realized).  Valid values are:

0PSETSet
1PREALIRealized

MLDR
The dimension of the data record array, DATREC. 

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

LSTYPE
The light source type.

LDRThe actual size, in elements, returned in the data record. 

DATREC(LDR)
The data record which must be unpacked by UNPACK DATA RECORD.  The contents depend on the light source type.  See SET LIGHT SOURCE REPRESENTATION for a description of its contents. 

Execution

If the specified light source index is not present in the light source table on the workstation and the specified type of returned value is Realized, the representation for light source index one is returned. 

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

003Ignoring function, function requires state (PHOP,WSOP,∗,∗)

054Ignoring function, the specified workstation is not open

059Ignoring function, the specified workstation does not have output capabitlity

101Ignoring function, the specified representation has not been defined

614Ignoring function, the light source index is less than one

SEE ALSO

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

Sun Release 4.0  —  Last change: 2 August 1989

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