4 Data Structures
The entire box can have a set of attributes. In addition, you may specify an array of attributes to be applied to each face of the box. (In this way, for example, you can give each face of the box a different color.)
A box is defined by the TQ3BoxData
data type. See "Creating and Editing Boxes," beginning on page 4-96 for a description of the routines you can use to create and edit boxes. Figure 4-15 shows a box.
Figure 4-16 on page 446 shows the standard surface parameterization of a box.
Figure 4-16 The standard surface parameterization of a box
typedef struct TQ3BoxData { TQ3Point3D origin; TQ3Vector3D orientation; TQ3Vector3D majorAxis; TQ3Vector3D minorAxis; TQ3AttributeSet *faceAttributeSet; TQ3AttributeSet boxAttributeSet; } TQ3BoxData;origin
The origin of the box.orientation
The orientation of the box.majorAxis
The major axis of the box.minorAxis
The minor axis of the box.faceAttributeSet
A pointer to a six-element array of face attributes. The attributes apply to the faces of the box specified in the following order: left, right, front, back, top, bottom.boxAttributeSet
A set of attributes for the box. The value in this field isNULL
if no box attributes are defined.
Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker