INQUIRE PREDEFINED DEPTH CUE REPRESENTATION(3P+) — MISC. REFERENCE MANUAL PAGES
NAME
INQUIRE PREDEFINED DEPTH CUE REPRESENTATION − inquire predefined depth cue representation for the specified workstation type
SYNOPSIS
C Syntax
void
pinqpreddcuerep ( wstype, index, error_ind, bundle )
Pwstypewstype;workstation type
Pintindex;predefined depth cue index
Pint∗error_ind;OUT error indicator
Pdcuebundl∗bundle;OUT depth cue representation
FORTRAN Syntax
SUBROUTINE pqpdcr ( WKTYPE, PDCI, ERRIND, MODE, BPLANE, FPLANE, BSCALE,
FSCALE, COLMOD, IDCOLR, DCOLR )
INTEGERWKTYPEworkstation type
INTEGERPDCIpredefined depth cue index
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, ∗, ∗, ∗)
DESCRIPTION
Purpose
INQUIRE PREDEFINED DEPTH CUE REPRESENTATION returns the attribute values of a specified entry in the workstation type’s table of predefined 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.
wstypeThe workstation type.
indexThe entry to be returned.
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
bundleA pointer to a Pdcuebundl data structure containing attribute values defining a predefined depth cue representation. A Pdcuebundl structure is defined in phigs.h as follows:
typedef struct {
Pdcuemodemode;/∗ depth cue mode ∗/
Pfloatrefplanes[2];/∗ depth cue reference planes ∗/
Pfloatscaling[2];/∗ depth cue scaling ∗/
Pgcolrcolour;/∗ depth cue colour ∗/
} Pdcuebundl;
Entry 0 in refplanes is the back reference plane. Entry 0 in scaling is the back scaling.
Pdcuemode is defined as follows:
typedef enum {
PSUPPRESSED,
PALLOWED
} Pdcuemode;
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.
WKTYPE
The workstation type.
PDCI
The predefined depth cue index.
FORTRAN Output Parameters
ERRIND
A pointer to the location to store 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. BPLANE is the back depth plane, a z value in NPC, which defines a back reference plane for depth cueing. FPLANE is the front depth plane, a z value in NPC, 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 depth cue reference plane. This value defines the portion of the primitive and the depth cue colours that should be combined as a function of z in NPC. 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. This value defines the portion of the primitive and depth cue colours that should be combined as a function of z in NPC.
COLMOD
The colour model that 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
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)
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 follows:
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 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
062Ignoring function, this information is not available for this MO workstation type
102Ignoring function, specified representation has not been predefined on this workstation
603Ignoring function, depth cue index is less than zero
SEE ALSO
SET DEPTH CUE REPRESENTATION (3P+)
INQUIRE DEPTH CUE REPRESENTATION (3P+)
Sun Release 4.0 — Last change: 2 August 1989