Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pnon_uniform_b_spline_surf3(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pnon_uniform_b_spline_surf3(3g)  —  Subroutines

Name

pnon_uniform_b_spline_surf3 − Specifies the 3D form of the nonuniform B-spline surface primitive. 

Operating States: PHOP, ∗, STOP, ∗
PHIGS PLUS function
Creates a structure element
 

Syntax

void pnon_uniform_b_spline_surf3 (
  const Psurf_geom_spline      ∗geom_spline,  /∗ (I) Surface geometry
                                                     spline ∗/
  const Ptrim_curve_loop_list  ∗trim_loops    /∗ (I) List of trimming curve
                                                     loops ∗/
)

Data Structures

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 struct {
        Pint     num_floats;   /∗ number of floats in list ∗/
        Pfloat  ∗floats;       /∗ list of floats ∗/
    } Pfloat_list;
    typedef struct {
        Prationality   rationality;   /∗ control point rationality ∗/
        Pint_size      dims;          /∗ control point array u,v
                                         dimensions ∗/
        Ppoint3_ptr    points;        /∗ array of control points ∗/
    } Pctrl_point3_array;
        typedef enum {
            PB_SPLINE_RATIONAL,        /∗ rational (4D) points ∗/
            PB_SPLINE_NON_RATIONAL     /∗ nonrational (3D) points ∗/
        } Prationality;
        typedef struct {
            Pint   size_x;   /∗ x size ∗/
            Pint   size_y;   /∗ y size ∗/
        } Pint_size;
        typedef union {
            Ppoint3       ∗point3;       /∗ pointer to 3D nonhomogeneous
                                            points ∗/
            Phomo_point4  ∗homo_point4;  /∗ pointer to 4D homogeneous
                                            points ∗/
        } Ppoint3_ptr;
            typedef struct {
                Pfloat   x;   /∗ x coordinate ∗/
                Pfloat   y;   /∗ y coordinate ∗/
                Pfloat   z;   /∗ z coordinate ∗/
            } Ppoint3;
            typedef struct {
                Pfloat   wx;   /∗ wx coordinate ∗/
                Pfloat   wy;   /∗ wy coordinate ∗/
                Pfloat   wz;   /∗ wz coordinate ∗/
                Pfloat   w;    /∗ homogeneous coordinate ∗/
            } Phomo_point4;
typedef struct {
    Pint                num_trim_loops;   /∗ number of trimming curve
                                             loops ∗/
    Ptrim_curve_loop   ∗trim_loops;       /∗ list 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
                                                    criteria data record ∗/
            Pvis_flag           visibility_flag; /∗ curve visibility
                                                    flag ∗/
            Pint                order;           /∗ spline order ∗/
            Pfloat_list         knots;           /∗ list of knot values ∗/
            Pfloat              low_limit;       /∗ lower parameter range
                                                    limit ∗/
            Pfloat              high_limit;      /∗ high parameter range
                                                    limit ∗/
            Pctrl_point_list    ctrl_points;     /∗ list of control
                                                    points ∗/
        } Ptrim_curve;
            typedef struct {
                Pint   type;   /∗ curve approximation criteria type ∗/
                union Pcurve_approx_crit_data {
                    struct Pcurve_approx_const_param_subd {
                        Pint   count;  /∗ count ∗/
                    } const_param_subd;
                    struct Pcurve_approx_chordal_size_wc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } chordal_size_wc;
                    struct Pcurve_approx_chordal_size_npc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } chordal_size_npc;
                    struct Pcurve_approx_chordal_size_dc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } chordal_size_dc;
                    struct Pcurve_approx_chordal_dev_wc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } chordal_dev_wc;
                    struct Pcurve_approx_chordal_dev_npc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } chordal_dev_npc;
                    struct Pcurve_approx_chordal_dev_dc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } chordal_dev_dc;
                    struct Pcurve_approx_rel_wc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } rel_wc;
                    struct Pcurve_approx_rel_npc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } rel_npc;
                    struct Pcurve_approx_rel_dc {
                        Pfloat  approx;  /∗ approximation value ∗/
                    } rel_dc;
                    Pdata       unsupp;  /∗ unsupported curve approximation
                                            criteria data ∗/
                } data;
            } Pcurve_approx_crit;
            typedef enum {
                PVIS_OFF,  /∗ edges off ∗/
                PVIS_ON    /∗ edges on ∗/
            } Pvis_flag;
            typedef struct {
                Prationality  rationality;   /∗ control point
                                                rationality ∗/
                Pint          num_points;    /∗ number of control points ∗/
                Ppoint_ptr    points;        /∗ list of control points ∗/
            } Pctrl_point_list;
                typedef union {
                    Ppoint        ∗point;        /∗ pointer to 2D
                                                    nonhomogeneous
                                                    points ∗/
                    Phomo_point3  ∗homo_point3;  /∗ pointer to 3D
                                                    homogeneous points ∗/
                } Ppoint_ptr;
                    typedef struct {
                        Pfloat   x;   /∗ x coordinate ∗/
                        Pfloat   y;   /∗ y coordinate ∗/
                    } Ppoint;
 
                    typedef struct {
                        Pfloat    wx;    /∗ wx coordinate ∗/
                        Pfloat    wy;    /∗ wy coordinate ∗/
                        Pfloat    w;     /∗ homogeneous coordinate ∗/
                    } Phomo_point3;

Constants

Data Structure Constants  Constant                   Description
---------------------------------------------------------------------------
Curve approximation       PCURVE_APPROX_WS_DEP       Workstation-dependent
types                                                method
                          PCURVE_APPROX_CONST_       Constant parametric
                          PARAM_SUBD                 subdivision between
                                                     knots
                          PCURVE_APPROX_CHORDAL_     Chordal size, in world
                          SIZE_WC                    coordinate units
                          PCURVE_APPROX_CHORDAL_     Chordal size, in
                          SIZE_NPC                   normalized projection
                                                     units
                          PCURVE_APPROX_CHORDAL_     Chordal size, in
                          SIZE_DC                    device coordinate
                                                     units
                          PCURVE_APPROX_CHORDAL_     Chordal deviation, in
                          DEV_WC                     world coordinates
                          PCURVE_APPROX_CHORDAL_     Chordal deviation, in
                          DEV_NPC                    normalized projection
                                                     coordinates
                          PCURVE_APPROX_CHORDAL_     Chordal deviation, in
                          DEV_DC                     device coordinates
                          PCURVE_APPROX_REL_WC       Relative, in world
                                                     coordinate units
                          PCURVE_APPROX_REL_NPC      Relative, in
                                                     normalized projection
                                                     coordinates
                          PCURVE_APPROX_REL_DC       Relative, in device
                                                     coordinate units
---------------------------------------------------------------------------

Description

pnon_uniform_b_spline_surf3 specifies the three-dimensional form of the nonuniform B-spline surface primitive.  It determines the surface area attributes of the nonuniform B-spline curve.  For example, it might determine the color of the nonuniform B-spline surface. 

Depending on the current edit mode, this function either inserts the new structure element directly after the element indicated by the pointer or replaces the element indicated by the pointer.  The pointer then points to the new nonuniform B-spline surface 3 element. 

During structure traversal, the fill area set 3 primitive attributes provide additional data.  Digital PHIGS computes the curve approximation criteria, and draws a nonuniform B-spline surface.  This function fully specifies the three-dimensional nonuniform B-spline surface primitive.  The surface U and V orders must be positive integers.  The U knots and the V knots must each form an increasing sequence of numbers.  Note the following considerations when using this function:

•The type 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 modeling coordinates.  For a PB_SPLINE_NON_RATIONAL type, the control points are ordinary PHIGS modeling coordinates. 

•The control points in the U and V directions must be at least as large as the corresponding order.  If not, Digital PHIGS generates a spline of order equal to the number of control points in the corresponding direction.  The number of control points in each direction plus the corresponding spline order must equal the corresponding number of knots.  Excess knot values or control points are ignored. 

•At structure traversal, PHIGS draws a nonuniform B-spline surface primitive with the attributes used by pfill_area_set3_data, and the current curve approximation criteria. 

•Trimming curves define the surface parameter area to render.  Digital PHIGS renders the rectangular parameter limits of the surface as the edges of the surface, based on the edge flag attribute when you have not specified any trimming curves. 

•The trimming definition of a surface consists of a list of loops.  Each of these loops is a list of one or more trimming curves, each of which is a nonuniform rational B-spline curve defined in the two-dimensional parameter space of the surface.  The curves of a loop connect in a head-to-tail fashion.  Each loop must be explicitly closed.  If there is floating point inaccuracy in closure of trimming loops or head-to-tail connectivity between trimming curves, the implementation assumes closure or connectivity. 

•Each trimming curve has a visibility flag that controls its visibility.  When the edge flag attribute is off, trimming curves are not rendered as edges, though they may still be rendered where the interior style is HOLLOW. 

If Digital PHIGS is in immediate mode, it performs this function immediately, but the function does not create a structure element. 

See Also

padd_names_set
pinq_b_spline_surf_facs
pnon_uniform_b_spline_curve3
premove_names_set
pset_back_int_colr
pset_back_int_shad_method
pset_back_int_style
pset_back_int_style_ind
pset_back_refl_model
pset_back_refl_props
pset_depth_cue_ind
pset_edge_colr
pset_edge_colr_ind
pset_edge_flag
pset_edge_ind
pset_edgetype
pset_edgewidth
pset_facet_cull_mode
pset_facet_disting_mode
pset_hlhsr_id
pset_indiv_asf
pset_int_colr
pset_int_colr_ind
pset_int_ind
pset_int_rep_plus
pset_int_shad_method
pset_int_style
pset_int_style_ind
pset_light_source_st
pset_pick_id
pset_refl_model
pset_refl_props
pset_surf_approx_crit
pset_view_ind

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026