SET EXTENDED INTERIOR REPRESENTATION(3P+) — MISC. REFERENCE MANUAL PAGES
NAME
SET EXTENDED INTERIOR REPRESENTATION − set an extended interior attribute bundle on a workstation
SYNOPSIS
C Syntax
void
psetextintrep ( wsid, index, rep )
Pintwsid;workstation id
Pintindex;interior index
Pextinterbundl∗rep; representation
FORTRAN Syntax
SUBROUTINE pseir ( WKID, INDEX, STYLE, ISTYLE, COLMOD, ICOLR, COLR, REFEQ,
SHADEM, AMCOEF, DICOEF, SPCOEF, SCOLM, ISCOLR, SCOLR, SPEXP, TRCOEF,
APTYP, APVAL, TAPTYP, TAPVAL )
INTEGERWKIDworkstation identifier
INTEGERINDEXbundle index
INTEGERSTYLE(2)interior styles
INTEGERISTYLE(2)interior style indexes
INTEGERCOLMOD(2)interior colour models
INTEGERICOLR(2)interior colour index
REALCOLR(3,2)interior colour triples
INTEGERREFEQ(2)reflectance equations
INTEGERSHADEM(2)shading methods
REALAMCOEF(2)ambient reflectance coefficients
REALDICOEF(2)diffuse reflectance coefficients
REALSPCOEF(2)specular reflectance coefficients
INTEGERSCOLM(2)specular colour models
INTEGERISCOLR(2)specular colour indexes
REALSCOLR(3,2)specular colour triples
REALSPEXP(2)specular exponents
REALTRCOEF(2)transparency coefficients
INTEGERAPTYPsurface approximation type
REALAPVAL(2)surface approximation values, u and v
INTEGERTAPTYPtrimming curve approximation type
REALTAPVALtrimming curve approximation value
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET EXTENDED INTERIOR REPRESENTATION sets a bundle table entry in the workstation extended interior bundle 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.
wsidThe identifier of the workstation for which the representation is being set.
indexThe index of the entry being set.
repA pointer to a Pextinterbundl structure containing the extended interior attributes. Pextinterbundl is defined as:
typedef struct {
Pinterstylestyle;/∗ interior style ∗/
Pintindex;/∗ interior style index ∗/
Pgcolrcolour;/∗ interior colour ∗/
Pintrefl_eqn;/∗ reflectance equation ∗/
Pintshading;/∗ shading method ∗/
Pareapropsarea_props;/∗ area properties ∗/
Pinterstyleback_style;/∗ interior style ∗/
Pintback_index;/∗ interior style index ∗/
Pgcolrback_colour;/∗ interior colour ∗/
Pintback_refl_eqn;/∗ back reflectance equation ∗/
Pintback_shading;/∗ back shading method ∗/
Pareapropsback_area_props;/∗ back area properties ∗/
Pintapprox_type;/∗ approximation method ∗/
Pfloatapprox_value[2];/∗ approximation values, u and v ∗/
Pinttrim_approx_type;/∗ trim curve approximation method ∗/
Pfloattrim_approx_value;/∗ trim curve approximation value ∗/
} Pextinterbundl;
Pinterstyle is defined as:
typedef enum {
PHOLLOW,
PSOLID,
PPATTERN,
PHATCH,
PEMPTY,
PGENERAL
} Pinterstyle;
See SET INTERIOR STYLE for a description of each style.
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;
Pareaprops is defined as:
typedef struct {
Pfloatambient_coef;/∗ ambient reflectance coefficient ∗/
Pfloatdiffuse_coef;/∗ diffuse reflectance coefficient ∗/
Pfloatspecular_coef;/∗ specular reflectance coefficient ∗/
Pgcolrspecular_colour;/∗ specular colour ∗/
Pfloatspecular_exp;/∗ specular exponent ∗/
Pfloattranspar_coef;/∗ transparency coefficient ∗/
} Pareaprops;
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
1PRGBRed, Green, Blue
2PCIECIE
3PHSVHue, Saturation, Value
4PHLSHue, 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:
0PSURF_WS_DEP
1PSURF_CONSTANT_PARAMETRIC
2PSURF_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3PSURF_METRIC_WC
4PSURF_METRIC_NPC
5PSURF_PLANAR_DEVIATION_WC
6PSURF_PLANAR_DEVIATION_NPC
See SET SURFACE APPROXIMATION CRITERIA for a description of their meaning. Constants defined for trimming curve approximation type are:
0PCURV_WS_DEP
1PCURV_CONSTANT_PARAMETRIC
2PCURV_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
See SET TRIMMING CURVE APPROXIMATION CRITERIA for a description of their meaning.
FORTRAN Input Parameters
All of the following data types are predefined in phigs77.h.
WKIDThe identifier of the workstation for which the representation is being set.
INDEX
The interior index of the entry being set.
STYLE(2)
The front and back interior styles. Valid values are defined as:
0PHOLLOHollow
1PSOLIDSolid
2PPATTRPatterned
3PHATCHHatched
4PISEMPEmpty
5PGENERGeneral
See SET INTERIOR STYLE for a description of each style.
ISTYLE(2)
The front and back interior style indexes, which select entries in the workstation Pattern, Hatch, or General interior style tables.
COLMOD(2)
The front and back interior colour models. Valid values are defined as:
0PINDIRIndirect
1PRGBRed, Green, and Blue
2PCIECIE
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation
ICOLR(2)
The front and back colour indexes. ICOLR(2) is used only if the corresponding value in COLMOD(2) is PINDIR.
COLR(3,2)
The front and back colour triples. COLR(3,2) is used only if the corresponding value in COLMOD(2) is not PINDIR. The triples are stored as:
ICOLR(1,c) = x Colour
ICOLR(2,c) = y Colour
ICOLR(3,c) = z Colour
REFEQ(2)
The front and back reflectance equations. Predefined reflectance equation values are:
1PRNONENo Reflectance Calculation Performed
2PRAMBUse Ambient Term
3PRAMBDUse Ambient and Diffuse Terms
4PRAMDSUse Ambient, Diffuse, and Specular Terms
SHADEM(2)
The front and back interior shading methods. Predefined constants are:
1PSDNONNo Shading
2PSDCOLColour Interpolation Shading
3PSDDOTDot Product Interpolation Shading
4PSDNORNormal Interpolation Shading
AMCOEF(2)
The front and back ambient reflectance coefficients, in the range [0,1].
DICOEF(2)
The front and back diffuse reflectance coefficients, in the range [0,1].
SPCOEF(2)
The front and back specular reflectance coefficients, in the range [0,1].
SCOLM(2)
The front and back specular colour models.
ISCOLR(2)
The front and back specular colour indexes. ISCOLR(2) is used only if the corresponding value in SCOLM is PINDIR.
SCOLR(3,2)
The front and back specular colour triples. SCOLR(3,2) is used only if the corresponding value in SCOLM is not PINDIR.
SPEXP(2)
The front and back specular exponents, greater than zero.
TRCOEF(2)
The front and back transparency coefficients, in the range [0,1].
APTYP
The surface approximation type. Predefined values are:
0PSAWSDWorkstation Dependent
1PSAEPConstant Parametric Subdivision
2PSAEPKConstant Parametric Subdivision Between Knots
3PSAMWMetric in WC
4PSAMNMetric in NPC
5PSAPDWPlanar Deviation in WC
6PSAPDNPlanar Deviation in NPC
See SET SURFACE APPROXIMATION CRITERIA for a description of their meaning.
APVAL(2)
The surface approximation values. See SET SURFACE APPROXIMATION CRITERIA for a description of their use.
TAPTYP
The trimming curve approximation type. Predefined values are:
0PCAWSDWorkstation Dependent
1PCAEPConstant Parametric Subdivision
2PCAEPKConstant Parametric Subdivision Between Knots
See SET TRIMMING CURVE APPROXIMATION CRITERIA for a description of their meaning.
TAPVAL
The trimming curve approximation value. See SET TRIMMING CURVE APPROXIMATION CRITERIA for a description of their use.
Execution
The extended interior bundle table contains bundled entries of the PHIGS and SunPHIGS Extension interior attributes. SET EXTENDED INTERIOR REPRESENTATION 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 (i.e., 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 EXTENDED INTERIOR FACILITIES (3P+)
INQUIRE EXTENDED INTERIOR REPRESENTATION (3P+)
SET TRIMMING CURVE APPROXIMATION CRITERIA (3P+)
SET INTERIOR STYLE INDEX (3P)
SET INTERIOR REPRESENTATION (3P)
SunPHIGS Release 1.1 — Last change: 7 July 1989