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

GPNBS - Non-Uniform B-Spline Surface

GPNBS (uorder, vorder, unum, vnum, uknots, vknots, tflag, utdata, vtdata, cflags, cwidth, ctlpts, umin, umax, vmin, vmax)

Purpose

Use GPNBS to insert a Non-Uniform B-Spline Surface 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 Surface structure element depending on the current edit mode.

During structure traversal, the graPHIGS API uses the specified control points to generate a non-uniform parametric surface of the specified uorder and vorder The graPHIGS API renders only the portion of the surface within the parameter limits.

If the specified workstation does not support the requested orders for the basis functions of the surface, then this primitive does not generate any output.

The lines of constant parameter at the parameter limits of the surface are rendered as edges.

Polygon and surface attributes are applied to this primitive.

GPNBS is identified as GDP 1035.

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

uorder -- specified by user, fullword integer

Order of the basis functions for the u parameter (>=2)
vorder -- specified by user, fullword integer

Order of the basis functions for the v parameter (>=2)
unum -- specified by user, fullword integer

Number of surface control points for the u direction (>=uorder)
vnum -- specified by user, fullword integer

Number of surface control points for the v direction (>=vorder)
uknots -- specified by user, array of short floating-point numbers

Knot values for the u parameter. The length of this array must be uorder+ unum This parameter must be a non-decreasing knot value sequence.
vknots -- specified by user, array of short floating-point numbers

Knot values for the v parameter. The length of this array must be vorder+ vnum This parameter must be a non-decreasing knot value sequence.
tflag -- specified by user, fullword integer

Surface tessellation quality value flag. This parameter shows whether the tessellation quality values are specified or not.

0
Not specified.
1
Specified.
utdata -- specified by user, array of short floating-point numbers

Tessellation quality values for the u direction. When the tflag parameter is set to a value of one, this parameter must contain unum- uorder+1 quality values. These value are used in conjunction with Surface Approximation Criteria method 8 to control the number of sub-divisions made in the u direction. The number of sub-divisions that are performed for a patch is approximately the product of this value and the Surface Approximation Criteria control value (u) in the traversal state list.
vtdata -- specified by user, array of short floating-point numbers

Tessellation quality values for the v direction. When the tflag parameter is set to a value of one, this parameter must contain vnum- vorder+1 quality values. These value are used in conjunction with Surface Approximation Criteria method 8 to control the number of sub-divisions made in the v direction. The number of sub-divisions that are performed for a patch is approximately the product of this value and the Surface Approximation Criteria control value (v) 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
Weights are specified with each control point. This produces the rational form of the Non-Uniform B-Spline Surface.
cwidth -- specified by user, fullword integer

Number of words between subsequent entries of control points array ctlpts
ctlpts -- specified by user, array of short floating-point numbers.

Grid of control points. The control points are stored by row where a row is considered to be the direction associated with the u parameter. For example, the set of control points
 
 
                 ^
                 | m   n   o   p
                 |
                 | i   j   k   l
   Increasing v  |
                 | e   f   g   h
                 |
                 | a   b   c   d
                 ---------------->
                    Increasing u
 

would be stored in the order a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, and p. The cwidth parameter must be at least three. If cflags specifies that weights are included with each control point, then the cwidth parameter must be at least four. Each weight W must be greater than zero when specified.

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)

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

The minimum parameter value in the u dimension at which the surface is evaluated. This value must be greater than or equal to the value of knot uorder in parameter uknots
umax -- specified by user, short floating-point number

The maximum parameter value in the u dimension at which the surface is evaluated. This value must be less than or equal to the value of knot unum+1 in parameter uknots
vmin -- specified by user, short floating-point number

The minimum parameter value in the v dimension at which the surface is evaluated. This value must be greater than or equal to the value of knot vorder in parameter vknots

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

The maximum parameter value in the v dimension at which the surface is evaluated. This value must be less than or equal to the value of knot vnum+1 in parameter vknots

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

GPBICD
Set Back Interior Color Direct
GPBICI
Set Back Interior Color Index
GPBSCD
Set Back Specular Color Direct
GPBSCI
Set Back Specular Color Index
GPBSPR
Set Back Surface Properties
GPECD
Set Edge Color Direct
GPECI
Set Edge Color Index
GPEI
Set Edge Index
GPELT
Set Edge Linetype
GPESC
Set Edge Scale Factor
GPFDMO
Set Face Distinguish Mode
GPICD
Set Interior Color Direct
GPICI
Set Interior Color Index
GPII
Set Interior Index
GPIS
Set Interior Style
GPISI
Set Interior Style Index
GPLMO
Set Lighting Calculation Mode
GPLSS
Set Light Source State
GPPGC
Set Polygon Culling
GPQSDF
Inquire Surface Display Facilities
GPSAC
Set Surface Approximation Criteria
GPSCD
Set Specular Color Direct
GPSCI
Set Specular Color Index
GPSPR
Set Surface Properties
GPTCAC
Set Trimming Curve Approximation Criteria

RCP code

201342721 (X'0C003F01')


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