Previous Next Up Title Contents Index Functions Index Top Library

NON-UNIFORM B-SPLINE CURVE 3

PNON_UNIFORM_B_SPLINE_CURVE3


CALL SEQUENCE

void pnon_uniform_b_spline_curve3 (
)

TYPES

typedef struct {
	Pint	order;	/* spline order	*/
	Pfloat_list	knots;	/* knots	*/
	Pfloat	low_limit;	/* lower parameter range limit	*/
	Pfloat	high_limit;	/* high parameter range limit	*/
	Pctrl_point3_list	ctrl_points;	/* list of control points	*/
} Pcurve_geom_spline;

typedef struct {
	Pint	num_floats;	/* number of floats in list	*/
	Pfloat	*floats;	/* list of floats	*/
} Pfloat_list;

typedef enum {
	PB_SPLINE_RATIONAL,
	PB_SPLINE_NON_RATIONAL
} Prationality;

typedef struct {
	Prationality	rationality;	/* control point format: [NON] RATIONAL	*/
	Pint	num_points;	/* number of control points	*/
	Ppoint3_ptr	points;	/* list of control points	*/
} Pctrl_point3_list;

typedef union {
	Ppoint3	*point3;	/* pointer to 3D points	*/
	Phomo_point4	*homo_point4;	/* pointer to 4D homogeneous points	*/
} Ppoint3_ptr;

PHIGS STATE

(PHOP,*,STOP,*)

EFFECT

This function specifies the non-uniform B-spline curve primitive.

The NON-UNIFORM B-SPLINE CURVE 3 element is inserted in the open structure after element pointer or replaces the element indicated by element pointer, depending on the edit mode value. Element pointer is updated and points to the NON-UNIFORM B-SPLINE CURVE 3 structure element. The values specified in the function are associated with the element.

The spline order must be a positive integer. The knots must form a non-decreasing sequence of numbers.

The rationality parameter may have the value PB_SPLINE_RATIONAL or PB_SPLINE_NON_RATIONAL. When PB_SPLINE_RATIONAL is specified the control points are specified as homogeneous modelling coordinates (data type Phomo_point4), with the restriction that the fourth coordinate be greater than zero. When PB_SPLINE_NON_RATIONAL is specified the control points are non-homogeneous PHIGS modelling coordinates (data type Ppoint3).

The number of control points must be at least as large as the order. The number of control points plus the spline order must equal the number of knots.

The parameter range limit values, tmin and tmax, specify over what range the B-spline curve is generated. tmin must be less than tmax. tmin must be greater than or equal to the order-th knot value. tmax must be less than or equal to the (k + 1 - order) - th knot value (where k is the number of knots).

When an element of this type is interpreted a non-uniform B-spline curve is generated for the parameter values between tmin an tmax. No curve is generated if the curve order is not supported. The current values of the non-uniform B-spline curve attributes specified in and stored in the traversal state list are bound to the primitive.

Attributes associated with Non-Uniform B-Spline Curve 3 :

LINETYPE

LINEWIDTH SCALE FACTOR

LINE COLOUR

CURVE APPROXIMATION CRITERIA

EXTENSION TO THE PHIGS STANDARD

If used in one of the two GPHIGS specific modes NRS or NDDS, the effect of this function is different from the effect described in the standard.

In NRS mode, (see OPEN PIPE), the element is not stored in a structure. It is sent to the workstation on which the pipe is opened.

In NDDS mode, (see BEGIN NON DUPLICATE DATA STORE), the element is stored in the structure but its content is not copied into the CSS. GPHIGS stores only the pointer to the user's data.

See GPHIGS user guide for more details on NRS and NDDS modes.

ERRORS

5
Ignoring function, function requires state (PHOP,*, STOP,*)
500
Ignoring function, the specified order is less than one
501
Ignoring function, not enough control points for the specified order
502
Ignoring function, the specified order is inconsistent with number of knots and control points
503
Ignoring function, the knot sequence is not non-decreasing
506
Ignoring function, the parameter range is inconsistent with the knots
507
Ignoring function, the fourth coordinate of a rational control point is less than or equal to zero

SEE ALSO

open structure, open pipe (ext), begin non duplicate data storage (ext), non-uniform b-spline curve 3 with colour, polyline, set curve approximation criteria, inquire current element content, inquire current element type and size


Previous Next Up Title Contents Index Functions Index Top Library