begintrim.3gl 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. '\" e
  2. '\"! eqn | mmdoc
  3. '\"macro stdmacro
  4. .ds Vn Version 1.2
  5. .ds Dt 6 March 1997
  6. .ds Re Release 1.2.0
  7. .ds Dp May 02 11:53
  8. .ds Dm 37 begintrim
  9. .ds Xs 15822 6 begintrim.gl
  10. .TH GLUBEGINTRIM 3G
  11. .SH NAME
  12. .B "gluBeginTrim, gluEndTrim
  13. \- delimit a NURBS trimming loop definition
  14. .SH C SPECIFICATION
  15. void \f3gluBeginTrim\fP(
  16. GLUnurbs* \fInurb\fP )
  17. .nf
  18. .fi
  19. void \f3gluEndTrim\fP(
  20. GLUnurbs* \fInurb\fP )
  21. .nf
  22. .fi
  23. .EQ
  24. delim $$
  25. .EN
  26. .SH PARAMETERS
  27. .TP \w'\f2nurb\fP\ \ 'u
  28. \f2nurb\fP
  29. Specifies the NURBS object (created with \%\f3gluNewNurbsRenderer\fP).
  30. .SH DESCRIPTION
  31. Use \%\f3gluBeginTrim\fP to mark the beginning of a
  32. trimming loop, and \%\f3gluEndTrim\fP to mark the end
  33. of a trimming loop. A trimming loop is
  34. a set of oriented curve segments (forming a closed curve) that
  35. define boundaries of a NURBS surface. You include these
  36. trimming loops in the definition of a NURBS
  37. surface, between calls to \%\f3gluBeginSurface\fP and \%\f3gluEndSurface\fP.
  38. .P
  39. The definition for a NURBS surface can contain many
  40. trimming loops. For example, if you wrote a definition
  41. for a NURBS surface that resembled a rectangle with
  42. a hole punched out, the definition would contain two
  43. trimming loops. One loop would define the outer edge
  44. of the rectangle; the other would define
  45. the hole punched out of the rectangle. The definitions
  46. of each of these trimming loops would be bracketed by a
  47. \%\f3gluBeginTrim\fP/\%\f3gluEndTrim\fP pair.
  48. .P
  49. The definition of a single closed trimming loop can consist
  50. of multiple curve segments, each described as a piecewise
  51. linear curve (see \%\f3gluPwlCurve\fP) or as a single NURBS
  52. curve (see \%\f3gluNurbsCurve\fP), or as a combination of
  53. both in any order. The only library calls that can
  54. appear in a trimming loop definition (between the calls
  55. to \%\f3gluBeginTrim\fP and \%\f3gluEndTrim\fP) are
  56. \%\f3gluPwlCurve\fP and \%\f3gluNurbsCurve\fP.
  57. .P
  58. The area of the NURBS surface that is displayed is the
  59. region in the domain to the left of the trimming curve
  60. as the curve parameter increases. Thus, the retained
  61. region of the NURBS surface is inside a
  62. counterclockwise trimming loop and outside a clockwise
  63. trimming loop. For the rectangle mentioned earlier,
  64. the trimming loop for the outer edge of the rectangle runs
  65. counterclockwise, while the trimming loop for the punched-out hole
  66. runs clockwise.
  67. .P
  68. If you use more than one curve to define a single trimming
  69. loop, the curve segments must form a closed loop (that is,
  70. the endpoint of each curve must be the starting point of the
  71. next curve, and the endpoint of the final curve must
  72. be the starting point of the first curve). If the
  73. endpoints of the curve are sufficiently close together
  74. but not exactly coincident, they will be coerced to match.
  75. If the endpoints are not sufficiently close, an error results
  76. (see \%\f3gluNurbsCallback\fP).
  77. .P
  78. If a trimming loop definition contains multiple curves,
  79. the direction of the curves must be consistent (that is, the
  80. inside must be to the left of all of the curves). Nested
  81. trimming loops are legal as long as the curve orientations
  82. alternate correctly.
  83. If trimming curves are self-intersecting,
  84. or intersect one another, an error results.
  85. .P
  86. If no trimming information is given
  87. for a NURBS surface, the entire surface is drawn.
  88. .SH EXAMPLE
  89. This code fragment defines a trimming loop that consists of one
  90. piecewise linear curve, and two NURBS curves:
  91. .sp
  92. .Ex
  93. gluBeginTrim(nobj);
  94. gluPwlCurve(..., GLU_MAP1_TRIM_2);
  95. gluNurbsCurve(..., GLU_MAP1_TRIM_2);
  96. gluNurbsCurve(..., GLU_MAP1_TRIM_3);
  97. gluEndTrim(nobj);
  98. .Ee
  99. .SH SEE ALSO
  100. \%\f3gluBeginSurface(3G)\fP, \%\f3gluNewNurbsRenderer(3G)\fP, \%\f3gluNurbsCallback(3G)\fP,
  101. \%\f3gluNurbsCurve(3G)\fP, \%\f3gluPwlCurve(3G)\fP