Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ glunurbsproperty(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



gluNurbsProperty(3G)           OpenGL Reference           gluNurbsProperty(3G)



NAME
     gluNurbsProperty - set a NURBS property


C SPECIFICATION
     void gluNurbsProperty( GLUnurbs* nurb,
                            GLenum property,
                            GLfloat value )


PARAMETERS
     nurb      Specifies the NURBS object (created with gluNewNurbsRenderer).

     property  Specifies the property to be set. Valid values are
               GLUSAMPLINGTOLERANCE, GLUDISPLAYMODE, GLUCULLING,
               GLUAUTOLOADMATRIX, GLUPARAMETRICTOLERANCE,
               GLUSAMPLINGMETHOD, GLUUSTEP, GLUVSTEP, or
               GLUNURBSMODEEXT.

     value     Specifies the value of the indicated property.  It may be a
               numeric value, or one of GLUOUTLINEPOLYGON, GLUFILL,
               GLUOUTLINEPATCH, GLTRUE, GLFALSE, GLUPATHLENGTH,
               GLUPARAMETRICERROR, GLUDOMAINDISTANCE,
               GLUNURBSRENDEREREXT, or GLUNURBSTESSELLATOREXT.

DESCRIPTION
     gluNurbsProperty 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 property are as follows:

     GLUNURBSMODEEXT
                    value should be set to be either GLUNURBSRENDEREREXT or
                    GLUNURBSTESSELLATOREXT. When set to
                    GLUNURBSRENDEREREXT, NURBS objects are tessellated into
                    openGL primitives and sent to the pipeline for rendering.
                    When set to GLUNURBSTESSELLATOREXT, NURBS objects are
                    tessellated into openGL primitives but the vertices,
                    normals, colors, and/or textures are retrieved back
                    through a callback interface (see gluNurbsCallback). This
                    allows the user to cache the tessellated results for
                    further processing.

     GLUSAMPLINGMETHOD
                    Specifies how a NURBS surface should be tessellated.
                    value may be one of GLUPATHLENGTH, GLUPARAMETRICERROR,
                    GLUDOMAINDISTANCE, GLUOBJECTPATHLENGTHEXT, or
                    GLUOBJECTPARAMETRICERROREXT.  When set to
                    GLUPATHLENGTH, 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 GLUSAMPLINGTOLERANCE.




                                                                        Page 1





gluNurbsProperty(3G)           OpenGL Reference           gluNurbsProperty(3G)



                    GLUPARAMETRICERROR specifies that the surface is
                    rendered in such a way that the value specified by
                    GLUPARAMETRICTOLERANCE describes the maximum distance,
                    in pixels, between the tessellation polygons and the
                    surfaces they approximate.

                    GLUDOMAINDISTANCE allows users to specify, in parametric
                    coordinates, how many sample points per unit length are
                    taken in u, v direction.

                    GLUOBJECTPATHLENGTHEXT  is similar to GLUPATHLENGTH
                    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 GLUSAMPLINGTOLERANCE.

                    GLUOBJECTPARAMETRICERROREXT is similar to
                    GLUPARAMETRICERROR except that it is view independent,
                    that is, the surface is rendered in such a way that the
                    value specified by GLUPARAMETRICTOLERANCE describes the
                    maximum distance, in object space, between the
                    tessellation polygons and the surfaces they approximate.

                    The initial value of GLUSAMPLINGMETHOD is
                    GLUPATHLENGTH.

     GLUSAMPLINGTOLERANCE
                    Specifies the maximum length, in pixels or in object space
                    length unit, to use when the sampling method is set to
                    GLUPATHLENGTH or GLUOBJECTPATHLENGTHEXT.  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.

     GLUPARAMETRICTOLERANCE
                    Specifies the maximum distance, in pixels or in object
                    space length unit, to use when the sampling method is
                    GLUPARAMETRICERROR or GLUOBJECTPARAMETRICERROREXT.
                    The initial value is 0.5.

     GLUUSTEP     Specifies the number of sample points per unit length
                    taken along the u axis in parametric coordinates. It is
                    needed when GLUSAMPLINGMETHOD is set to
                    GLUDOMAINDISTANCE.  The initial value is 100.

     GLUVSTEP     Specifies the number of sample points per unit length
                    taken along the v axis in parametric coordinate. It is
                    needed when GLUSAMPLINGMETHOD is set to
                    GLUDOMAINDISTANCE. The initial value is 100.






                                                                        Page 2





gluNurbsProperty(3G)           OpenGL Reference           gluNurbsProperty(3G)



     GLUDISPLAYMODE
                    value can be set to GLUOUTLINEPOLYGON, GLUFILL, or
                    GLUOUTLINEPATCH.  When GLUNURBSMODEEXT is set to be
                    GLUNURBSRENDEREREXT, value defines how a NURBS surface
                    should be rendered.  When value is set to GLUFILL, the
                    surface is rendered as a set of polygons. When value is
                    set to GLUOUTLINEPOLYGON, the NURBS library draws only
                    the outlines of the polygons created by tessellation. When
                    value is set to GLUOUTLINEPATCH just the outlines of
                    patches and trim curves defined by the user are drawn.

                    When GLUNURBSMODEEXT is set to be
                    GLUNURBSTESSELLATOREXT, value defines how a NURBS
                    surface should be tessellated.  When GLUDISPLAYMODE is
                    set to GLUFILL or GLUOUTLINEPOLY, the NURBS surface is
                    tessellated into openGL triangle primitives which can be
                    retrieved back  through callback functions. If
                    GLUDISPLAYMODE is set to GLUOUTLINEPATCH, 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 GLUFILL.

     GLUCULLING    value is a boolean value that, when set to GLTRUE,
                    indicates that a NURBS curve should be discarded prior to
                    tessellation if its control points lie outside the current
                    viewport. The initial value is GLFALSE.

     GLUAUTOLOADMATRIX
                    value is a boolean value. When set to GLTRUE, 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 GLFALSE, 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
                    gluLoadSamplingMatrices function.  This mode is initially
                    set to GLTRUE.  Changing it from GLTRUE to GLFALSE does
                    not affect the sampling and culling matrices until
                    gluLoadSamplingMatrices is called.

NOTES
     If GLUAUTOLOADMATRIX is true, sampling and culling may be executed
     incorrectly if NURBS routines are compiled into a display list.




                                                                        Page 3





gluNurbsProperty(3G)           OpenGL Reference           gluNurbsProperty(3G)



     A property of GLUPARAMETRICTOLERANCE, GLUSAMPLINGMETHOD, GLUUSTEP,
     or GLUVSTEP, or a value of GLUPATHLENGTH, GLUPARAMETRICERROR,
     GLUDOMAINDISTANCE are only available if the GLU version is 1.1 or
     greater. They are not valid parameters in GLU 1.0.

     gluGetString can be used to determine the GLU version.

SEE ALSO
     gluGetNurbsProperty, gluLoadSamplingMatrices, gluNewNurbsRenderer,
     gluGetString, gluNurbsCallback













































                                                                        Page 4



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026