NAME
gluNurbsProperty
- set a NURBS property
C SPECIFICATION
void gglluuNNuurrbbssPPrrooppeerrttyy(
GLUnurbs* _n_u_r_b,
GLenum _p_r_o_p_e_r_t_y,
GLfloat _v_a_l_u_e )
delim $$
PARAMETERS
-
_n_u_r_b
-
Specifies the NURBS object (created with gglluuNNeewwNNuurrbbssRReennddeerreerr).
-
_p_r_o_p_e_r_t_y
-
Specifies the property to be set. Valid values are
GGLLUU__SSAAMMPPLLIINNGG__TTOOLLEERRAANNCCEE,
GGLLUU__DDIISSPPLLAAYY__MMOODDEE,
GGLLUU__CCUULLLLIINNGG,
GGLLUU__AAUUTTOO__LLOOAADD__MMAATTRRIIXX,
GGLLUU__PPAARRAAMMEETTRRIICC__TTOOLLEERRAANNCCEE,
GGLLUU__SSAAMMPPLLIINNGG__MMEETTHHOODD,
GGLLUU__UU__SSTTEEPP,
GGLLUU__VV__SSTTEEPP, or
GGLLUU__NNUURRBBSS__MMOODDEE.
-
_v_a_l_u_e
-
Specifies the value of the indicated property.
It may be a numeric value, or one of
GGLLUU__OOUUTTLLIINNEE__PPOOLLYYGGOONN,
GGLLUU__FFIILLLL,
GGLLUU__OOUUTTLLIINNEE__PPAATTCCHH,
GGLL__TTRRUUEE,
GGLL__FFAALLSSEE,
GGLLUU__PPAATTHH__LLEENNGGTTHH,
GGLLUU__PPAARRAAMMEETTRRIICC__EERRRROORR,
GGLLUU__DDOOMMAAIINN__DDIISSTTAANNCCEE,
GGLLUU__NNUURRBBSS__RREENNDDEERREERR, or
GGLLUU__NNUURRBBSS__TTEESSSSEELLLLAATTOORR.
DESCRIPTION
gglluuNNuurrbbssPPrrooppeerrttyy is used to control properties stored in a NURBS object. These
properties affect the way that a NURBS curve is rendered. The accepted
values for _p_r_o_p_e_r_t_y are as follows:
-
GGLLUU__NNUURRBBSS__MMOODDEE
-
_v_a_l_u_e should be set to be either GGLLUU__NNUURRBBSS__RREENNDDEERREERR or
GGLLUU__NNUURRBBSS__TTEESSSSEELLLLAATTOORR. When set to GGLLUU__NNUURRBBSS__RREENNDDEERREERR, NURBS objects
are tessellated into OpenGL primitives and sent to the pipeline for
rendering. When set to GGLLUU__NNUURRBBSS__TTEESSSSEELLLLAATTOORR, NURBS objects are
tessellated into OpenGL primitives but the vertices, normals, colors, and/or textures are
retrieved back through a callback interface (see gglluuNNuurrbbssCCaallllbbaacckk). This allows the user to cache the
tessellated results for further processing.
The initial value is GGLLUU__NNUURRBBSS__RREENNDDEERREERR.
-
GGLLUU__SSAAMMPPLLIINNGG__MMEETTHHOODD
-
Specifies how a NURBS surface should be
tessellated.
_v_a_l_u_e may be one of GGLLUU__PPAATTHH__LLEENNGGTTHH,
GGLLUU__PPAARRAAMMEETTRRIICC__EERRRROORR, GGLLUU__DDOOMMAAIINN__DDIISSTTAANNCCEE,
GGLLUU__OOBBJJEECCTT__PPAATTHH__LLEENNGGTTHH, or
GGLLUU__OOBBJJEECCTT__PPAARRAAMMEETTRRIICC__EERRRROORR.
When set to GGLLUU__PPAATTHH__LLEENNGGTTHH, the surface is rendered so that
the maximum length, in
pixels, of the edges of the tessellation polygons is no greater than
what is specified by GGLLUU__SSAAMMPPLLIINNGG__TTOOLLEERRAANNCCEE.
-
GGLLUU__PPAARRAAMMEETTRRIICC__EERRRROORR specifies that the surface is rendered in such a
-
way that the value specified by GGLLUU__PPAARRAAMMEETTRRIICC__TTOOLLEERRAANNCCEE describes the
maximum distance, in pixels, between the tessellation polygons and the
surfaces they approximate.
-
GGLLUU__DDOOMMAAIINN__DDIISSTTAANNCCEE allows users to specify, in parametric coordinates,
-
how many sample points per unit length are taken in _u, _v
direction.
-
GGLLUU__OOBBJJEECCTT__PPAATTHH__LLEENNGGTTHH is similar to GGLLUU__PPAATTHH__LLEENNGGTTHH
-
except that it is view independent, that is, the surface is rendered so that the maximum length, in object space, of edges of the tessellation polygons is no greater than what is specified by GGLLUU__SSAAMMPPLLIINNGG__TTOOLLEERRAANNCCEE.
-
GGLLUU__OOBBJJEECCTT__PPAARRAAMMEETTRRIICC__EERRRROORR is similar to GGLLUU__PPAARRAAMMEETTRRIICC__EERRRROORR except that it is view independent, that is, the surface is rendered in such a way that the value specified by GGLLUU__PPAARRAAMMEETTRRIICC__TTOOLLEERRAANNCCEE describes the maximum distance, in object space, between the tessellation polygons and the surfaces they approximate.
-
-
The initial value of GGLLUU__SSAAMMPPLLIINNGG__MMEETTHHOODD is GGLLUU__PPAATTHH__LLEENNGGTTHH.
-
-
GGLLUU__SSAAMMPPLLIINNGG__TTOOLLEERRAANNCCEE
-
Specifies the maximum length, in pixels or in object space length unit,
to use when the sampling method is set to GGLLUU__PPAATTHH__LLEENNGGTTHH or
GGLLUU__OOBBJJEECCTT__PPAATTHH__LLEENNGGTTHH.
The NURBS code is conservative when rendering a curve
or surface, so the actual length can be somewhat shorter. The initial
value is 50.0 pixels.
-
GGLLUU__PPAARRAAMMEETTRRIICC__TTOOLLEERRAANNCCEE
-
Specifies the maximum distance, in pixels or in object space length unit,
to use when the sampling method is GGLLUU__PPAARRAAMMEETTRRIICC__EERRRROORR or
GGLLUU__OOBBJJEECCTT__PPAARRAAMMEETTRRIICC__EERRRROORR.
The initial value is 0.5.
-
GGLLUU__UU__SSTTEEPP
-
Specifies the number of sample points per unit length taken
along the _u axis in parametric coordinates. It is needed when
GGLLUU__SSAAMMPPLLIINNGG__MMEETTHHOODD is set to GGLLUU__DDOOMMAAIINN__DDIISSTTAANNCCEE.
The initial value is 100.
-
GGLLUU__VV__SSTTEEPP
-
Specifies the number of sample points per unit length taken
along the _v axis in parametric coordinate. It is needed when
GGLLUU__SSAAMMPPLLIINNGG__MMEETTHHOODD is set to GGLLUU__DDOOMMAAIINN__DDIISSTTAANNCCEE. The initial
value is 100.
-
GGLLUU__DDIISSPPLLAAYY__MMOODDEE
-
_v_a_l_u_e can be set to
GGLLUU__OOUUTTLLIINNEE__PPOOLLYYGGOONN, GGLLUU__FFIILLLL, or
GGLLUU__OOUUTTLLIINNEE__PPAATTCCHH.
When GGLLUU__NNUURRBBSS__MMOODDEE is set to be GGLLUU__NNUURRBBSS__RREENNDDEERREERR,
_v_a_l_u_e defines how a NURBS surface should be rendered.
When _v_a_l_u_e is set to GGLLUU__FFIILLLL, the surface is rendered as a
set of polygons. When _v_a_l_u_e is set to
GGLLUU__OOUUTTLLIINNEE__PPOOLLYYGGOONN, the NURBS library draws only the outlines
of the polygons created by tessellation. When _v_a_l_u_e is set to
GGLLUU__OOUUTTLLIINNEE__PPAATTCCHH just the outlines of patches and trim
curves defined by the user are drawn.
-
When GGLLUU__NNUURRBBSS__MMOODDEE is set to be GGLLUU__NNUURRBBSS__TTEESSSSEELLLLAATTOORR,
-
_v_a_l_u_e defines how a NURBS surface should be tessellated.
When GGLLUU__DDIISSPPLLAAYY__MMOODDEE is set to GGLLUU__FFIILLLL or
GGLLUU__OOUUTTLLIINNEE__PPOOLLYYGGOONN,
the NURBS surface is tessellated into OpenGL triangle primitives which can be
retrieved back through callback functions. If GGLLUU__DDIISSPPLLAAYY__MMOODDEE is set to
GGLLUU__OOUUTTLLIINNEE__PPAATTCCHH, only the outlines of the patches and trim curves are generated as a sequence of line strips which can be retrieved back through callback functions.
-
The initial value is GGLLUU__FFIILLLL.
-
-
GGLLUU__CCUULLLLIINNGG
-
_v_a_l_u_e is a boolean value that, when set to GGLL__TTRRUUEE, indicates that
a NURBS curve should be discarded prior to tessellation if its control points
lie outside the current viewport. The initial value is GGLL__FFAALLSSEE.
-
GGLLUU__AAUUTTOO__LLOOAADD__MMAATTRRIIXX
-
_v_a_l_u_e is a boolean value. When set to GGLL__TTRRUUEE, the NURBS code
downloads the projection matrix, the modelview matrix, and the
viewport from the GL server to compute sampling and
culling
matrices for each NURBS curve that is rendered. Sampling and culling matrices
are required to determine the tessellation of a NURBS surface into line segments
or polygons and to cull a NURBS surface if it lies outside the viewport.
-
If this mode is set to GGLL__FFAALLSSEE, then the program needs
-
to provide a projection matrix, a modelview matrix, and a viewport
for the NURBS renderer to use to construct sampling and culling matrices.
This can be done with the gglluuLLooaaddSSaammpplliinnggMMaattrriicceess function.
This mode is initially set to GGLL__TTRRUUEE.
Changing it from GGLL__TTRRUUEE to GGLL__FFAALLSSEE does not affect
the sampling and culling matrices until
gglluuLLooaaddSSaammpplliinnggMMaattrriicceess
is called.
NOTES
If GGLLUU__AAUUTTOO__LLOOAADD__MMAATTRRIIXX is true, sampling and culling may be
executed incorrectly if NURBS routines are compiled into a display list.
A _p_r_o_p_e_r_t_y of
GGLLUU__PPAARRAAMMEETTRRIICC__TTOOLLEERRAANNCCEE,
GGLLUU__SSAAMMPPLLIINNGG__MMEETTHHOODD,
GGLLUU__UU__SSTTEEPP, or
GGLLUU__VV__SSTTEEPP,
or a _v_a_l_u_e of
GGLLUU__PPAATTHH__LLEENNGGTTHH,
GGLLUU__PPAARRAAMMEETTRRIICC__EERRRROORR,
GGLLUU__DDOOMMAAIINN__DDIISSTTAANNCCEE
are only available if the GLU version is 1.1 or greater. They are not
valid parameters in GLU 1.0.
gglluuGGeettSSttrriinngg can
be used to determine the GLU version.
GGLLUU__NNUURRBBSS__MMOODDEE is only availble if the GLU version is 1.3 or
greater.
The GGLLUU__OOBBJJEECCTT__PPAATTHH__LLEENNGGTTHH and GGLLUU__OOBBJJEECCTT__PPAARRAAMMEETTRRIICC__EERRRROORR
values for the GGLLUU__SSAAMMPPLLIINNGG__MMEETTHHOODD property are only available if
the GLU version is 1.3 or greater.
SEE ALSO
gglluuGGeettNNuurrbbssPPrrooppeerrttyy((33GG)),
gglluuLLooaaddSSaammpplliinnggMMaattrriicceess((33GG)),
gglluuNNeewwNNuurrbbssRReennddeerreerr((33GG)),
gglluuGGeettSSttrriinngg((33GG)),
gglluuNNuurrbbssCCaallllbbaacckk((33GG))