gluBeginTrim,  gluEndTrim  - delimit a NURBS trimming loop
       definition



C SPECIFICATION

       void gluBeginTrim( GLUnurbs* nurb )

       void gluEndTrim( GLUnurbs* nurb )



PARAMETERS

       nurb  Specifies   the   NURBS   object    (created    with
             gluNewNurbsRenderer).


DESCRIPTION

       Use gluBeginTrim to mark the beginning of a trimming loop,
       and gluEndTrim to mark the end of a trimming loop. A trim-
       ming  loop  is a set of oriented curve segments (forming a
       closed curve) that define boundaries of a  NURBS  surface.
       You  include  these  trimming loops in the definition of a
       NURBS  surface,  between  calls  to  gluBeginSurface   and
       gluEndSurface.

       The  definition for a NURBS surface can contain many trim-
       ming loops. For example, if you wrote a definition  for  a
       NURBS  surface  that  resembled  a  rectangle  with a hole
       punched out, the definition  would  contain  two  trimming
       loops. One loop would define the outer edge of the rectan-
       gle; the other would define the hole punched  out  of  the
       rectangle. The definitions of each of these trimming loops
       would be bracketed by a gluBeginTrim/gluEndTrim pair.

       The definition of a single closed trimming loop  can  con-
       sist  of  multiple  curve  segments,  each  described as a
       piecewise linear curve (see gluPwlCurve) or  as  a  single
       NURBS  curve  (see  gluNurbsCurve), or as a combination of
       both in any order. The only library calls that can  appear
       in  a  trimming  loop  definition  (between  the  calls to
       gluBeginTrim   and   gluEndTrim)   are   gluPwlCurve   and
       gluNurbsCurve.

       The  area  of  the  NURBS surface that is displayed is the
       region in the domain to the left of the trimming curve  as
       the  curve  parameter increases. Thus, the retained region
       of the NURBS surface is inside a counterclockwise trimming
       loop  and outside a clockwise trimming loop. For the rect-
       angle mentioned earlier, the trimming loop for  the  outer
       edge  of  the  rectangle  runs counterclockwise, while the
       trimming loop for the punched-out hole runs clockwise.

       If you use more than one curve to define a single trimming
       loop, the curve segments must form a closed loop (that is,
       results.

       If no trimming information is given for a  NURBS  surface,
       the entire surface is drawn.


EXAMPLE

       This  code  fragment defines a trimming loop that consists
       of one piecewise linear curve, and two NURBS curves:

       gluBeginTrim(nobj);
          gluPwlCurve(..., GLU_MAP1_TRIM_2);
          gluNurbsCurve(..., GLU_MAP1_TRIM_2);
          gluNurbsCurve(..., GLU_MAP1_TRIM_3); gluEndTrim(nobj);


SEE ALSO

       gluBeginSurface,  gluNewNurbsRenderer,   gluNurbsCallback,
       gluNurbsCurve, gluPwlCurve





                                                                1