Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE INTERIOR REPRESENTATION PLUS(3P+)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

INQUIRE INTERIOR REPRESENTATION PLUS − inquire the values of an extended interior representation on a workstation

SYNOPSIS

C Syntax

void
pinq_int_rep_plus ( ws, index, type, error_ind, rep )
Pintws;workstation identifier
Pintindex;interior index
Pinq_typetype;type of returned value
Pint∗error_ind;OUT error indicator
Pint_bundle_plus∗rep; OUT interior representation

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE INTERIOR REPRESENTATION PLUS returns the values of a specified entry in a workstation extended interior bundle table. 

C Input Parameters

wsThe workstation identifier. 

indexIndex of the entry to be returned.  If this entry is not present in the table, and the type of returned value parameter is PINQ_REALIZED, the representation for interior index one is returned. 

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

typedef enum {
PINQ_SET,
PINQ_REALIZED
} Pinq_type;

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 Pint_bundle_plus structure that returns the specified 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;

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;

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. 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.  Predefined 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

Predefined 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 their meaning. 

Execution

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

If the specified interior index is not present in the interior bundle table on the workstation and the specified type of returned value is Realized, the representation for interior 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 error numbers below to indicate the reason for non-availability. 

The extended interior bundle table contains bundled entries of the PHIGS and PHIGS Extension 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 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

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 (that is, the workstation category is neither OUTPUT, OUTIN, nor MO)

100Ignoring function, the bundle index value is less than one

101Ignoring function, the specified representation has not been defined

SEE ALSO

SET INTERIOR REPRESENTATION PLUS (3P+)
INQUIRE INTERIOR REPRESENTATION (3P)
INQUIRE PREDEFINED INTERIOR REPRESENTATION PLUS (3P+)

September 02, 1992

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