SunPHIGS 3.0 Extensions Reference Manual
  Buscar sólo este libro
Descargar este libro en PDF

NAME

SET INTERIOR SHADING METHOD - create structure element that sets current interior shading method

SYNOPSIS

C Syntax

void
pset_int_shad_meth ( method )
Pint
method;
shading method

FORTRAN Syntax

SUBROUTINE psism ( METHOD )
INTEGER
METHOD
shading 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 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 PLUS and is not part of the PHIGS standard.

C Input Parameter

The following data type is predefined in phigs.h.
method The interior shading method.
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

FORTRAN Input Parameters

The following data types are predefined in phigs77.h.
METHOD
The value of the shading method
1   PSDNON     No shading
2   PSDCOL     Colour interpolation shading
3   PSDDOT     Dot product interpolation shading
4   PSDNOR     Normal 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 INTERIOR FACILITIES PLUS.
SunPHIGS does not support the Dot Product Interpolation Shading and Normal Interpolation Shading methods. When one of these shading methods is specified, the backup NONE is used.
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 vertices 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

005
Ignoring function, function requires state (PHOP, * ,STOP, * )

SEE ALSO

INTRO (3PP)
FILL AREA (3P)
FILL AREA SET (3P)
FILL AREA SET 3 WITH DATA (3PP)
QUADRILATERAL MESH 3 WITH DATA (3PP)
TRIANGLE STRIP 3 WITH DATA (3PP)
SET OF FILL AREA SET 3 WITH DATA (3PP)
SET BACK INTERIOR SHADING METHOD (3PP)
SET INDIVIDUAL ASF (3P)
SET INTERIOR REPRESENTATION PLUS (3PP)
INQUIRE INTERIOR FACILITIES PLUS (3PP)
NON-UNIFORM B-SPLINE SURFACE (3PP)