Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ clipplane(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



clipplane(3G)                                                    clipplane(3G)



NAME
     clipplane - specify a plane against which all geometry is clipped

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

PARAMETERS
     index    expects an integer in the range 0 through 5, indicating which of
              the 6 clipping planes is being modified.

     mode     expects one of three tokens:

              CPDEFINE:  use the plane equation passed in params to define a
              clipplane.  The clipplane is neither enabled nor disabled.

              CPON:  enable the (previously defined) clipplane.

              CPOFF:  disable the clipplane. (default)

     params   expects an array of 4 floats that specify a plane equation.  A
              plane equation is usually thought of as a 4-vector [A,B,C,D].
              In this case, A is the first component of the params array, and
              D is the last.  A 4-component vertex array (see v4f) can be
              passed as a plane equation, where vertex X becomes A, Y becomes
              B, etc.  The specified contents of params are insignificant when
              mode is CPON, or CPOFF.

DESCRIPTION
     Geometry is always clipped against the boundaries of a 6-plane frustum in
     x, y, and z. clipplane allows the specification of additional planes, not
     necessarily perpendicular to the x, y, or z axes, against which all
     geometry is clipped.  Up to 6 additional planes can be specified.
     Because the resulting clipping region is always the intersection of the
     (up to) 12 half-spaces, it is always convex.

     clipplane specifies a half-space using a 4-component plane equation.
     When it is called with mode CPDEFINE, this object-coordinate plane
     equation is transformed to eye-coordinates using the inverse of the
     current ModelView matrix.

     A defined clipplane is then enabled by calling clipplane with the CPON
     argument, and with arbitrary values passed in params.  While drawing
     after a clipplane has been defined and enabled, each vertex is
     transformed to eye-coordinates, where it is dotted with the transformed
     clipping plane equation.  Eye-coordinate vertexes whose dot product with
     the transformed clipping plane equation is positive or zero are in, and
     require no clipping.  Those eye-coordinate vertexes whose dot product is
     negative are clipped.  Because clipplane clipping is done in eye-
     coordinates, changes to the projection matrix have no effect on its
     operation.



                                                                        Page 1





clipplane(3G)                                                    clipplane(3G)



     By default all six clipping planes are undefined and disabled.  The
     behavior of an enabled but undefined clipplane is undefined.

NOTES
     IRIS-4D models G, GT, and GTX, and the Personal Iris, do not implement
     clipplane.  Use getgdesc to determine whether user-defined clipping
     planes are supported.

     clipplane cannot be used while mmode is MSINGLE.

     A point and a normal are converted to a plane equation in the following
     manner:

          point = [Px,Py,Pz]

          normal = |Nx|
                   |Ny|
                   |Nz|

          plane equation = |A|
                           |B|
                           |C|
                           |D|
              A = Nx
              B = Ny
              C = Nz
              D = -[Px,Py,Pz] dot |Nx|
                         |Ny|
                         |Nz|


BUGS
     On Impact and Infinite Reality clipplane cannot be used with depthcue






















                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026