scrsubdivide man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



scrsubdivide(3G)					      scrsubdivide(3G)

NAME
     scrsubdivide - subdivide lines and polygons to a screen-space limit

C SPECIFICATION
     void scrsubdivide(mode, params)
     long mode;
     float params[];

PARAMETERS
     mode     Specify whether and how lines and polygons are to be subdivided.
	      Options are:

	      SS_OFF:  do not subdivide. (default)

	      SS_DEPTH:	 subdivide based on z values in screen-coordinates.

     params   Expects an array that contains parameter specifications for the
	      subdivision mode that has been selected.

	      The values provided in the params array are ignored when the
	      mode is SS_OFF.

	      SS_DEPTH expects three values in the params array:  maxz,
	      minsize, and maxsize.  maxz specifies the distance, in screen-
	      coordinates, between z=constant subdivision planes.  (Z-buffer
	      screen coordinates are defined by lsetdepth.)  minsize and
	      maxsize specify bounds, in units of pixels, of the screen size
	      of the resulting subdivided polygons.  Setting maxz to 0.0
	      eliminates screen-coordinate z from consideration during the
	      subdivision.  Likewise, setting minsize or maxsize to 0.0
	      eliminates lower or upper bounds on screen size from
	      consideration.

DESCRIPTION
     When scrsubdivide mode is not SS_OFF, lines and polygons are subdivided
     until the specified criteria are met.  Parameters are assigned to created
     vertices as though they have been interpolated in eye-coordinates, rather
     than in screen-coordinates.  Thus effects that result from (incorrect)
     linear interpolation in screen-coordinates can be compensated for with
     scrsubdivide.

     Mode SS_DEPTH slices polygons into strips whose edges have constant
     screen z value.  It divides lines into segments whose endpoint z values
     differ by maxz.  This subdivision is done after lighting, so the newly
     created vertices are not lighted, but rather simply take color values as
     linear interpolants of the original vertices (in eye-coordinates).	 Both
     fog and texture mapping are done after the depth subdivision, so both
     benefit from its operation.

     Polygon slices created by SS_DEPTH subdivision have edges whose z values
     differ by maxz.  However, if the width of the resulting slices is less
     than minsize, the slices are increased to have width equal to minsize.

									Page 1

scrsubdivide(3G)					      scrsubdivide(3G)

     For example, if maxsize is set to 0.0 (i.e. defeated), a polygon that
     directly faces the viewer is not subdivided, because all vertices have
     the same z value.	As this polygon is rotated away from the viewer, it is
     sliced into strips whose edges are parallel to the axis of rotation.  The
     number of strips increases as the rotation increases, until the strips
     reach a width (measured perpendicular to the axis of rotation) of
     minsize.  At this angle the number of slices is at its maximum.  As the
     rotation is continued, the slice width remains constant, and the number
     of slices decreases, reaching zero as the polygon becomes perpendicular
     to the viewer.

     When maxsize is non-zero, the description above changes only in that
     large polygons that are nearly perpendicular to the viewer are subdivided
     into strips of width maxsize.  Likewise, lines segments created by
     SS_DEPTH subdivision are limited to a minimum length of minsize, and a
     maximum length of maxsize.

     SS_DEPTH subdivision improves the accuracy of texture mapping when non-
     orthographic projections are used, and improves the accuracy of fog
     calculations.  It is not useful for lighting improvement.

SEE ALSO
     fogvertex, texbind, tevbind

NOTES
     scrsubdivide cannot be used while mmode is MSINGLE.

     Only the VGX supports scrsubdivide.  It has no effect on the VGXT and
     SkyWriter models because of their support for per-pixel perspective
     division.

BUGS
     When the screen size of subdivided polygons is limited, either by minsize
     or by maxsize, adjacent polygons can subdivide differently such that
     newly created vertices on their shared boundary do not coincide.  In this
     case, some pixels at their shared boundary may not be scan converted by
     either polygon.

     Incorrect specification of either maxz or minsize can result in near-
     infinite polygon subdivision.  To avoid the resulting poor graphics
     system response, IRIS-4D VGX models do not subdivide polygons whose
     SS_DEPTH subdivision would result in more than 2000 slices.

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net