SET AREA PROPERTIES(3P+) — MISC. REFERENCE MANUAL PAGES
NAME
SET AREA PROPERTIES − create a structure element to set surface area properties
SYNOPSIS
C Syntax
void
psetareaprop ( properties )
Pareaprops∗properties;surface area properties
FORTRAN Syntax
SUBROUTINE psap ( AMB, DIF, SPEC, COLMOD, ICOLR, COLR, EXP, TRANS )
REALAMBambient reflectance coefficient
REALDIFdiffuse reflectance coefficient
REALSPECspecular reflectance coefficient
INTEGERCOLMODcolour model
INTEGERICOLRindirect colour
REALCOLR(3)specular colour
REALEXPspecular exponent
REALTRANStransparency coefficient
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
SET AREA PROPERTIES creates a structure element to set surface area properties. When the current area properties Aspect Source Flag (ASF) is set to INDIVIDUAL, the current value of this attribute applies to the following output primitives:
• FILL AREA
• FILL AREA SET
• FILL AREA 3 WITH DATA
• FILL AREA SET 3 WITH DATA
• QUADRILATERAL MESH 3 WITH DATA
• TRIANGLE STRIP 3 WITH DATA
• POLYHEDRON 3 WITH DATA
• NON-UNIFORM B-SPLINE SURFACE
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.
properties
A pointer to a Pareaprops structure that specifies the area properties. Pareaprops is defined as follows:
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;
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;
FORTRAN Input Parameters
All of the following data types are predefined in phigs77.h.
AMBThe ambient reflectance coefficient.
DIFThe diffuse reflectance coefficient.
SPECThe specular reflectance coefficient.
COLMOD
The colour model. The predefined values are:
0PINDIRColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation
ICOLR
An integer value which is an index into the workstation colour table for determining the specular colour. ICOLR is used if COLMOD is set to PINDIR.
COLR(3)
The specular colour. An array of reals containing the specular colour. COLR(3) is used if COLMOD is set to other than PINDIR.
COLR(1) = Red, Hue, etc.
COLR(2) = Green, Saturation, Lightness, etc.
COLR(3) = Blue, Value, Saturation, etc.
EXPThe specular exponent.
TRANS
The transparency coefficient.
Execution
Depending upon the edit mode, a SET AREA 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 AREA PROPERTIES element.
When the structure is traversed, the current area properties entry in the traversal state list is set to the specified value. This value is used with subsequent filled area output primitives when the current area properties ASF entry in the traversal state list is INDIVIDUAL. During traversal, if the specified area properties are not available on a workstation, method one (None) will be used on that workstation.
When the current area properties ASF is set to BUNDLED, the area properties are taken from the workstation extended representation indicated by the current interior index. In this case, the area properties set with SET AREA PROPERTIES have no effect.
The area properties supported by a workstation type can be determined with the function INQUIRE EXTENDED INTERIOR FACILITIES.
ERRORS
005Ignoring function, function requires state (PHOP,∗,STOP,∗)
SEE ALSO
INTRO PHIGS+ (3P+)
FILL AREA
FILL AREA SET
FILL AREA 3 (3P)
FILL AREA SET 3 WITH DATA (3P+)
SET INDIVIDUAL ASF (3P)
SET EXTENDED INTERIOR REPRESENTATION (3P+)
SET EXTENDED INTERIOR REPRESENTATION (3P+)
INQUIRE EXTENDED INTERIOR FACILITIES (3P+)
NON-UNIFORM B-SPLINE SURFACE
Sun Release 4.0 — Last change: 28 July 1989