Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inquire_extended_interior_representation(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE EXTENDED INTERIOR REPRESENTATION(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

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

SYNOPSIS

C Syntax

void
pinqextintrep ( wsid, index, type, error_ind, rep )
Pintwsid;workstation identifier
Pintindex;interior index
Pinqtypetype;type of returned values (PSET,PREALIZED)
Pint∗error_ind;OUT error indicator
Pextinterbundl∗rep; OUT extended interior rep

FORTRAN Syntax

SUBROUTINE pqeir ( WKID, INDEX, TYPE, ERRIND, STYLE, ISTYLE, COLMOD,
     ICOLR, COLR, REFEQ, SHADEM, AMCOEF, DICOEF, SPCOEF, SCOLM, ISCOLR,
     SCOLR, SPEXP, TRCOEF, APTYP, APVAL, TAPTYP, TAPVAL )
INTEGERWKIDworkstation identifier
INTEGERINDEXbundle index
INTEGERTYPEtype of returned values (PSET,PREALI)
INTEGERERRINDOUT error indicator
INTEGERSTYLE(2)OUTinterior styles
INTEGERISTYLE(2)OUTinterior style indexes
INTEGERCOLMOD(2)OUTinterior colour models
INTEGERICOLR(2)OUTinterior colour index
REALCOLR(3,2)OUTinterior colour triples
INTEGERREFEQ(2)OUT reflectance equations
INTEGERSHADEM(2)OUT shading methods
REALAMCOEf(2)OUT ambient reflectance coefficients
REALDICOEF(2)OUT diffuse reflectance coefficients
REALSPCOEF(2)OUT specular reflectance coefficients
INTEGERSCOLM(2)OUTspecular colour models
INTEGERISCOLR(2)OUTspecular colour indexes
REALSCOLR(3,2)OUT specular colour triples
REALSPEXP(2)OUT specular exponents
REALTRCOEF(2)OUT transparency coefficients
INTEGERAPTYPOUT surface approximation type
REALAPVAL(2)OUT surface approximation values, u and v
INTEGERTAPTYPOUT trimming curve approximation type
REALTAPVALOUT trimming curve approximation value

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE EXTENDED INTERIOR REPRESENTATION returns the values of a specified entry in a 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 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 PREALIZED, 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 (PSET), or those resulting after PHIGS mapped them to ones available on the workstation (PREALIZED).  A Pinqtype structure is defined as:

typedef enum {
PSET,
PREALIZED
} Pinqtype;

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 Pextinterbundl structure which returns the specified extended interior representation.  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 EXTENDED 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_PAMBIENTUse 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_CHORDAL_DEVIATION_WC
6PSURF_CHORDAL_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. 

WKIDWorkstation identifier. 

INDEX
Index of the entry to be returned. If this entry is not present in the table and the type of returned value parameter is PREALI, then 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 (Set), or those resulting after PHIGS mapped them to ones available on the  workstation (Realized).  Valid values are:

0PSETSet
1PREALIRealized

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

STYLE(2)
The front and back interior styles. Valid values are defined as:

0PHOLLOHollow
1PSOLIDSolid
2PPATTRPatterned
3PHATCHHatched
4PISEMPEmpty
5PGENERGeneral

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, Blue
2PCIECIE
3PHSVHue, Saturation, Value
4PHLSHue, Lightness, Saturation

ICOLR(2)
The front and back colour indexes. ICOLR is used only if the corresponding value in COLMOD is PINDIR. 

COLR(3,2)
The front and back colour triples. COLR(3,∗) is used only if the corresponding value in COLMOD 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

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 below error numbers to indicate the reason for nonavailability. 

The extended interior bundle table contains bundled entries of the PHIGS and SunPHIGS 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 (i.e., 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 EXTENDED INTERIOR REPRESENTATION (3P+)
INQUIRE INTERIOR REPRESENTATION (3P)
INQUIRE PREDEFINED EXTENDED INTERIOR REPRESENTATION (3P+)

Sun Release 4.0  —  Last change: 2 August 1989

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