void pnon_uniform_b_spline_surf3 (
const Psurf_geom_spline *surf_spline, /* surface geometry spline */ const Ptrim_curve_loop_list *trim_loops /* list of trimming curve loops */
)
typedef struct {
Pint u_order; /* u spline order */
Pint v_order; /* v spline order */
Pfloat_list u_knots; /* list of u knot values */
Pfloat_list v_knots; /* list of v knot values */
Pctrl_point3_array ctrl_points; /* array of control points */
} Psurf_geom_spline;
typedef enum {
PB_SPLINE_RATIONAL,
PB_SPLINE_NON_RATIONAL
} Prationality;
typedef struct {
Prationality rationality; /* control point format: [NON] RATIONAL */
Pint_size dims; /* control point array u,v dimensions */
Ppoint3_ptr points; /* array of control points */
} Pctrl_point3_array;
typedef union {
Ppoint3 *point3; /* pointer to 3D points */
Phomo_point4 *homo_point4; /* pointer to 4D homogeneous points */
} Ppoint3_ptr;
typedef struct {
Pint num_trim_loops; /* number of trimming curve loops */
Ptrim_curve_loop *trim_loops; /* array of trimming curve loops */
} Ptrim_curve_loop_list;
typedef struct {
Pint num_trim_curves; /* number of trimming curves */
Ptrim_curve *trim_curves; /* list of trimming curves forming a closed loop */
} Ptrim_curve_loop;
typedef struct {
Pcurve_approx_crit approx_crit; /* trimming curve approximation data record */
Pvis_flag visibility_flag; /* curve visibility flag */
Pint order; /* curve order */
Pfloat_list knots; /* curve knot vector */
Pfloat low_limit; /* curve parameter range lower limit */
Pfloat high_limit; /* curve parameter range upper limit */
Pctrl_point_list ctrl_points; /* curve control points */
} Ptrim_curve;
This function specifies the non-uniform B-spline surface primitive.
The NON-UNIFORM B-SPLINE SURFACE 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 SURFACE structure element. The values specified in the function are associated with the element.
The surface u and v orders must be positive integers. The u knots and the v knots must each form a non-decreasing sequence of numbers.
The rationality parameter may have the enumerated value PB_SPLINE_RATIONAL or PB_SPLINE_NON_RATIONAL. When PB_SPLINE_RATIONAL is specified, the control points must be specified as homogeneous modelling coordinates (data type Phomo_point4), with the restriction that the fourth coordinate be greater than zero. For a PB_SPLINE_NON_RATIONAL type, the control points are non-homogeneous PHIGS modelling coordinates (data type Ppoint3).
The number of control points in each of the u and v directions must be at least as large as the corresponding order. The number of control points in each direction plus the corresponding order must equal the corresponding number of knots.
A NULL value for the trim_loops parameter indicates the corresponding optional data is not supplied.
Trimming curve approximation criteria TYPES are as follows:
PCURVE_APPROX_WS_DEP workstation dependent
PCURVE_APPROX_CONST_PARAM_SUBD constant parametric subdivision between knots
PCURVE_APPROX_CHORDAL_SIZE_WC chordal size in WC
PCURVE_APPROX_CHORDAL_SIZE_NPC chordal size in NPC
PCURVE_APPROX_CHORDAL_SIZE_DC chordal size in DC
PCURVE_APPROX_CHORDAL_DEV_WC chordal deviation in WC
PCURVE_APPROX_CHORDAL_DEV_NPC chordal deviation in NPC
PCURVE_APPROX_CHORDAL_DEV_DC chordal deviation in DC
PCURVE_APPROX_REL_WC relative in WC
PCURVE_APPROX_REL_NPC relative in NPC
PCURVE_APPROX_REL_DC relative in DC
See SET CURVE APPROXIMATION CRITERIA for the description of the data records.
If a specified trimming curve approximation type is not available on a workstation, type PCURVE_APPROX_WS_DEP is used.
When an element of this type is interpreted a non-uniform B-spline surface is generated. No surface is generated if either of the surface orders or any of the trimming curve orders are not supported. The effect of discontinuous trimming curves is workstation dependent. The current values of the non-uniform B-spline surface attributes specified in and stored in the traversal state list are bound to the primitive.
Attributes associated with Non-Uniform B-Spline Surface 3 :
INTERIOR STYLE
INTERIOR STYLE INDEX
INTERIOR COLOUR
EDGE FLAG
EDGE TYPE
EDGE WIDTH SCALE FACTOR
EDGE COLOUR
SURFACE APPROXIMATION CRITERIA
PARAMETRIC SURFACE CHARACTERISTICS
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.
open structure, open pipe (ext), begin non duplicate data storage (ext), non-uniform b-spline surface 3 with data, fill area set, set surface approximation criteria, set parametric surface characteristics, inquire current element content, inquire current element type and size