1GLUNURBSPROPERTY(3G) GLUNURBSPROPERTY(3G)
2
3
4
6 gluNurbsProperty - set a NURBS property
7
8
10 void gluNurbsProperty( GLUnurbs* nurb,
11 GLenum property,
12 GLfloat value )
13
14
16 nurb Specifies the NURBS object (created with
17 gluNewNurbsRenderer).
18
19 property Specifies the property to be set. Valid values are
20 GLU_SAMPLING_TOLERANCE, GLU_DISPLAY_MODE, GLU_CULLING,
21 GLU_AUTO_LOAD_MATRIX, GLU_PARAMETRIC_TOLERANCE,
22 GLU_SAMPLING_METHOD, GLU_U_STEP, GLU_V_STEP, or
23 GLU_NURBS_MODE.
24
25 value Specifies the value of the indicated property. It may be a
26 numeric value, or one of GLU_OUTLINE_POLYGON, GLU_FILL,
27 GLU_OUTLINE_PATCH, GL_TRUE, GL_FALSE, GLU_PATH_LENGTH,
28 GLU_PARAMETRIC_ERROR, GLU_DOMAIN_DISTANCE,
29 GLU_NURBS_RENDERER, or GLU_NURBS_TESSELLATOR.
30
32 gluNurbsProperty is used to control properties stored in a NURBS
33 object. These properties affect the way that a NURBS curve is rendered.
34 The accepted values for property are as follows:
35
36 GLU_NURBS_MODE value should be set to be either GLU_NURBS_RENDERER or
37 GLU_NURBS_TESSELLATOR. When set to GLU_NURBS_RENDERER,
38 NURBS objects are tessellated into OpenGL primitives and
39 sent to the pipeline for rendering. When set to
40 GLU_NURBS_TESSELLATOR, NURBS objects are tessellated
41 into OpenGL primitives but the vertices, normals, col‐
42 ors, and/or textures are retrieved back through a call‐
43 back interface (see gluNurbsCallback). This allows the
44 user to cache the tessellated results for further pro‐
45 cessing. The initial value is GLU_NURBS_RENDERER.
46
47 GLU_SAMPLING_METHOD
48 Specifies how a NURBS surface should be tessellated.
49 value may be one of GLU_PATH_LENGTH,
50 GLU_PARAMETRIC_ERROR, GLU_DOMAIN_DISTANCE,
51 GLU_OBJECT_PATH_LENGTH, or GLU_OBJECT_PARAMETRIC_ERROR.
52 When set to GLU_PATH_LENGTH, the surface is rendered so
53 that the maximum length, in pixels, of the edges of the
54 tessellation polygons is no greater than what is speci‐
55 fied by GLU_SAMPLING_TOLERANCE.
56
57 GLU_PARAMETRIC_ERROR specifies that the surface is ren‐
58 dered in such a way that the value specified by
59 GLU_PARAMETRIC_TOLERANCE describes the maximum distance,
60 in pixels, between the tessellation polygons and the
61 surfaces they approximate.
62
63 GLU_DOMAIN_DISTANCE allows users to specify, in paramet‐
64 ric coordinates, how many sample points per unit length
65 are taken in u, v direction.
66
67 GLU_OBJECT_PATH_LENGTH is similar to GLU_PATH_LENGTH
68 except that it is view independent, that is, the surface
69 is rendered so that the maximum length, in object space,
70 of edges of the tessellation polygons is no greater than
71 what is specified by GLU_SAMPLING_TOLERANCE.
72
73 GLU_OBJECT_PARAMETRIC_ERROR is similar to
74 GLU_PARAMETRIC_ERROR except that it is view independent,
75 that is, the surface is rendered in such a way that the
76 value specified by GLU_PARAMETRIC_TOLERANCE describes
77 the maximum distance, in object space, between the tes‐
78 sellation polygons and the surfaces they approximate.
79
80 The initial value of GLU_SAMPLING_METHOD is
81 GLU_PATH_LENGTH.
82
83 GLU_SAMPLING_TOLERANCE
84 Specifies the maximum length, in pixels or in object
85 space length unit, to use when the sampling method is
86 set to GLU_PATH_LENGTH or GLU_OBJECT_PATH_LENGTH. The
87 NURBS code is conservative when rendering a curve or
88 surface, so the actual length can be somewhat shorter.
89 The initial value is 50.0 pixels.
90
91 GLU_PARAMETRIC_TOLERANCE
92 Specifies the maximum distance, in pixels or in object
93 space length unit, to use when the sampling method is
94 GLU_PARAMETRIC_ERROR or GLU_OBJECT_PARAMETRIC_ERROR.
95 The initial value is 0.5.
96
97 GLU_U_STEP Specifies the number of sample points per unit length
98 taken along the u axis in parametric coordinates. It is
99 needed when GLU_SAMPLING_METHOD is set to
100 GLU_DOMAIN_DISTANCE. The initial value is 100.
101
102 GLU_V_STEP Specifies the number of sample points per unit length
103 taken along the v axis in parametric coordinate. It is
104 needed when GLU_SAMPLING_METHOD is set to
105 GLU_DOMAIN_DISTANCE. The initial value is 100.
106
107 GLU_DISPLAY_MODE
108 value can be set to GLU_OUTLINE_POLYGON, GLU_FILL, or
109 GLU_OUTLINE_PATCH. When GLU_NURBS_MODE is set to be
110 GLU_NURBS_RENDERER, value defines how a NURBS surface
111 should be rendered. When value is set to GLU_FILL, the
112 surface is rendered as a set of polygons. When value is
113 set to GLU_OUTLINE_POLYGON, the NURBS library draws only
114 the outlines of the polygons created by tessellation.
115 When value is set to GLU_OUTLINE_PATCH just the outlines
116 of patches and trim curves defined by the user are
117 drawn.
118
119 When GLU_NURBS_MODE is set to be GLU_NURBS_TESSELLATOR,
120 value defines how a NURBS surface should be tessellated.
121 When GLU_DISPLAY_MODE is set to GLU_FILL or
122 GLU_OUTLINE_POLYGON, the NURBS surface is tessellated
123 into OpenGL triangle primitives which can be retrieved
124 back through callback functions. If GLU_DISPLAY_MODE is
125 set to GLU_OUTLINE_PATCH, only the outlines of the
126 patches and trim curves are generated as a sequence of
127 line strips which can be retrieved back through callback
128 functions.
129
130 The initial value is GLU_FILL.
131
132 GLU_CULLING value is a boolean value that, when set to GL_TRUE,
133 indicates that a NURBS curve should be discarded prior
134 to tessellation if its control points lie outside the
135 current viewport. The initial value is GL_FALSE.
136
137 GLU_AUTO_LOAD_MATRIX
138 value is a boolean value. When set to GL_TRUE, the NURBS
139 code downloads the projection matrix, the modelview
140 matrix, and the viewport from the GL server to compute
141 sampling and culling matrices for each NURBS curve that
142 is rendered. Sampling and culling matrices are required
143 to determine the tessellation of a NURBS surface into
144 line segments or polygons and to cull a NURBS surface if
145 it lies outside the viewport.
146
147 If this mode is set to GL_FALSE, then the program needs
148 to provide a projection matrix, a modelview matrix, and
149 a viewport for the NURBS renderer to use to construct
150 sampling and culling matrices. This can be done with
151 the gluLoadSamplingMatrices function. This mode is ini‐
152 tially set to GL_TRUE. Changing it from GL_TRUE to
153 GL_FALSE does not affect the sampling and culling matri‐
154 ces until gluLoadSamplingMatrices is called.
155
157 If GLU_AUTO_LOAD_MATRIX is true, sampling and culling may be executed
158 incorrectly if NURBS routines are compiled into a display list.
159
160 A property of GLU_PARAMETRIC_TOLERANCE, GLU_SAMPLING_METHOD,
161 GLU_U_STEP, or GLU_V_STEP, or a value of GLU_PATH_LENGTH,
162 GLU_PARAMETRIC_ERROR, GLU_DOMAIN_DISTANCE are only available if the GLU
163 version is 1.1 or greater. They are not valid parameters in GLU 1.0.
164
165 gluGetString can be used to determine the GLU version.
166
167 GLU_NURBS_MODE is only availble if the GLU version is 1.3 or greater.
168
169 The GLU_OBJECT_PATH_LENGTH and GLU_OBJECT_PARAMETRIC_ERROR values for
170 the GLU_SAMPLING_METHOD property are only available if the GLU version
171 is 1.3 or greater.
172
174 gluGetNurbsProperty(3G), gluLoadSamplingMatrices(3G),
175 gluNewNurbsRenderer(3G), gluGetString(3G), gluNurbsCallback(3G)
176
177
178
179 GLUNURBSPROPERTY(3G)