HPUX pset_int_shad_method[3g]






 PSISM(3G)               SET INTERIOR SHADING METHOD               PSISM(3G)





 NAME
      SET INTERIOR SHADING METHOD - creates a CSS element that sets the
      current interior shading method entry in the traversal state list

 OPERATING STATES
      (PHOP, *, STOP,  *)

 SYNOPSIS
    FORTRAN Binding, FORTRAN Syntax:
           subroutine PSISM(method)
           integer*4 method

    FORTRAN Binding, C Syntax:
           void psism(method)
           int method;

 DESCRIPTION
    Fortran Binding Input Parameters
      method
           The interior shading method to be used when displaying area
           defining primitives.  Possible values are the following:

           1 None.  This method is commonly referred to as flat shading or
             constant shading.  The area of a facet is rendered in one
             colour, and this colour is derived from the intrinsic colour.
             For this shading method, the intrinsic colour of a facet is the
             facet colour, or the current interior colour if facet colours
             are not specified.  Vertex colours and vertex normals are
             ignored.

           2 Colour.  This method is commonly referred to as smooth shading,
             bilinear shading, or Gouraud shading.  For this method to look
             better than shading method 1, the application must supply
             vertex normal data, vertex colour data, or both.  Realized
             vertex colours are bilinearly interpolated across each facet
             when a facet is rendered.

             Note that the above shading methods only apply in a direct
             colour environment.  See the Discussion section for more
             information.

    Discussion
      This routine creates a CSS element that, when traversed, sets the
      current interior shading method entry in the traversal state list.
      HP-PHIGS uses this value when the aspect source flag (ASF) for the
      current interior shading method is set to individual.

      HP-PHIGS defines facets for each area defining primitive as follows:

         o  The whole of a fill area or a fill area set primitive
            constitutes one facet.



 Hewlett-Packard Company            - 1 - HP-PHIGS Release 2.3: October 1992






 PSISM(3G)               SET INTERIOR SHADING METHOD               PSISM(3G)





         o  Each triangle in a triangle strip constitutes one facet.

         o  Each quadrilateral in a quadrilateral mesh constitutes one
            facet.

         o  Each tessellated sub-area of a non-uniform B-spline surface
            constitutes one facet.

      The intrinsic colour is the colour of a primitive that is independent
      of lighting and shading.  It is either a value from the workstation
      colour table or a directly specified RGB triplet.  The intrinsic
      colour can be either the current interior colour or the facet colour.

      The interior shading methods described under the method parameter only
      apply in a direct colour environment.  In an indexed colour
      environment both shading methods use the current interior colour and
      no shading is performed.  Use the SET COLOUR ENVIRONMENT ESCAPE
      (pue250, pescape_u250) routine to set the colour environment.  The
      colour environment is indexed by default if the workstation supports
      the indexed colour environment; otherwise, the initial colour
      environment is direct.

      Shading Method Colour (Smooth Shading)

      In the following discussion, the term "reflectance calculations"
      refers to the calculations enabled by the SET INTERIOR REFLECTANCE
      CALCULATIONS (psire) routine.  Reflectance calculations are disabled
      by default.

      When reflectance calculations are disabled, realized vertex colours
      are the vertex colours specified by the application.  If the
      application does not specify vertex colours, then each realized vertex
      colour is the intrinsic colour of the facet which that vertex is
      associated with when the facet is being rendered.

      When reflectance calculations are enabled, realized vertex colours are
      calculated from the normal and colour at each vertex.  The colour at
      each vertex is obtained as described in the previous paragraph.  The
      normal at each vertex is that specified by the application.  If not
      specified, then the normal at each vertex is the facet normal of the
      facet which that vertex is associated with when the facet is being
      rendered.  If facet normals are not specified by the application, then
      they are computed based on the geometry of the primitive.

      Shading Method None (Flat Shading)

      When reflectance calculations are disabled, realized facet colours are
      the intrinsic colours of the facets.  HP-PHIGS ignores application
      supplied vertex normals and vertex colours for this shading method.





 Hewlett-Packard Company            - 2 - HP-PHIGS Release 2.3: October 1992






 PSISM(3G)               SET INTERIOR SHADING METHOD               PSISM(3G)





      When reflectance calculations are enabled, realized facet colours are
      calculated from each facet normal and the intrinsic colour of each
      facet.  If facet normals are not specified by the application, then
      they are computed based on the geometry of the primitive.

 DEFAULTS
      The default shading method is 1 (flat shading).  If the specified
      interior shading method is not available on a workstation, HP-PHIGS
      uses the default.

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

 SEE ALSO
      SET INTERIOR REFLECTANCE EQUATION (psire), SET INTERIOR REPRESENTATION
      PLUS (psirp), INQUIRE INTERIOR REPRESENTATION PLUS (pqirp), INQUIRE
      PREDEFINED INTERIOR REPRESENTATION PLUS (pqpirp)





































 Hewlett-Packard Company            - 3 - HP-PHIGS Release 2.3: October 1992