Surfaces: Surface List

Element type: miSCENE_SURFACE
Data type: miSurface[ ]
Sizes: int no_surfaces
Defaults: all nulls, except where otherwise noted
enum miSurface_type {
        miSURFACE_GEOMETRIC,
        miSURFACE_GEOMOTION,            /* geometric + motion vectors */
        miSURFACE_TEXTURE_2D,           /* texture with/without seam compens */
        miSURFACE_TEXTURE_3D,
        miSURFACE_BUMP,                 /* bump */
        miSURFACE_TEXBUMP_2D,           /* texture + bump */
        miSURFACE_TEXBUMP_3D
};

typedef struct miSurface {
        miApprox        approx;                 /* approx techn. for surface */
        miApprox        disp_approx;            /* approx for disp. surface */
        miGeoIndex      no_parms[miUV_DIM];     /* no of parameter values */
        miGeoIndex      no_ctls;                /* no of control points */
        miGeoIndex      no_specpnts;            /* no of special points */
        miGeoIndex      scalar_idx;             /* surf_scalar list index */
        miGeoIndex      specpnt_idx;            /* special points list index */
        miGeoIndex      basis_idx[miUV_DIM];    /* index into basis list */
        enum miSurface_type type;
        miUshort        degree[miUV_DIM];       /* from bases, for GAP */
        miUshort        ctl_dim;                /* control pnt dimension */
        miUshort        spare[3];
} miSurface;

A translator must provide: type, approx, disp_approx, ctl_dim, degree, no_parms, no_ctls, scalar_idx, basis_idx.

A translator may provide: no_specpnts, specpnt_idx.

type must be one of the miSURFACE_ constants. The 2D variants perform seam rewind correction, the 3D variants do not. All surfaces begin with either miSURFACE_GEOMETRIC or miSURFACE_GEOMOTION, optionally followed by one of the others for each texture space, beginning with space 0 up to a maximum of space 63. (Future versions may have a larger maximum, up to 255.)

approx is the approximation technique as described above, in the miFace description.

disp_approx is the approximation technique for the displaced surface, if a displacement shader is available.

ctl_dim is the number of scalars per control point:

miSURFACE_GEOMETRIC, non-rational: 3
miSURFACE_GEOMETRIC, rational: 4
miSURFACE_GEOMOTION, non-rational: 6
miSURFACE_GEOMOTION, rational: 7
miSURFACE_TEXTURE_2D 2
miSURFACE_TEXTURE_3D 3
miSURFACE_BUMP: 3
miSURFACE_TEXBUMP_2D, non-rational: 5
miSURFACE_TEXBUMP_2D, rational: 6
miSURFACE_TEXBUMP_3D, non-rational: 5
miSURFACE_TEXBUMP_3D, rational: 6

degree[0] and degree[1] contains the degree of the surface in the U and V directions, respectively. This is used by GAP to cache the degree from the surface bases.

no_parms[0] and no_parms[1] are the lengths of the U and V parameter vectors, respectively.

no_ctls is the total number of control points for this surface. The number of scalars required in the scalar list is no_ctls · ctl_dim.

no_specpoints is the number of special points to be included in the tessellation.

scalar_idx is the index of the first scalar in the surface scalar list (also anchored in the object, see above). The scalar list for one surface consists of the U parameter vector, followed by the V parameter vector, followed by the geometric control points (all X first, then all Y, then all Z, then all W, then all motion X, then all motion Y, then all motion Z, if present), followed by the texture and bump control points in the same XYZW order if present.

specpnt_idx is the index of the first special point in the special points list (anchored in the object) to use.

basis_idx[0] and basis_idx[1] are indices for the bases in the basis list (anchored in the object) to use, separate for the U and V parameter directions.

Copyright © 1986-2010 by mental images GmbH