SunPHIGS 3.0 Extensions Reference Manual
  Procure somente este livro
Fazer download desta apostila em PDF

NAME

INQUIRE PREDEFINED DEPTH CUE REPRESENTATION - inquire for predefined depth cue representation for specified workstation type

SYNOPSIS

C Syntax

void
pinq_pred_dcue_rep ( type, index, error_ind, bundle )
Pwstype          type;         workstation type
Pint             index;        predefined index
Pint             * error_ind;  OUT error indicator
Pdcue_bundle     * bundle;     OUT predefined depth cue rep

FORTRAN Syntax

SUBROUTINE pqpdcr ( WKTYPE, PDCI, ERRIND, MODE, BPLANE, FPLANE, BSCALE, FSCALE, COLTYPE, IDCOLR, DCOLR )
INTEGER      WKTYPE                workstation type
INTEGER      PDCI                  predefined depth cue index
INTEGER      ERRIND                OUT error indicator
INTEGER      MODE                  OUT depth cue mode
REAL         BPLANE, FPLANE        OUT back and front depth planes
REAL         BSCALE, FSCALE        OUT back and front scale values
INTEGER      COLTYPE               OUT colour type
INTEGER      IDCOLR                OUT indirect depth cue colour
REAL         DCOLR(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 table of predefined depth cue representations for that workstation type. See SET DEPTH CUE REPRESENTATION for a full description of the content of the bundle table entry and a description of the depth cue representation table.
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.
index
The index of the predefined entry to be returned.

C Output Parameters

error_ind
A pointer to the location to store the error number of any error that this function detects.
bundle
A pointer to a Pdcue_bundle data structure containing attribute values defining a predefined depth cue representation. A Pdcue_bundle structure is defined in phigs.h as follows:
typedef struct {
Pdcue_mode          mode;           /* depth cue mode * /
Pfloat               ref_planes[2];  /* depth cue reference planes * /
Pfloat               scaling[2];     /* depth cue scaling * /
Pgcolr              colr;           /* depth cue colour * /

} Pdcue_bundle;
Entry 0 in ref_planes is the back reference plane. Entry 0 in scaling is back scaling.
Pdcue_mode is defined as follows:
typedef enum {
PSUPPRESSED,
PALLOWED
} Pdcue_mode;
Pgcolr is defined as:
typedef struct {
Pint
type;
/* indirect, RGB, CIE, HSV, HLS * /
union {
Pint
ind;
/* index in workstation colour
bundle table * /
struct {
                        Pfloat   x;      /* red, hue, and so on * /
                        Pfloat   y;      /* green, saturation, lightness,
                                           and so on * /
                        Pfloat   z;      /* blue, value, saturation,
                                           and so on * /
                } general;
        } val;
} Pgcolr;

Constants defined for colour type are:
0   PINDIRECT         Indirect
1   PMODEL_RGB        Red, Green, Blue
2   PMODEL_CIELUV     CIE
3   PMODEL_HSV        Hue, Saturation, Value
4   PMODEL_HLS        Hue, Lightness, Saturation

The index member of the val union is used for type PINDIRECT. The general member is used for the other types.

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 in which to store the error number of any error that this function detects.
MODE
The depth cue MODE controls the depth cue disabling or enabling. The depth cue mode contains one of the following values:
0   PSUPPR     Disable Depth Cueing
1   PALLOW     Enable Depth Cueing

BPLANE,
The back and front depth planes. BPLANE is the back depth plane, a z value in NPC, that 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,
The back and front scale values. BSCALE is the back scale value, between 0.0 and 1.0, that 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, that 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.
COLTYPE
The colour type. If this value is PINDIR or zero, IDCOLR will contain an indexed colour value. If COLTYPE is greater than zero, DCOLR will contain the depth cue colour. The valid values for COLTYPE are:
0   PINDIR   Colour Index Specified
1   PRGB     Red, Green, and Blue
2   PCIE     CIE Colour Model
3   PHSV     Hue, Saturation, and Value
4   PHLS     Hue, 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 COLTYPE is greater than zero.
DCOLR(3)
An array of reals containing the depth cue colour. This array is not used if COLTYPE is equal to zero. The reals are stored as follows:
DCOLR(1) = Red, Hue, and so on
DCOLR(2) = Green, Saturation, Lightness, and so on
DCOLR(3) = Blue, Value, Saturation, and so on

Execution

If the inquired information is available, then 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 error numbers below to indicate the reason for nonavailability.
Since this is an inquiry function, ERROR HANDLING is not invoked when this function detects an error.

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
102
Ignoring function, specified representation has not been predefined on this workstation
119
Ignoring function, depth cue index is less than zero

SEE ALSO

SET DEPTH CUE REPRESENTATION (3PP)
INQUIRE DEPTH CUE REPRESENTATION (3PP)