[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
OpenGL 1.2 for AIX: Reference Manual

gluPwlCurve Subroutine

Purpose

Defines a piecewise linear non-uniform rational B-spline (NURBS) trimming curve.

Library

OpenGL C bindings library: libGL.a

C Syntax

void gluPwlCurve(GLUnurbs * nurb, 
   GLint count, 
   GLfloat* data, 
   GLint stride, 
   GLenum type)

Description

The gluPwlCurve subroutine describes a piecewise linear trimming curve for a NURBS surface. A piecewise linear curve consists of a list of coordinates of points in the parameter space for the NURBS surface to be trimmed. These points are connected with line segments to form a curve. If the curve is an approximation of a curve that is not piecewise linear, the points should be close enough in parameter space that the resulting path appears curved at the resolution used in the application.

A value of GLU_MAP1_TRIM_2 assigned for the type parameter describes a curve in 2-dimensional (2D) (u and v) parameter space; GLU_MAP1_TRIM_3 describes a curve in 2D homogeneous (u, v, and w) parameter space. (See the gluBeginTrim subroutine for more information on trimming curves.)

Note: to describe a trim curve that closely follows the contours of a NURBS surface, call gluNurbsCurb.

Parameters

nurb Specifies the NURBS object created with the gluNewNurbsRenderer subroutine.
count Specifies the number of points on the curve.
data Specifies an array containing the curve points.
stride Specifies the offset (a number of single-precision floating-point values) between points on the curve.
type Specifies the curve type. The valid types are GLU_MAP1_TRIM_2 and GLU_MAP1_TRIM_3.

Files

/usr/include/GL/gl.h Contains C language constraints, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The gluBeginCurve subroutine, gluBeginTrim subroutine, gluNewNurbsRenderer subroutine, gluNurbsCurve subroutine.

OpenGL Overview.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]