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

GPRNBS - Reevaluate Non-Uniform B-Spline Surface

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

Purpose

Use GPRNBS to reevaluate a large surface into smaller surfaces. This utilty creates x number of structure elements to define all the data and returns the number of structure elements created. If an error occurs, processing stops and the actual number of created structure elements is returned.

The reevaluation of the surface is based on the specified option. If the option is specified as 1=CONTROL_POINTS , then it reevaluates the surface by looking at the number of control points in the u and v dimension. If the option is specified as 2=ELEMENT_SIZE , then it reevaluates the surface by looking at the size of the surface. If the element size exceeds 64K bytes, the surface is partitioned such that the resulting surfaces will not exceed 64K bytes.

If the option parameter is not a valid value, it defaults to 1=CONTROL_POINTS

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 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 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 indicates whether the tessellation quality values are specified or not.
Value Meaning
0 Not specified.
1 Specified.

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

Tesselation quality values for the u direction. When the tflag parameter is 1 (specified), this parameter must contain unum- uorder+1 quality values. These values are used in conjunction with Surface Approximation Criteria method 8 to control the number of subdivisions made in the u direction. The number of subdivisions performed for a patch is approximately: value of utdata [default] u (the Surface Approximation Criteria control value in the traversal state list).

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

Tessellation quality values for the v direction. When the tflag parameter is 1 (specified), this parameter must contain vnum- vorder+1 quality values. These values are used in conjunction with Surface Approximation Criteria method 8 to control the number of subdivisions made in the v direction. The number of subdivisions performed for a patch is approximately: value of vtdata [default] v (the Surface Approximation Criteria control value in the traversal state list).

cflags -- specified by user, fullword integer

Control point option data flags. This parameter indicates 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 by 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
 
is stored in the order a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p. The cwidth parameter must be at least 3. If cflags specifies that weights are included with each control point, the cwidth parameter must be at least 4. 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 direction at which the surface is evaluated. This value must be greater than or equal to the value of knot uorder in the parameter uknots

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

The maximum parameter value in the u direction at which the surface is evaluated. This value must be less than or equal to the value of knot unum+1 in the parameter uknots

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

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

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

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

option -- specified by user, fullword integer

Option to use when reevaluating the surface (1=CONTROL_POINTS , 2=ELEMENT_SIZE )

nelem -- returned by the graPHIGS API, fullword integer

The number of structure elements created by the utility or 0 if none were created.

Error Codes

4
FUNCTION REQUIRES STATE STOP
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

GPNBS
Non-Uniform B-Spline Surface

RCP code

201348097 (X'0C005401')


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