NAME
- SET BACK REFLECTANCE PROPERTIES - create structure element to set back area properties
SYNOPSIS
C Syntax
-
void
-
pset_back_refl_props ( properties )
-
- Prefl_props
- * properties;
-
back surface area properties
FORTRAN Syntax
-
SUBROUTINE psbap ( AMB, DIF, SPEC, COLTYPE, ICOLR, COLR, EXP, TRANS )
-
-
REAL AMB ambient reflectance coefficient
REAL DIF diffuse reflectance coefficient
REAL SPEC specular reflectance coefficient
INTEGER COLTYPE colour type
INTEGER ICOLR indirect colour
REAL COLR(3) specular colour
REAL EXP specular exponent
REAL TRANS transparency coefficient
Required PHIGS Operating States
- (PHOP, * ,STOP, * )
DESCRIPTION
Purpose
- SET BACK REFLECTANCE PROPERTIES creates a structure element to set the back area properties.
- When the current back area properties ASF is set to INDIVIDUAL, the current value of this attribute applies to the following output primitives:
- FILL AREA
- FILL AREA 3
- FILL AREA SET
- FILL AREA SET 3
- FILL AREA SET 3 WITH DATA
- NON-UNIFORM B-SPLINE SURFACE
- SET OF FILL AREA SET 3 WITH DATA
- QUADRILATERAL MESH 3 WITH DATA
- TRIANGLE STRIP 3 WITH DATA
- This is a SunPHIGS Extension function based on PHIGS PLUS and is not part of the PHIGS standard.
C Input Parameter
-
properties
- A pointer to a Prefl_props structure that specifies the back area properties. Prefl_props is defined in phigs.h as follows:
- 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;
- Pgcolr is defined as:
- typedef struct {
-
- Pint
- type;
- /* indirect, RGB, CIE, HSV, HLS * /
- union {
-
- Pint
- ind;
- /* colour table index * /
- 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;
- The color type is one of the following:
-
-
0 PINDIRECT Indirect
1 PMODEL_RGB Red, Green, and Blue
2 PMODEL_CIELUV CIE Colour Model
3 PMODEL_HSV Hue, Saturation, and Value
4 PMODEL_HLS Hue, Lightness, and Saturation
FORTRAN Input Parameters
- The following data types are predefined in phigs77.h.
-
-
AMB
- The ambient reflectance coefficient.
-
-
DIF
- The diffuse reflectance coefficient.
-
-
SPEC
- The specular reflectance coefficient.
-
COLTYPE
- The colour type. The predefined values are:
-
-
0 PINDIR Indirect
1 PRGB Red, Green, and Blue
2 PCIE CIE Colour Model
3 PHSV Hue, Saturation, and Value
4 PHLS Hue, Lightness, and Saturation
-
ICOLR An integer value that is an index into the workstation colour table for
- determining the specular colour. ICOLR is used if COLTYPE is set to PINDIR.
-
COLR(3)
- The specular colour. An array of reals containing the specular colour. COLR(3) is
-
- used if COLTYPE is set to other than PINDIR.
- COLR(1) = Red, Hue, and so on
- COLR(2) = Green, Saturation, Lightness, and so on
- COLR(3) = Blue, Value, Saturation, and so on
-
-
EXP
- The specular exponent.
-
TRANS The transparency coefficient.
Execution
- Depending on the edit mode, a SET BACK REFLECTANCE PROPERTIES element is inserted into the open structure after the element pointer or replaces the element pointed at by the element pointer. The element pointer is then updated to point to this SET BACK REFLECTANCE PROPERTIES element.
- Back face attributes (such as back area properties, back interior colour, back interior reflectance equation, back interior shading method, back interior style, and back interior style index) are used only when the face distinguishing mode has the value Yes and are applied only to the back facing portion of area defining primitives. See SET FACE DISTINGUISHING MODE (3PP) for details on front and back face determination.
- When the current back area properties ASF is set to INDIVIDUAL, area-defining output primitives, which follow in the structure network and are subject to back face attributes, are filled using the current back area properties.
- When the current back area properties ASF is set to BUNDLED, the back area properties are taken from the workstation extended representation indicated by the current interior index. In this case, the back area properties set with SET BACK REFLECTANCE PROPERTIES has no effect.
ERRORS
-
- 005
- Ignoring function, function requires state (PHOP, * ,STOP, * )
SEE ALSO
-
SET REFLECTANCE PROPERTIES (3PP)
-
SET FACE DISTINGUISHING MODE (3PP)
-
SET INDIVIDUAL ASF (3P)
-
SET INTERIOR REPRESENTATION PLUS (3PP)
-
SET FACE CULLING MODE (3PP)
|