gluNurbsProperty
NAME
gluNurbsProperty -- set a NURBS property
C SPECIFICATION
void gluNurbsProperty(GLUnurbsObj *nobj,
GLenum property,
GLfloat value)
PARAMETERS
- nobj
-
Specifies the NURBS object (created with
gluNewNurbsRenderer).
- property
-
Specifies the property to be set. Valid values are
GLU_AUTO_LOAD_MATRIX, GLU_CULLING, GLU_DISPLAY_MODE,
and GLU_SAMPLING_TOLERANCE.
- value
-
Specifies the value to which to set the indicated property.
DESCRIPTION
gluNurbsProperty is used to control properties stored in a NURBS object.
These properties affect the way that a NURBS curve is rendered. The legal
values for property are as follows:
- GLU_AUTO_LOAD_MATRIX
-
value is a Boolean value. When set to GL_TRUE, the NURBS code
downloads the projection matrix, the modelview matrix, and the viewport
from the OpenGL server to compute sampling and culling matrices for each
NURBS curve that is rendered. Sampling and culling matrices are required to
determine the tesselation of a NURBS surface into line segments or polygons
and to cull a NURBS surface if it lies outside of the viewport. If this
mode is set to GL_FALSE, then the user 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
gluLoadSamplingMatrices
function. The default for this mode is GL_TRUE. Changing this mode
from GL_TRUE to GL_FALSE does not affect the sampling and
culling matrices until
gluLoadSamplingMatrices
is called.
- GLU_CULLING
-
value is a Boolean value that, when set to GL_TRUE,
indicates that a NURBS curve should be discarded prior to tessellation if
its control points lie outside the current viewport. The default is
GL_FALSE (because a NURBS curve cannot fall entirely within the
convex hull of its control points).
- GLU_DISPLAY_MODE
-
value defines how a NURBS surface should be rendered. value
can be set to GLU_FILL, GLU_OUTLINE_POLYGON, or
GLU_OUTLINE_PATCH. When set to GLU_FILL, the surface is
rendered as a set of polygons. GLU_OUTLINE_POLYGON instructs the
NURBS library to draw only the outlines of the polygons created by
tessellation. GLU_OUTLINE_PATCH causes just the outlines of patches
and trim curves defined by the user to be drawn. The default value is
GLU_FILL.
- GLU_SAMPLING_TOLERANCE
-
Specifies the maximum length, in pixels to use when the sampling method is
set to GLU_PATH_LENGTH. The NURBS code is conservative when rendering
a curve or surface, so the actual length can be somewhat shorter. The
default value is 50.0 pixels.
SEE ALSO
gluGetNurbsProperty,
gluLoadSamplingMatrices,
gluNewNurbsRenderer
back to the OpenGL index page
© 1995 Uwe Behrens All rights reserved