SET INTERIOR SHADING METHOD(3P+) — MISC. REFERENCE MANUAL PAGES
NAME
SET INTERIOR SHADING METHOD − creates an interior structure element
SYNOPSIS
C Syntax
void
psetintshadmethod ( method )
Pintmethod;shading method
FORTRAN Syntax
SUBROUTINE psism ( METHOD)
INTEGERMETHODshading method
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
SET INTERIOR SHADING METHOD places a structure element with the value shading method into the open structure. When the current interior shading method 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
The following data type is predefined in phigs.h.
method
The interior shading method.
1PSD_NONENo Shading
2PSD_COLOURColour Interpolation Shading
3PSD_DOT_PRODUCTDot Product Interpolation Shading
4PSD_NORMALNormal Interpolation Shading
FORTRAN Input Parameters
All of the following data types are predefined in phigs77.h.
METHOD
The value of the shading method
1PSDNONNo Shading
2PSDCOLColour Interpolation Shading
3PSDDOTDot Product Interpolation Shading
4PSDNORNormal Interpolation Shading
Execution
Depending on the edit mode, a SET INTERIOR SHADING METHOD element is inserted into the open structure after the element pointer, or replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the newly created SET INTERIOR SHADING METHOD element.
When the structure is traversed, the current interior shading method 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 interior shading method ASF entry in the traversal state list is INDIVIDUAL. During traversal, if the specified shading method is not available on a workstation, method one (None) will be used on that workstation.
When the current interior shading method ASF is set to BUNDLED, the interior shading method is taken from the workstation extended representation indicated by the current interior index. In this case, the interior shading method set with SET INTERIOR SHADING METHOD has no effect.
The interior shading methods supported by a workstation type can be determined with the function INQUIRE EXTENDED INTERIOR FACILITIES.
When the shading method is NONE, each fill area or fill area set will be rendered in a single colour (this is sometimes called flat shading). If the shading method is NONE and the primitive data implies different colours for each vertex of the primitive, such as when vertex colour is specified or when lighting is active, the colour of the first vertex will be used for all the verticies of the primitive.
When the shading method is COLOUR and the workstation is in index colour mode, then the colours will be interpolated as colour indices instead of direct colours.
ERRORS
005Ignoring function, function requires state (PHOP,∗,STOP,∗)
SEE ALSO
INTRO PHIGS+ (3P+)
FILL AREA
FILL AREA SET
FILL AREA 3 WITH DATA (3P+)
FILL AREA SET 3 WITH DATA (3P+)
QUADRILATERAL MESH 3 WITH DATA (3P+)
TRIANGLE STRIP 3 WITH DATA (3P+)
POLYHEDRON 3 WITH DATA (3P+)
SET BACK INTERIOR SHADING METHOD (3P+)
SET INDIVIDUAL ASF (3P)
SET EXTENDED INTERIOR REPRESENTATION (3P+)
INQUIRE EXTENDED INTERIOR FACILITIES (3P+)
NON-UNIFORM B-SPLINE SURFACE
Sun Release 4.0 — Last change: 2 August 1989