123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- '\" e
- '\"! eqn | mmdoc
- '\"macro stdmacro
- .ds Vn Version 1.2
- .ds Dt 6 March 1997
- .ds Re Release 1.2.0
- .ds Dp May 02 11:53
- .ds Dm 37 begintrim
- .ds Xs 15822 6 begintrim.gl
- .TH GLUBEGINTRIM 3G
- .SH NAME
- .B "gluBeginTrim, gluEndTrim
- \- delimit a NURBS trimming loop definition
- .SH C SPECIFICATION
- void \f3gluBeginTrim\fP(
- GLUnurbs* \fInurb\fP )
- .nf
- .fi
- void \f3gluEndTrim\fP(
- GLUnurbs* \fInurb\fP )
- .nf
- .fi
- .EQ
- delim $$
- .EN
- .SH PARAMETERS
- .TP \w'\f2nurb\fP\ \ 'u
- \f2nurb\fP
- Specifies the NURBS object (created with \%\f3gluNewNurbsRenderer\fP).
- .SH DESCRIPTION
- Use \%\f3gluBeginTrim\fP to mark the beginning of a
- trimming loop, and \%\f3gluEndTrim\fP 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 \%\f3gluBeginSurface\fP and \%\f3gluEndSurface\fP.
- .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
- \%\f3gluBeginTrim\fP/\%\f3gluEndTrim\fP pair.
- .P
- The definition of a single closed trimming loop can consist
- of multiple curve segments, each described as a piecewise
- linear curve (see \%\f3gluPwlCurve\fP) or as a single NURBS
- curve (see \%\f3gluNurbsCurve\fP), 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 \%\f3gluBeginTrim\fP and \%\f3gluEndTrim\fP) are
- \%\f3gluPwlCurve\fP and \%\f3gluNurbsCurve\fP.
- .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 \%\f3gluNurbsCallback\fP).
- .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
- \%\f3gluBeginSurface(3G)\fP, \%\f3gluNewNurbsRenderer(3G)\fP, \%\f3gluNurbsCallback(3G)\fP,
- \%\f3gluNurbsCurve(3G)\fP, \%\f3gluPwlCurve(3G)\fP
|