_C_ License Applicability. Except to the extent portions of this file are
_C_ made subject to an alternative license as permitted in the SGI Free
_C_ Software License B, Version 1.1 (the "License"), the contents of this
_C_ file are subject only to the provisions of the License. You may not use
_C_ this file except in compliance with the License. You may obtain a copy
_C_ of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
_C_ Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
_C_ 
_C_ http://oss.sgi.com/projects/FreeB
_C_ 
_C_ Note that, as provided in the License, the Software is distributed on an
_C_ "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
_C_ DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
_C_ CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
_C_ PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
_C_ 
_C_ Original Code. The Original Code is: OpenGL Sample Implementation,
_C_ Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
_C_ Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
_C_ Copyright in any portions created by third parties is as indicated
_C_ elsewhere herein. All Rights Reserved.
_C_ 
_C_ Additional Notice Provisions: The application programming interfaces
_C_ established by SGI in conjunction with the Original Code are The
_C_ OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
_C_ April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
_C_ 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
_C_ Window System(R) (Version 1.3), released October 19, 1998. This software
_C_ was created using the OpenGL(R) version 1.2.1 Sample Implementation
_C_ published by SGI, but has not been independently verified as being
_C_ compliant with the OpenGL(R) version 1.2.1 Specification.
_C_
_C_ The first character in this file must be an '_'!
_C_ Anything on a line after _C_ is ignored
_define(_filters,eqn)_C_
_C_      eqn is automatically replaced with neqn for nroff
_header(BeginTrim, delimit a NURBS trimming loop definition)
_names(BeginTrim)
_names(EndTrim,,noheader)
.EQ
delim $$
.EN
.SH PARAMETERS
_phead(_param1)
Specifies the NURBS object (created with _cmnd(NewNurbsRenderer)).
.SH DESCRIPTION
Use _cmnd(BeginTrim) to mark the beginning of a
trimming loop, and _cmnd(EndTrim) to mark the end 
of a trimming loop. A trimming 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 _cmnd(BeginSurface) and _cmnd(EndSurface).
.P
The definition for a NURBS surface can contain many
trimming 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 rectangle; the other would define
the hole punched out of the rectangle. The definitions
of each of these trimming loops would be bracketed by a
_cmnd(BeginTrim)/_cmnd(EndTrim) pair.
.P
The definition of a single closed trimming loop can consist
of multiple curve segments, each described as a piecewise
linear curve (see _cmnd(PwlCurve)) or as a single NURBS
curve (see _cmnd(NurbsCurve)), 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 _cmnd(BeginTrim) and _cmnd(EndTrim)) are 
_cmnd(PwlCurve) and _cmnd(NurbsCurve).
.P
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 rectangle 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.
.P
If you use more than one curve to define a single trimming 
loop, the curve segments must form a closed loop (that is,
the endpoint of each curve must be the starting point of the
next curve, and the endpoint of the final curve must
be the starting point of the first curve). If the 
endpoints of the curve are sufficiently close together
but not exactly coincident, they will be coerced to match.
If the endpoints are not sufficiently close, an error results
(see _cmnd(NurbsCallback)).
.P
If a trimming loop definition contains multiple curves,
the direction of the curves must be consistent (that is, the
inside must be to the left of all of the curves). Nested
trimming loops are legal as long as the curve orientations
alternate correctly.
If trimming curves are self-intersecting,
or intersect one another, an error results.
.P
If no trimming information is given
for a NURBS surface, the entire surface is drawn.
.SH EXAMPLE
This code fragment defines a trimming loop that consists of one
piecewise linear curve, and two NURBS curves:
.sp
.Ex
gluBeginTrim(nobj);
   gluPwlCurve(..., GLU_MAP1_TRIM_2);
   gluNurbsCurve(..., GLU_MAP1_TRIM_2);
   gluNurbsCurve(..., GLU_MAP1_TRIM_3);
gluEndTrim(nobj);
.Ee
.SH SEE ALSO
_cmnd(BeginSurface), _cmnd(NewNurbsRenderer), _cmnd(NurbsCallback), 
_cmnd(NurbsCurve), _cmnd(PwlCurve)


