SET INTERIOR REPRESENTATION PLUS(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET INTERIOR REPRESENTATION PLUS − set an extended interior attribute bundle on a workstation
SYNOPSIS
C Syntax
void
pset_int_rep_plus ( wsid, index, rep )
Pintwsid;workstation id
Pintindex;interior index
Pint_bundle_plus∗rep; representation
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET INTERIOR REPRESENTATION PLUS sets a bundle table entry in the workstation extended interior bundle table.
C Input Parameters
wsidThe identifier of the workstation for which the representation is being set.
indexThe index of the entry being set.
repA pointer to a Pint_bundle_plus structure containing the extended interior attributes. 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;
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 these constants.
Execution
The extended interior bundle table contains bundled entries of the PHIGS and PHIGS PLUS interior attributes. SET INTERIOR REPRESENTATION PLUS sets the individual entries of this table. 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 SET INTERIOR REPRESENTATION sets the following attributes in the extended table: interior style, interior style index, and colour index (colour type of Indirect is assumed).
During structure traversal the current interior index refers to an entry in the workstation extended interior bundle table. Depending on the settings of the aspect source flags, the contents of that bundle table entry are used to determine the attributes associated with output primitives that use the extended interior bundle table.
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
103Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table
108Ignoring function, the specified interior style is not available on the workstation
110Ignoring function, the specified colour model is not available on the workstation
112Ignoring function, the pattern index value is less than one
SEE ALSO
SET INDIVIDUAL ASF (3P)
INQUIRE INTERIOR FACILITIES PLUS (3P+)
INQUIRE INTERIOR REPRESENTATION PLUS (3P+)
SET TRIMMING CURVE APPROXIMATION CRITERIA (3P+)
SET INTERIOR STYLE INDEX (3P)
SET INTERIOR REPRESENTATION (3P)
September 02, 1992