NAME
- INQUIRE PREDEFINED INTERIOR REPRESENTATION PLUS - inquire for values of predefined extended interior representation for specified workstation type
SYNOPSIS
C Syntax
-
pinq_pred_int_rep_plus ( type, index, error_ind, bundle )
-
-
Pint type; workstation type
Pint index; interior index
Pint * error_ind; OUT error indicator
Pint_bundle_plus * bundle; OUT predefined interior representation
FORTRAN Syntax
-
SUBROUTINE pqpeir ( WKTYPE, INDEX, ERRIND, STYLE, ISTYLE, COLTYPE, ICOLR, COLR, REFEQ, SHADEM, AMCOEF, DICOEF, SPCOEF, SCOLM, ISCOLR, SCOLR, SPEXP, TRCOEF, APTYP, APVAL )
-
-
INTEGER WKTYPE workstation type
INTEGER INDEX predefined interior index
INTEGER ERRIND OUT error indicator
INTEGER STYLE(2) OUT interior styles
INTEGER ISTYLE(2) OUT interior style indexes
INTEGER COLTYPE(2) OUT interior colour types
INTEGER ICOLR(2) OUT interior colour indexes
REAL COLR(3,2) OUT interior colour triples
INTEGER REFEQ(2) OUT reflectance equations
INTEGER SHADEM(2) OUT shading methods
REAL AMCOEF(2) OUT ambient reflectance coefficients
REAL DICOEF(2) OUT diffuse reflectance coefficients
REAL SPCOEF(2) OUT specular reflectance coefficients
INTEGER SCOLM(2) OUT specular colour models
INTEGER ISCOLR(2) OUT specular colour indexes
REAL SCOLR(3,2) OUT specular colour triples
REAL SPEXP(2) OUT specular exponents
REAL TRCOEF(2) OUT transparency coefficients
INTEGER APTYP OUT surface approximation type
REAL APVAL(2) OUT surface approximation values, u and v
Required PHIGS Operating States
- (PHOP, * ,* ,* )
DESCRIPTION
Purpose
- INQUIRE PREDEFINED INTERIOR REPRESENTATION PLUS 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 PLUS and is not part of the PHIGS standard.
C Input Parameters
-
-
type
- The workstation type.
-
-
index
- Index of the predefined entry to be returned.
C Output Parameters
-
error_ind
- A pointer to the location for storing the error number of any error this function detects.
-
-
bundle
- A pointer to a Pint_bundle_plus structure in which the system returns the specified predefined extended interior representation. Pint_bundle_plus is defined as:
- typedef struct {
-
-
Pint_style style; /* interior style * /
Pint style_ind; /* interior style index * /
Pgcolr colr; /* interior colour * /
Pint refl_eqn; /* reflectance equation * /
Pint shad_meth; /* shading method * /
Prefl_props refl_props; /* area properties * /
Pint_style back_style; /* interior style * /
Pint back_style_ind; /* interior style index * /
Pgcolr back_colr; /* interior colour * /
Pint back_refl_eqn; /* back reflectance equation * /
Pint back_shad_meth; /* back shading method * /
Prefl_props back_refl_props; /* back area properties * /
Pint approx_type; /* approximation method * /
Pfloat approx_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 {
-
- Pint
- ind;
- /* index in workstation colour bundle table * /
- struct {
-
-
Pfloat x; /* red, hue, and so on * /
Pfloat y; /* green, saturation, lightness, and so on * /
Pfloat z; /* blue, value, saturation, and so on * /
} general;
} val;
} Pgcolr;
- Constants defined for colour type are:
-
-
0 PINDIRECT Indirect
1 PMODEL_RGB Red, Green, Blue
2 PMODEL_CIELUV CIE
3 PMODEL_HSV Hue, Saturation, Value
4 PMODEL_HLS Hue, Lightness, Saturation
- The index member of the val union is used for type PINDIRECT. The general member is used for the other types.
- Prefl_props is defined as:
- typedef struct {
-
-
Pfloat ambient_coef; /* ambient reflectance coefficient * /
Pfloat diffuse_coef; /* diffuse reflectance coefficient * /
Pfloat specular_coef; /* specular reflectance coefficient * /
Pgcolr specular_colr; /* specular colour * /
Pfloat specular_exp; /* specular exponent * /
Pfloat transpar_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.
- Defined reflectance equation values are:
-
-
1 PREFL_NONE No reflectance calculation performed
2 PREFL_AMBIENT Use ambient term
3 PREFL_AMB_DIFF Use ambient and diffuse terms
4 PREFL_AMB_DIFF_SPEC Use ambient, diffuse, and specular terms
- Defined constants for interior shading method are:
-
-
1 PSD_NONE No shading
2 PSD_COLOUR Colour interpolation shading
3 PSD_DOT_PRODUCT Dot product interpolation shading
4 PSD_NORMAL Normal interpolation shading
-
- Constants defined for surface approximation type are:
- 1
- PSURF_WS_DEP
-
- 2
- PSURF_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
-
- 3
- PSURF_CHORDAL_SIZE_WC
-
- 4
- PSURF_CHORDAL_SIZE_NPC
-
- 5
- PSURF_CHORDAL_SIZE_DC
-
- 6
- PSURF_PLANAR_DEVIATION_WC
-
- 7
- PSURF_PLANAR_DEVIATION_NPC
-
- 8
- PSURF_PLANAR_DEVIATION_DC
- See SET SURFACE APPROXIMATION CRITERIA for a description of the meaning of these constants.
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 description table of that workstation type.
FORTRAN Output Parameters
-
ERRIND
- The error number of any error that this function detects.
-
STYLE(2)
- The front and back interior styles. Valid values are defined as:
-
-
0 PHOLLO Hollow
1 PSOLID Solid
2 PPATTR Patterned
3 PHATCH Hatched
4 PISEMP Empty
- 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.
-
COLTYPE(2)
- The front and back colour types. The defined values are:
-
-
0 PINDIR Colour Index Specified
1 PRGB Red, Green, and Blue
2 PCIE CIE Colour Model
3 PHSV Hue, Saturation, and Value
4 PHLS Hue, Lightness, and Saturation
-
ICOLR(2)
- The front and back colour indices. ICOLR is used only if the corresponding value in COLTYPE is PINDIR.
-
COLR(3,2)
- The front and back colour triples. COLR is used only if the corresponding value in COLTYPE 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. Defined reflectance equation values are:
-
-
1 PRNONE No Reflectance Calculation Performed
2 PRAMB Use Ambient Term
3 PRAMBD Use Ambient and Diffuse Terms
4 PRAMDS Use Ambient, Diffuse, and Specular Terms
The front and back interior shading methods. Defined constants are:
-
- 1
- PSDNON
-
No Shading
-
-
2 PSDCOL Colour Interpolation Shading
3 PSDDOT Dot Product Interpolation Shading
4 PSDNOR Normal 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. Defined values are:
-
-
1 PSAWSD Workstation-dependent
2 PSAEPK Constant Parametric Subdivision Between Knots
3 PSACSW Chordal Size in WC
4 PSACSN Chordal Size in NPC
5 PSACSD Chordal Size in DC
6 PSAPDW Planar Deviation in WC
7 PSAPDN Planar Deviation in NPC
8 PSAPDD Planar Deviation in DC
- For their descriptions, see SET SURFACE APPROXIMATION CRITERIA.
-
APVAL(2)
- The surface approximation values. For their descriptions, see SET SURFACE APPROXIMATION CRITERIA.
Execution
- If the inquired information is available, then the error indicator is returned as zero, and information is returned in the output parameters.
- If the inquired information is not available, then 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 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
-
- 002
- Ignoring function, function requires state (PHOP, * ,* ,* )
-
- 051
- Ignoring function, the information unavailable for this workstation type
-
- 052
- Ignoring function, workstation type not recognized by the implementation
-
- 062
- Ignoring function, this information is not available for this MO workstation type
-
- 100
- Ignoring function, the bundle index value is less than one
-
- 102
- Ignoring function, the specified representation has not been predefined on this workstation
SEE ALSO
-
SET INTERIOR REPRESENTATION PLUS (3PP)
-
INQUIRE INTERIOR REPRESENTATION PLUS (3PP)
-
INQUIRE INTERIOR FACILITIES PLUS (3PP)
-
INQUIRE PREDEFINED INTERIOR REPRESENTATION (3P)
|