Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glunurbscurve(3g) [centos man page]

GLUNURBSCURVE(3G)						   OpenGL Manual						 GLUNURBSCURVE(3G)

NAME
gluNurbsCurve - define the shape of a NURBS curve C SPECIFICATION
void gluNurbsCurve(GLUnurbs* nurb, GLint knotCount, GLfloat * knots, GLint stride, GLfloat * control, GLint order, GLenum type); PARAMETERS
nurb Specifies the NURBS object (created with gluNewNurbsRenderer()). knotCount Specifies the number of knots in knots. knotCount equals the number of control points plus the order. knots Specifies an array of knotCount nondecreasing knot values. stride Specifies the offset (as a number of single-precision floating-point values) between successive curve control points. control Specifies a pointer to an array of control points. The coordinates must agree with type, specified below. order Specifies the order of the NURBS curve. order equals degree + 1, hence a cubic curve has an order of 4. type Specifies the type of the curve. If this curve is defined within a gluBeginCurve()/gluEndCurve() pair, then the type can be any of the valid one-dimensional evaluator types (such as GLU_MAP1_VERTEX_3 or GLU_MAP1_COLOR_4). Between a gluBeginTrim()/gluEndTrim() pair, the only valid types are GLU_MAP1_TRIM_2 and GLU_MAP1_TRIM_3. DESCRIPTION
Use gluNurbsCurve to describe a NURBS curve. When gluNurbsCurve appears between a gluBeginCurve()/gluEndCurve() pair, it is used to describe a curve to be rendered. Positional, texture, and color coordinates are associated by presenting each as a separate gluNurbsCurve between a gluBeginCurve()/gluEndCurve() pair. No more than one call to gluNurbsCurve for each of color, position, and texture data can be made within a single gluBeginCurve()/gluEndCurve() pair. Exactly one call must be made to describe the position of the curve (a type of GLU_MAP1_VERTEX_3 or GLU_MAP1_VERTEX_4). When gluNurbsCurve appears between a gluBeginTrim()/gluEndTrim() pair, it is used to describe a trimming curve on a NURBS surface. If type is GLU_MAP1_TRIM_2, then it describes a curve in two-dimensional (u and v) parameter space. If it is GLU_MAP1_TRIM_3, then it describes a curve in two-dimensional homogeneous (u, v, and w) parameter space. See the gluBeginTrim() reference page for more discussion about trimming curves. EXAMPLE
The following commands render a textured NURBS curve with normals: gluBeginCurve(nobj); gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2); gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL); gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4); gluEndCurve(nobj); NOTES
To define trim curves that stitch well, use gluPwlCurve(). SEE ALSO
gluBeginCurve(), gluBeginTrim(), gluNewNurbsRenderer(), gluPwlCurve() COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. AUTHORS
opengl.org opengl.org 06/10/2014 GLUNURBSCURVE(3G)

Check Out this Related Man Page

GLUBEGINTRIM(3G)						   OpenGL Manual						  GLUBEGINTRIM(3G)

NAME
gluBeginTrim - delimit a NURBS trimming loop definition C SPECIFICATION
void gluBeginTrim(GLUnurbs* nurb); C SPECIFICATION
void gluEndTrim(GLUnurbs* nurb); PARAMETERS
nurb Specifies the NURBS object (created with gluNewNurbsRenderer()). DESCRIPTION
Use gluBeginTrim to mark the beginning of a trimming loop and gluEndTrim() to mark the end of a trimming loop. A trimming loop is a set of oriented curve segments (forming a closed curve) that define boundaries of a NURBS surface. You include these trimming loops in the definition of a NURBS surface, between calls to gluBeginSurface() and gluEndSurface(). The definition for a NURBS surface can contain many trimming loops. For example, if you wrote a definition for a NURBS surface that resembled a rectangle with a hole punched out, the definition would contain two trimming loops. One loop would define the outer edge of the rectangle; the other would define the hole punched out of the rectangle. The definitions of each of these trimming loops would be bracketed by a gluBeginTrim/gluEndTrim() pair. The definition of a single closed trimming loop can consist of multiple curve segments, each described as a piecewise linear curve (see gluPwlCurve()) or as a single NURBS curve (see gluNurbsCurve()), or as a combination of both in any order. The only library calls that can appear in a trimming loop definition (between the calls to gluBeginTrim and gluEndTrim()) are gluPwlCurve() and gluNurbsCurve(). The area of the NURBS surface that is displayed is the region in the domain to the left of the trimming curve as the curve parameter increases. Thus, the retained region of the NURBS surface is inside a counterclockwise trimming loop and outside a clockwise trimming loop. For the rectangle mentioned earlier, the trimming loop for the outer edge of the rectangle runs counterclockwise, while the trimming loop for the punched-out hole runs clockwise. If you use more than one curve to define a single trimming loop, the curve segments must form a closed loop (that is, the endpoint of each curve must be the starting point of the next curve, and the endpoint of the final curve must be the starting point of the first curve). If the endpoints of the curve are sufficiently close together but not exactly coincident, they will be coerced to match. If the endpoints are not sufficiently close, an error results (see gluNurbsCallback()). If a trimming loop definition contains multiple curves, the direction of the curves must be consistent (that is, the inside must be to the left of all of the curves). Nested trimming loops are legal as long as the curve orientations alternate correctly. If trimming curves are self-intersecting, or intersect one another, an error results. If no trimming information is given for a NURBS surface, the entire surface is drawn. EXAMPLE
This code fragment defines a trimming loop that consists of one piecewise linear curve, and two NURBS curves: gluBeginTrim(nobj); gluPwlCurve(..., GLU_MAP1_TRIM_2); gluNurbsCurve(..., GLU_MAP1_TRIM_2); gluNurbsCurve(..., GLU_MAP1_TRIM_3); gluEndTrim(nobj); SEE ALSO
gluBeginSurface(), gluNewNurbsRenderer(), gluNurbsCallback(), gluNurbsCurve(), gluPwlCurve() COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. AUTHORS
opengl.org opengl.org 06/10/2014 GLUBEGINTRIM(3G)
Man Page