[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
The graPHIGS Programming Interface : Subroutine Reference
GPTNBS - Trimmed Non-Uniform B-Spline Surface
GPTNBS
(uorder,
vorder,
unum,
vnum,
uknots,
vknots,
tflag,
utess,
vtess,
cflags,
cwidth,
ctlpts,
ncontour,
ncurve,
curveinfo,
tknot,
ttess,
cdwidth,
cddata) |
Purpose
Use
GPTNBS to insert a Trimmed
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
Trimmed Non-Uniform B-Spline Surface structure
element depending on the current edit mode.
At structure traversal time, a non-uniform
parametric surface of the specified
uorder and
vorder are generated using the specified control
points.
Only the region of the surface which is bounded by an odd
number of trimming curves is rendered.
This primitive generates no output if any of the
following are true:
The requested orders for the basis functions of the
surface or trimming curves are not supported by the
workstation.
No trimming curves are specified.
The trimming curves
must adhere to the following
rules; otherwise, the results are unpredictable:
Each loop must be explicitly closed.
Curves cannot go outside the parameter range of the surface.
The trimming curves within a loop must be connected in
a head to tail fashion.
They may not be randomly specified.
The end of one curve must coincide with the beginning of the
next curve.
The trimming curves may not cross other trimming curves
in the same or different loop.
The trimming curves have the following
optional
capability:
A mix of rational and non-rational curves can be used
on the same surface.
The trimming curves can form multiple closed loops.
Each curve is parameterized independently.
Polygon and surface attributes are applied to this primitive.
GPTNBS is identified as GDP 1036.
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.
utess -- 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 values 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.
vtess -- 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 values 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, 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)
ncontour -- specified by user, fullword integer
Number of contours to be generated (>=0)
ncurve -- specified by user,
array of fullword integers
Number of curves in each contour.
Each entry must be greater than or equal to one.
The length of this array is defined by the value of the
ncontour parameter.
curveinfo -- specified by user,
array of curve data
Array containing information about each curve.
Each entry of this parameter must have the following fields
in this order:
Type of Curve -- fullword integer
This field must contain
3 -
Non-Uniform B-Spline curve
Options -- fullword integer
This parameter specifies various options of the curve.
Each option is specified by a bit in this word and the
following bits are currently defined.
Bit
Meaning
0-28
Reserved. Must be set to zero.
29
Tessellation quality flag.
If set, a tessellation quality value for each span of this
curve is specified in the
ttess parameter.
30
Weight flag.
If set, the curve is rational and the weight is specified
for each control point in the
cddata parameter.
31
Boundary flag.
If set, the curve is treated as an edge of the composite
fill area.
Order -- fullword integer
Order of the curve (>=2)
Number of Data -- fullword integer
Number of entries of the
cddata parameter used to
define the curve.
This parameter corresponds to the
npoint parameter
of the Non-Uniform B-Spline Curve 2.
The specified number's entries of the
cddata parameter are used as its
ctlpts
parameter.
Start -- short floating-point number
The parameter value representing the start point of the curve.
End -- short floating-point number
The parameter value representing the end point of the curve.
tknot -- specified by user,
array of short floating-point numbers
Array of knot values for the
t direction of the
curve.
The sequence of each list in this array is assumed to match
the order of the curve definitions in
curveinfo
The length of each list equals the
order +
number of data
for the curve.
ttess -- specified by user,
array of short floating-point numbers
Array of tessellation quality values.
This array must contain one list for each
Non-Uniform B-Spline curve with a tessellation
quality flag set to a value of one (specified).
For other curves, this array is not referenced.
The sequence of each list in this array is assumed to match
the order of the curve definitions in
curveinfo
The length of each list equals the
number of
data
-
order + 1 of the curve.
cdwidth -- specified by user, fullword integer.
Specifies the number of fullwords between each entry of
the array in
cddata
If there is any rational curve in the
curveinfo
parameter, this parameter must be at least three.
Otherwise, it must be larger than or equal to two.
cddata -- specified by user,
array of short floating-point numbers
This array must contain one list for each curve.
The sequence of each list in this array is assumed to match
the order of the curve definitions in
curveinfo
The length of each list equals the
number of data
field specified in the
curveinfo parameter.
For each entry, the following fields are defined and the
fields must be specified in this order without any gap.
U, V components --
2 short floating-point numbers
weight --
short floating-point number
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
- 353
- NUMBER OF CONTOURS < ZERO
- 354
- NUMBER OF CURVES PER CONTOUR < ONE
- 361
- CURVE OPTIONS FIELD 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
- GPQTDF
- Inquire Trimming Curve 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
201345027
(X'0C004803')
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]