Tori
A torus is a three-dimensional object formed by the rotation of an ellipse about an axis in the plane of the ellipse that does not cut the ellipse. The major radius is the distance of the center of the ellipse from that axis. A torus is defined by the
TQ3TorusData
data type. See
"Creating and Editing Tori"
for a description of the routines you can use to create and edit tori.
Figure 35
shows a torus.
Figure 35
A torus
Figure 36
shows the standard surface parameterization of a torus.
Figure 36
The standard surface parameterization of a torus
typedef struct TQ3TorusData {
TQ3Point3D origin;
TQ3Vector3D orientation;
TQ3Vector3D majorRadius;
TQ3Vector3D minorRadius;
float ratio;
float uMin, uMax, vMin, vMax;
TQ3EndCap caps;
TQ3AttributeSet interiorAttributeSet;
TQ3AttributeSet torusAttributeSet;
} TQ3TorusData;
-
origin
-
The center of the torus. This is the closest point on the axis of rotation to the rotated ellipse.
-
orientation
-
The orientation of the torus. This field specifies the axis of rotation and the half-thickness of the torus. The orientation must be orthogonal to both the major and minor radii.
-
majorRadius
-
The major radius of the torus.
-
minorRadius
-
The minor radius of the torus.
-
ratio
-
The ratio of the major radius of the rotated ellipse to the length of the orientation vector. In
Figure 35
, this is
r
/length(
orientation
).
-
uMin
-
The minimum value in the
u
parametric direction of the torus. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
-
uMax
-
The maximum value in the
u
parametric direction of the torus. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
-
vMin
-
The minimum value in the
v
parametric direction of the torus. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
-
vMax
-
The maximum value in the
v
parametric direction of the torus. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
-
caps
-
The style of cap to be used on the torus. See
"End Caps Masks"
for a description of the masks you can use to specify a value for this field.
-
interiorAttributeSet
-
A set of torus interior attributes.
-
torusAttributeSet
-
A set of attributes for the torus. The value in this field is
NULL
if no torus attributes are defined.
© 1997 Apple Computer, Inc.