Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inquire_depth_cue_representation(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE DEPTH CUE REPRESENTATION(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

INQUIRE DEPTH CUE REPRESENTATION − inquire depth cue representation for a given workstation

SYNOPSIS

C Syntax

void
pinqdcuerep ( wsid, index, type, error_ind, rep )
Pintwsid;workstation identifier
Pintindex;depth cue index
Pinqtypetype;inquiry type  (PSET, PREALIZED)
Pint∗error_ind;OUT error indicator
Pdcuebundl∗rep;OUT depth cue representation

FORTRAN Syntax

SUBROUTINE pqdcr ( WKID, IDEPTH, ITYPE, ERRIND, MODE, BPLANE, FPLANE,
     BSCALE, FSCALE, COLMOD, IDCOLR, DCOLR )
INTEGERWKIDworkstation identifier
INTEGERIDEPTHdepth cue index
INTEGERITYPEinquiry type (PSET, PREALI)
INTEGERERRINDOUT error indicator
INTEGERMODEOUT depth cue mode
REALBPLANE, FPLANEOUT back and front depth planes
REALBSCALE, FSCALEOUT back and front scale values
INTEGERCOLMODOUT colour model
INTEGERIDCOLROUT indirect depth cue colour
REALDCOLR(3)OUT array of depth cue colour

Required PHIGS Operating States

(PHOP,WSOP, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE DEPTH CUE REPRESENTATION returns the attribute values of a specified entry in the workstation table of depth cue representations. See SET DEPTH CUE REPRESENTATION for a full description of the contents of the bundle table entry and a description of the depth cue representation table. 

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 depth cue 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 a Pdcuebundl data structure containing attribute values defining a depth cue representation. A Pdcuebundl structure is defined as:

typedef struct {
Pdcuemodemode;/∗ depth cue mode ∗/
Pfloatrefplanes[2];/∗ depth cue reference planes ∗/
Pfloatscaling[2];/∗ depth cue scaling ∗/
Pgcolrcolour;/∗ depth cue colour ∗/
} Pdcuebundl;

Pdcuemode is defined as:

typedef enum {
PSUPPRESSED,
PALLOWED
} Pdcuemode;

Refplanes and scaling entries of 0 are back reference plane and corresponding scaling factors.  Refplanes and scaling entries of 1 are front reference plane and corresponding scaling factors. These scaling factors define the portion of the primitive colour that should be combined with the depth cue colour, as a function of z in NPC. 

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;

FORTRAN Input Parameters

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

WKIDThe identifier of the workstation for which the depth cue representation is being inquired. 

IDEPTH
The depth cue index into the workstation depth cue table.

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

FORTRAN Output Parameters

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

MODE
The depth cue MODE controls the disabling or enabling of depth cueing.  The depth cue mode contains one of the following values:

0PSUPPRDisable Depth Cueing
1PALLOWEnable Depth Cueing

BPLANE,FPLANE
The back and front depth planes, z values in NPC.  BPLANE is the back depth plane which defines a back reference plane for depth cueing.  FPLANE is the front depth plane which defines a front reference plane for depth cueing. 

BSCALE,FSCALE
The back and front scale values. BSCALE is the back scale value, between 0.0 and 1.0, which corresponds to the z value of the back reference plane.  FSCALE is a front scale value, between 0.0 and 1.0, which corresponds to the z value of the front depth cue reference plane.  These values define the portion of the primitive colour that should be combined with the depth cue colour as a function of z in NPC. 

COLMOD
COLMOD is the colour model which determines the type of colour to be used.  If this value is PINDIR or zero, IDCOLR will contain an indexed colour value.  If COLMOD is greater than zero, DCOLR will contain the depth cue colour.  The valid values for COLMOD are:

0PINDIRColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation

IDCOLR
IDCOLR is an index into the workstation colour table. This integer value determines the depth cue colour. This value is not used if COLMOD is greater than zero. 

DCOLR(3)
DCOLR(3) is an array of reals containing the depth cue colour.  This array is not used if COLMOD is equal to zero. The reals are stored as:

DCOLR(1) = Red, Hue, Etc.
DCOLR(2) = Green, Saturation, Lightness, Etc.
DCOLR(3) = Blue, Value, Saturation, Etc.

Execution

If the inquired information is available, the error indicator is returned as zero and values are returned in the output parameters. 

If the specified depth cue index is not present in the depth cue table on the workstation and the specified type of returned value is Realized, the representation for the depth cue index zero 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 capability (i.e., the workstation category is neither OUTPUT, OUTIN, nor MO)

101Ignoring function, the specified representation has not been defined

603Ignoring function, the depth cue index is less than zero

SEE ALSO

SET DEPTH CUE REPRESENTATION (3P+)
SET DEPTH CUE INDEX (3P+)
INQUIRE LIST OF DEPTH CUE INDICES (3P+)
INQUIRE PREDEFINED DEPTH CUE REPRESENTATION (3P+)

Sun Release 4.0  —  Last change: 2 August 1989

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