MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
GLUNURBSPROPERTY(3G)                                      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,    GLUCULING,
                 GLUAUTOLOADMATRIX,               GLUPARAMETRICTOLERANCE,
                 GLUSAMPLINGMETHOD,      GLUSTEP,      GLUVSTEP,     or
                 GLUNURBSMODE.

       value     Specifies the value of the indicated property.  It may  be  a
                 numeric  value,  or  one  of  GLUOUTLINEPOLYGON,  GLUFIL,
                 GLUOUTLINEPATCH,   GLTRUE,   GLFALSE,    GLUPATHLENGTH,
                 GLUPARAMETRICEROR,                    GLUDOMAINDISTANCE,
                 GLUNURBSRENDERER, or GLUNURBSTESELATOR.

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:

       GLUNURBSMODE value should be set to be either  GLUNURBSRENDERER  or
                      GLUNURBSTESELATOR.  When  set to GLUNURBSRENDERER,
                      NURBS objects are tessellated into OpenGL primitives and
                      sent   to  the  pipeline  for  rendering.  When  set  to
                      GLUNURBSTESELATOR,  NURBS  objects  are  tessellated
                      into  OpenGL  primitives but the vertices, normals, col-
                      ors, and/or textures are retrieved back through a  call-
                      back  interface  (see gluNurbsCallback). This allows the
                      user to cache the tessellated results for  further  pro-
                      cessing.  The initial value is GLUNURBSRENDERER.

       GLUSAMPLINGMETHOD
                      Specifies  how  a  NURBS  surface should be tessellated.
                      value     may     be     one     of     GLUPATHLENGTH,
                      GLUPARAMETRICEROR,               GLUDOMAINDISTANCE,
                      GLUOBJECTPATHLENGTH, or  GLUOBJECTPARAMETRICEROR.
                      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 speci-
                      fied by GLUSAMPLINGTOLERANCE.

                      GLUPARAMETRICEROR specifies that the surface is  ren-
                      dered  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 paramet-
                      ric  coordinates, how many sample points per unit length
                      are taken in u, v direction.

                      GLUOBJECTPATHLENGTH  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.

                      GLUOBJECTPARAMETRICEROR      is      similar      to
                      GLUPARAMETRICEROR 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  tes-
                      sellation 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  GLUOBJECTPATHLENGTH.   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
                      GLUPARAMETRICEROR   or   GLUOBJECTPARAMETRICEROR.
                      The initial value is 0.5.

       GLUSTEP     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.

       GLUDISPLAYMODE
                      value can be set to  GLUOUTLINEPOLYGON,  GLUFIL,  or
                      GLUOUTLINEPATCH.   When  GLUNURBSMODE  is  set to be
                      GLUNURBSRENDERER, value defines how  a  NURBS  surface
                      should  be rendered.  When value is set to GLUFIL, 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  GLUNURBSMODE is set to be GLUNURBSTESELATOR,
                      value defines how a NURBS surface should be tessellated.
                      When    GLUDISPLAYMODE   is   set   to   GLUFIL   or
                      GLUOUTLINEPOLYGON, 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 GLUFIL.

       GLUCULING    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 gluLoadSamplingatrices function.  This mode is ini-
                      tially  set  to  GLTRUE.   Changing  it from GLTRUE to
                      GLFALSE does not affect the sampling and culling matri-
                      ces until gluLoadSamplingatrices is called.

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

       A   property    of    GLUPARAMETRICTOLERANCE,    GLUSAMPLINGMETHOD,
       GLUSTEP,   or   GLUVSTEP,   or   a   value   of   GLUPATHLENGTH,
       GLUPARAMETRICEROR, 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.

       GLUNURBSMODE is only availble if the GLU version is 1.3 or greater.

       The  GLUOBJECTPATHLENGTH  and GLUOBJECTPARAMETRICEROR values for
       the GLUSAMPLINGMETHOD property are only available if the GLU  version
       is 1.3 or greater.

SEE ALSO
       gluGetNurbsProperty,    gluLoadSamplingatrices,   gluNewNurbsRenderer,
       gluGetString, gluNurbsCallback



                                                          GLUNURBSPROPERTY(3G)
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™