nurbscurve.3gl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 nurbscurv
  9. .ds Xs 25594 5 nurbscurve.gl
  10. .TH GLUNURBSCURVE 3G
  11. .SH NAME
  12. .B "gluNurbsCurve
  13. \- define the shape of a NURBS curve
  14. .SH C SPECIFICATION
  15. void \f3gluNurbsCurve\fP(
  16. GLUnurbs* \fInurb\fP,
  17. .nf
  18. .ta \w'\f3void \fPgluNurbsCurve( 'u
  19. GLint \fIknotCount\fP,
  20. GLfloat \fI*knots\fP,
  21. GLint \fIstride\fP,
  22. GLfloat \fI*control\fP,
  23. GLint \fIorder\fP,
  24. GLenum \fItype\fP )
  25. .fi
  26. .EQ
  27. delim $$
  28. .EN
  29. .SH PARAMETERS
  30. .TP \w'\fIknotCount\fP\ \ 'u
  31. \f2nurb\fP
  32. Specifies the NURBS object (created with \%\f3gluNewNurbsRenderer\fP).
  33. .TP
  34. \f2knotCount\fP
  35. Specifies the number of knots in \f2knots\fP.
  36. \f2knotCount\fP equals the number of control points plus the order.
  37. .TP
  38. \f2knots\fP
  39. Specifies an array of \f2knotCount\fP nondecreasing knot values.
  40. .TP
  41. \f2stride\fP
  42. Specifies the offset (as a number of single-precision floating-point values)
  43. between successive curve control points.
  44. .TP
  45. \f2control\fP
  46. Specifies a pointer to an array of control points. The coordinates must
  47. agree with \f2type\fP, specified below.
  48. .TP
  49. \f2order\fP
  50. Specifies the order of the NURBS curve. \f2order\fP equals degree + 1, hence
  51. a cubic curve has an order of 4.
  52. .TP
  53. \f2type\fP
  54. Specifies the type of the curve. If this curve is defined within a
  55. \%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP pair, then
  56. the type can be any of the valid
  57. one-dimensional evaluator types (such as \%\f3GL_MAP1_VERTEX_3\fP or
  58. \%\f3GL_MAP1_COLOR_4\fP). Between a \%\f3gluBeginTrim\fP/\%\f3gluEndTrim\fP pair,
  59. the only valid types are \%\f3GLU_MAP1_TRIM_2\fP and \%\f3GLU_MAP1_TRIM_3\fP.
  60. .SH DESCRIPTION
  61. Use \%\f3gluNurbsCurve\fP to describe a NURBS curve.
  62. .P
  63. When \%\f3gluNurbsCurve\fP appears between a \%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP pair, it is
  64. used to describe a curve to be rendered.
  65. Positional, texture, and color coordinates are associated
  66. by presenting each as a separate \%\f3gluNurbsCurve\fP between a
  67. \%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP pair. No more than
  68. one call to \%\f3gluNurbsCurve\fP for each of color, position, and texture
  69. data can be made within a single \%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP
  70. pair. Exactly one call must be made to describe the position of the
  71. curve (a \f2type\fP of \%\f3GL_MAP1_VERTEX_3\fP or \%\f3GL_MAP1_VERTEX_4\fP).
  72. .P
  73. When \%\f3gluNurbsCurve\fP appears between a \%\f3gluBeginTrim\fP/\%\f3gluEndTrim\fP pair, it is
  74. used to describe a trimming curve on a NURBS surface. If \f2type\fP is
  75. \%\f3GLU_MAP1_TRIM_2\fP, then it describes a curve in two-dimensional (\f2u\fP
  76. and \f2v\fP)
  77. parameter space. If it is \%\f3GLU_MAP1_TRIM_3\fP, then it describes a
  78. curve in two-dimensional homogeneous (\f2u\fP, \f2v\fP, and \f2w\fP)
  79. parameter space.
  80. See the \%\f3gluBeginTrim\fP reference page for more discussion about trimming
  81. curves.
  82. .SH EXAMPLE
  83. The following commands render a textured NURBS curve with normals:
  84. .sp
  85. .Ex
  86. gluBeginCurve(nobj);
  87. gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
  88. gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL);
  89. gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4);
  90. gluEndCurve(nobj);
  91. .Ee
  92. .sp
  93. .SH NOTES
  94. To define trim curves which stitch well, use \%\f3gluPwlCurve\fP.
  95. .SH SEE ALSO
  96. \%\f3gluBeginCurve(3G)\fP, \%\f3gluBeginTrim(3G)\fP, \%\f3gluNewNurbsRenderer(3G)\fP, \%\f3gluPwlCurve(3G)\fP