Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pqpeir(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

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

NAME

INQUIRE PREDEFINED EXTENDED INTERIOR REPRESENTATION − inquire the values of a predefined extended interior representation for a specified workstation type

SYNOPSIS

C Syntax

pinqpredextintrep ( wstype, index, error_ind, rep )
Pwstypewstype;workstation type
Pintindex;predefined interior index
Pint∗error_ind;OUT error indicator
Pextinterbundl∗rep; OUT predefined extended interior representation

FORTRAN Syntax

SUBROUTINE pqpeir ( WKTYPE, INDEX, ERRIND, STYLE, ISTYLE, COLMOD, ICOLR,
     COLR, REFEQ, SHADEM, AMCOEF, DICOEF, SPCOEF, SCOLM, ISCOLR, SCOLR,
     SPEXP, TRCOEF, APTYP, APVAL, TAPTYP, TAPVAL )
INTEGERWKTYPEworkstation type
INTEGERINDEXpredefined interior index
INTEGERERRINDOUT error indicator
INTEGERSTYLE(2)OUT interior styles
INTEGERISTYLE(2)OUT interior style indexes
INTEGERCOLMOD(2)OUT interior colour models
INTEGERICOLR(2)OUT interior colour indexes
REALCOLR(3,2)OUT interior 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)OUT specular colour models
INTEGERISCOLR(2)OUT specular 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, ∗, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE PREDEFINED EXTENDED INTERIOR REPRESENTATION returns the values of a specified entry in the workstation type’s table of predefined interior representations. 

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. 

wstypeThe workstation type. 

indexIndex of the predefined entry to be returned. 

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 in which the system returns the specified predefined 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 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. 

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:

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. 

WKTYPE
The workstation type.  See OPEN WORKSTATION for a list of the available workstation types. 

INDEX
Index of the predefined entry to be returned from the extended interior bundle table of the workstation type’s workstation description table.

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

See SET INTERIOR STYLE for a description of each style. 

ISTYLE(2)
The front and back interior style indices, which select entries in the workstation interior style tables.

COLMOD(2)
The front and back colour models.  The defined values are:

0PINDIRColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation

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

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

SCOLR(3,2)
The front and back specular colour triples.  SCOLR 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 its use. 

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

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 EXTENDED INTERIOR REPRESENTATION (3P+)
INQUIRE EXTENDED INTERIOR REPRESENTATION (3P+)
INQUIRE EXTENDED INTERIOR FACILITIES (3P+)
INQUIRE PREDEFINED INTERIOR REPRESENTATION (3P)

Sun Release 4.0  —  Last change: 2 August 1989

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