PEXNURBCurve - Non-Uniform Rational B-spline Curve Primitive (5.0)


Note: This function has been superseded by the PEXOCCNURBCurve function, but is maintained here for backwards compatibility with PEXlib 5.1

Synopsis

 
     void PEXNURBCurve(
          Display *display,
          XID resource_id,
          PEXOCRequestType req_type,
          int rationality,
          int order,
          float *knots,
          unsigned int count,
          PEXArrayOfCoord points,
          double tmin,
          double tmax
     )

Arguments

display
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id
The resource identifier of the renderer or structure.

req_type
The request type for the output command (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).

rationality
The type of B-spline curve, whether rational or non-rational (PEXRational or PEXNonRational).

order
The order of the polynomial expression.

knots
An array of floats specifying the B-spline curve knots.

count
The number of control points that define the curve.

points
An array of control points defining the B-spline curve

tmin
The minimum parameter value at which to evaluate the curve.

tmax
The maximum parameter value at which to evaluate the curve.

Returns

None.

Description

Invoke PEXNURBCurve to create a non-uniform B-spline curve output primitive.

Specify the curve order as a positive number. Invoke the PEXGetImpDepConstants function to determine the largest supported value for curve order. Specify the spline shape by using a list of knots in the parametric coordinate space and a list of control points in modeling coordinates. The number of control points must be at least as large as the order. The number of knots is the sum of the curve order plus the number of control points. The sequence of knots must be non-decreasing, i.e. t(0) <= t(1) <=... <= t(k-1) where k is the number of knots.

If the rationality argument is PEXRational, then your application must specify the control points in homogeneous (4D) modeling coordinates. PEXlib assumes that 4D modeling coordinates (x,y,z) have already been multiplied by the homogeneous coordinate (w). If rationality is PEXNonRational, then your application must specify the control points in non- homogeneous (3D) modeling coordinates.

Evaluation of the spline is restricted to a specific region in the parametric coordinate space. The parametric limits, tmin and tmax, specify the region in the parametric coordinate space over which the spline is to be evaluated (tmin must be less than tmax). The parametric bounds must also satisfy the restriction tmin >= t(order), tmax <= t(k+1-order).

Depending on the setting of the polyline source flag, this primitive obtains the attributes: line color, line type, line width and curve approximation either directly from the current line attributes or from the line bundle lookup table entry specified by the current line bundle index attribute.

If your implementation does not support the specified curve order, then the implementation stores the output primitive in a structure, but when rendering this primitive, there is no visual effect. The implementation ignores this primitive.

Also, the curve order must not be less than one.

Errors

BadPEXOutputCommand
The output command contains an invalid value.

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXStructure
The specified structure resource identifier is invalid.

See Also

For an overview, see Output Command Functions.