[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPNBC3 - Non-Uniform B-Spline Curve 3

GPNBC3 (order, npoint, knot, tflags, tdata, cflags, cwidth, ctlpts, tmin, tmax)

Purpose

Use GPNBC3 to insert a Non-Uniform B-Spline Curve 3 structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Non-Uniform B-Spline Curve 3 structure element depending on the current edit mode.

During structure traversal, the graPHIGS API uses the specified coefficients to generate a a non-uniform B-spline curve of the specified order. The graPHIGS API draws the curve only over the parameter range specified.

Polyline attributes are applied to this primitive.

GPNBC3 is identified as GDP 1033.

Note:

Not all GDPs are supported on all workstations. Use the Inquire List of Generalized Drawing Primitives (GPQGD) subroutine to determine the GDPs supported by an opened workstation. See also the workstation description in The graPHIGS Programming Interface: Technical Reference

Parameters

order -- specified by user, fullword integer

Curve order (>=2)

npoint -- specified by user, fullword integer

Number of control points (>= order)

knot -- specified by user, array of short floating-point numbers

Knot Vector. This array must contain order+npoint floating-point numbers representing a non-decreasing sequence of knot values in the parametric space.

tflags -- specified by user, fullword integer

Tessellation quality value flags. This parameter shows whether the tessellation quality value is specified or not in the tdata parameter.

Value

Meaning

0

Not specified.

1

Specified.

tdata -- specified by user, array of short floating-point numbers

Array of tessellation quality values. When the tflags parameter is 1, this array must contain npoint- order+1 tessellation quality values. These values are used in conjunction with Curve Approximation Criteria method 8 to control the number of line segments that are generated for each curve span. The number of line segments generated for this span is approximately the product of this value and the Curve Approximation Criteria control value in the traversal state list.

cflags -- specified by user, fullword integer

Control point optional data flags. This parameter shows what data is specified for each control point. The value specified should be the sum of the following values based on the fields that are specified in the ctlpts parameter:

Value

Meaning

0

Control point coordinates.

1

Weight for each control point. This produces the rational form of the Non-Uniform B-Spline Curve.

cwidth -- specified by user, fullword integer

Number of words between subsequent entries of the ctlpts parameter.

ctlpts -- specified by user, array of short floating-point numbers (MC)

Control point data. This array must contain npoint entries. The minimum required width and content of each entry depends on the value of parameters cflags The fields must be specified in the order defined below and no space is allowed between those that are present.

Control point coordinates -- 3 short floating-point numbers

This field must always present. Therefore, the cwidth parameter must be at least three.

Weight -- 1 short floating-point number

Each weight W must be greater than zero when specified. If this field is specified, the cwidth parameter must be at least four.

Note: When W is specified, the control points are not in homogeneous form (i.e.,XW, YW, ZW, W) They are specified after division by W or (X, Y, Z, W)

tmin -- specified by user, short floating-point number

The minimum parameter value at which the curve is evaluated. The curve is evaluated at parameter values between tmin and tmax inclusive. This value must be greater than or equal to the value of knot order

tmax -- specified by user, short floating-point number

The maximum parameter value at which the curve is evaluated. The curve is evaluated at parameter values between tmin and tmax inclusive. This value must be less than or equal to the value of knot npoint+1.

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
341
ORDER OF BASIS FUNCTION < TWO
342
ORDER IS GREATER THAN NUMBER OF CONTROL POINTS
343
KNOT VECTOR IS INVALID
345
WEIGHT IN CONTROL POINT IS <= ZERO
347
PARAMETER LIMITS ARE OUTSIDE VALID PARAMETER RANGE
348
MINIMUM PARAMETER LIMIT > MAXIMUM
351
OPTIONAL DATA AVAILABILITY FLAG IS INVALID
362
TESSELLATION CONTROL VALUE IS INVALID
557
WIDTH PARAMETER < MINIMUM ALLOWED

Related Subroutines

GPCAC
Set Curve Approximation Criteria
GPLT
Set Linetype
GPLWSC
Set Linewidth Scale Factor
GPPLCD
Set Polyline Color Direct
GPPLCI
Set Polyline Color Index
GPPLET
Set Polyline End Type
GPPLI
Set Polyline Index
GPQCDF
Inquire Curve Display Facilities

RCP code

201341953 (X'0C003C01')


[ Previous | Next | Contents | Glossary | Home | Search ]