INQUIRE PREDEFINED INTERIOR REPRESENTATION PLUS(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
INQUIRE PREDEFINED INTERIOR REPRESENTATION PLUS − inquire the values of a predefined extended interior representation for a specified workstation type
SYNOPSIS
C Syntax
pinq_pred_int_rep_plus ( type, index, error_ind, bundle )
Pinttype;workstation type
Pintindex;interior index
Pint∗error_ind;OUT error indicator
Pint_bundle_plus∗bundle; OUT predefined interior rep
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
INQUIRE PREDEFINED INTERIOR REPRESENTATION PLUS returns the attribute values of a specified predefined entry in the extended interior bundle table of a workstation type’s workstation description table. See SET INTERIOR REPRESENTATION PLUS for a full description of the contents of the bundle table entry and a description of the extended interior bundle table.
C Input Parameters
typeThe workstation type.
indexIndex of the predefined entry to be returned.
C Output Parameters
error_ind
A pointer to the location for storing the error number of any error this function detects.
bundleA pointer to a Pint_bundle_plus structure in which the system returns the specified predefined extended interior representation. Pint_bundle_plus is defined as:
typedef struct {
Pint_stylestyle;/∗ interior style ∗/
Pintstyle_ind;/∗ interior style index ∗/
Pgcolrcolr;/∗ interior colour ∗/
Pintrefl_eqn;/∗ reflectance equation ∗/
Pintshad_meth;/∗ shading method ∗/
Prefl_propsrefl_props;/∗ area properties ∗/
Pint_styleback_style;/∗ interior style ∗/
Pintback_style_ind;/∗ interior style index ∗/
Pgcolrback_colr;/∗ interior colour ∗/
Pintback_refl_eqn;/∗ back reflectance equation ∗/
Pintback_shad_meth;/∗ back shading method ∗/
Prefl_propsback_refl_props;/∗ back area properties ∗/
Pintapprox_type;/∗ approximation method ∗/
Pfloatapprox_val[2];/∗ approximation values, u and v ∗/
} Pint_bundle_plus;
Pint_style is defined as:
typedef enum {
PSTYLE_HOLLOW,
PSTYLE_SOLID,
PSTYLE_PAT,
PSTYLE_HATCH,
PSTYLE_EMPTY
} Pint_style;
See SET INTERIOR STYLE for a description of each style.
Pgcolr is defined as:
typedef struct {
Pinttype;/∗ indirect, RGB, CIE, HSV, HLS ∗/
union {
Pintind;/∗ index in workstation colour bundle table ∗/
struct {
Pfloatx;/∗ red, hue, etc. ∗/
Pfloaty;/∗ green, saturation, lightness, etc. ∗/
Pfloatz;/∗ blue, value, saturation, etc. ∗/
} general;
} val;
} Pgcolr;
Constants defined for colour type are:
0PINDIRECTIndirect
1PMODEL_RGBRed, Green, Blue
2PMODEL_CIELUVCIE
3PMODEL_HSVHue, Saturation, Value
4PMODEL_HLSHue, Lightness, Saturation
The index member of the val union is used for type PINDIRECT. The general member is used for the other types.
Prefl_props is defined as:
typedef struct {
Pfloatambient_coef;/∗ ambient reflectance coefficient ∗/
Pfloatdiffuse_coef;/∗ diffuse reflectance coefficient ∗/
Pfloatspecular_coef; /∗ specular reflectance coefficient ∗/
Pgcolrspecular_colr; /∗ specular colour ∗/
Pfloatspecular_exp;/∗ specular exponent ∗/
Pfloattranspar_coef; /∗ transparency coefficient ∗/
} Prefl_props;
The values for ambient, diffuse, specular, and transparency coefficients must all be in the range [0,1]. The specular exponent must be greater than zero.
Defined reflectance equation values are:
1PREFL_NONENo Reflectance Calculation Performed
2PREFL_AMBIENTUse Ambient Term
3PREFL_AMB_DIFFUse Ambient and Diffuse Terms
4PREFL_AMB_DIFF_SPECUse Ambient, Diffuse, and Specular Terms
Defined constants for interior shading method are:
1PSD_NONENo Shading
2PSD_COLOURColour Interpolation Shading
3PSD_DOT_PRODUCTDot Product Interpolation Shading
4PSD_NORMALNormal Interpolation Shading
Constants defined for surface approximation type are:
1PSURF_WS_DEP
2PSURF_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3PSURF_CHORDAL_SIZE_WC
4PSURF_CHORDAL_SIZE_NPC
5PSURF_CHORDAL_SIZE_DC
6PSURF_PLANAR_DEVIATION_WC
7PSURF_PLANAR_DEVIATION_NPC
8PSURF_PLANAR_DEVIATION_DC
See SET SURFACE APPROXIMATION CRITERIA for a description of the meaning of these constants.
Execution
If the inquired information is available, the error indicator is returned as zero, and information is 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 error numbers given below to indicate the reason for nonavailability.
The extended interior bundle table contains bundled entries of the PHIGS and PHIGS PLUS interior attributes. During traversal, the attribute values of these bundles are used when the corresponding aspect source flag in the workstation state list is set to BUNDLED.
The PHIGS interior bundle table is a portion of the extended table. The function INQUIRE PREDEFINED INTERIOR REPRESENTATION returns the following attributes from the extended table: interior style, interior style index, and colour index.
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, the 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
100Ignoring function, the bundle index value is less than one
102Ignoring function, the specified representation has not been predefined on this workstation
SEE ALSO
SET INTERIOR REPRESENTATION PLUS (3P+)
INQUIRE INTERIOR REPRESENTATION PLUS (3P+)
INQUIRE INTERIOR FACILITIES PLUS (3P+)
INQUIRE PREDEFINED INTERIOR REPRESENTATION (3P)
September 02, 1992