TQ3BoxData |
typedef struct TQ3BoxData {
TQ3Point3D origin;
TQ3Vector3D orientation;
TQ3Vector3D majorAxis;
TQ3Vector3D minorAxis;
TQ3AttributeSet *faceAttributeSet;
TQ3AttributeSet boxAttributeSet;
} TQ3BoxData;
Data describing the state of a box object.
- origin
- Origin of the box (one of the corners).
- orientation
- Orientation vector of the box.
- majorAxis
- Major axis of the box.
- minorAxis
- Minor axis of the box.
- faceAttributeSet
- Array of attribute set objects for the 6 faces. This field may be NULL, or individual sets in the array may be NULL.
- boxAttributeSet
- Attribute set object holding attributes that apply to all of the faces. May be NULL.
TQ3ConeData |
typedef struct TQ3ConeData {
TQ3Point3D origin;
TQ3Vector3D orientation;
TQ3Vector3D majorRadius;
TQ3Vector3D minorRadius;
float uMin;
float uMax;
float vMin;
float vMax;
TQ3EndCap caps;
TQ3AttributeSet interiorAttributeSet;
TQ3AttributeSet faceAttributeSet;
TQ3AttributeSet bottomAttributeSet;
TQ3AttributeSet coneAttributeSet;
} TQ3ConeData;
Data describing the state of a cone object. The orientation, major radius,
and minor radius vectors need not be orthogonal, though they should be
independent. Normally these vectors (in that order) should form a right-handed system.
If they form a left-handed system, then the cone is "inside out", i.e., the front face
is inside.
The values uMin, uMax, vMin, and vMax
allow partial cones, e.g., a cone with a wedge cut out of it or with its tip cut off.
This feature was not implemented in QuickDraw 3D. See the discussion of
TQ3EllipseData for notes on the interpretation of uMin and
uMax.
If vMax < 1, so that the tip is cut off, the top disk is considered part of
an interior face, rather than a top cap.
- origin
- The center of the base of the cone.
- orientation
- Vector from the origin to the tip of the cone.
- majorRadius
- A vector from the origin to a point on the perimeter of the base.
- minorRadius
- A vector from the origin to a point on the perimeter of the base.
- uMin
- Minimum value of the u parameter, which goes around the base. Typically 0.
- uMax
- Maximum value of the u parameter, which goes around the base. Typically 1.
- vMin
- Minimum value of the v parameter, which goes from base to tip. Typically 0.
- vMax
- Minimum value of the v parameter, which goes from base to tip. Typically 1.
- caps
- End cap masks, determining whether there is a bottom cap, and in the case of partial cones, determining whether there is an interior face.
- interiorAttributeSet
- Interior attributes. Unused by QD3D.
- faceAttributeSet
- Attributes that affect the face but not the bottom. May be NULL.
- bottomAttributeSet
- Attributes that affect the bottom end cap. May be NULL.
- coneAttributeSet
- Attributes for all parts of the cone. May be NULL.
TQ3CylinderData |
typedef struct TQ3CylinderData {
TQ3Point3D origin;
TQ3Vector3D orientation;
TQ3Vector3D majorRadius;
TQ3Vector3D minorRadius;
float uMin;
float uMax;
float vMin;
float vMax;
TQ3EndCap caps;
TQ3AttributeSet interiorAttributeSet;
TQ3AttributeSet topAttributeSet;
TQ3AttributeSet faceAttributeSet;
TQ3AttributeSet bottomAttributeSet;
TQ3AttributeSet cylinderAttributeSet;
} TQ3CylinderData;
Data describing the state of a cylinder object. The orientation, major radius,
and minor radius vectors need not be orthogonal, though they should be
independent. Ordinarily, the vectors (orientation, major axis, minor axis)
should form a left-handed coordinate system. If they form a left-handed system,
then the cylinder is "inside out", i.e., the front face is inside.
The values uMin, uMax, vMin, and vMax
allow partial cylinders, e.g., a cylinder with a wedge cut out of it.
This feature was not implemented in QuickDraw 3D. See the discussion of
TQ3EllipseData for notes on the interpretation of uMin and
uMax.
- origin
- The center of the base of the cylinder.
- orientation
- Vector from the origin to the center of the opposite end.
- majorRadius
- A vector from the origin to a point on the perimeter of the base.
- minorRadius
- A vector from the origin to a point on the perimeter of the base.
- uMin
- Starting value of the u parameter, which goes around the base counterclockwise. Typically 0.
- uMax
- Ending value of the u parameter, which goes around the base counterclockwise. Typically 1.
- vMin
- Minimum value of the v parameter, which goes from the base to the other end. Typically 0.
- vMax
- Maximum value of the v parameter, which goes from the base to the other end. Typically 1.
- caps
- End cap masks, determining whether the cylinder is closed on one end, the other, or both.
- interiorAttributeSet
- Interior attributes. May be NULL. Unused by QD3D.
- topAttributeSet
- Attributes that affect the top end cap. May be NULL.
- faceAttributeSet
- Attributes that affect the face but not the bottom or top. May be NULL.
- bottomAttributeSet
- Attributes that affect the bottom end cap. May be NULL.
- cylinderAttributeSet
- Attributes for all parts of the cylinder. May be NULL.
TQ3DiskData |
typedef struct TQ3DiskData {
TQ3Point3D origin;
TQ3Vector3D majorRadius;
TQ3Vector3D minorRadius;
float uMin;
float uMax;
float vMin;
float vMax;
TQ3AttributeSet diskAttributeSet;
} TQ3DiskData;
Data describing the state of a disk object (a filled ellipse). The major radius
and minor radius vectors need not be orthogonal, though they should be independent.
The direction of the front face is the cross product of the major and minor axes.
The values uMin, uMax, vMin, and vMax
allow partial disks, e.g., a slice of pie (partial range of u values) or a washer
(partial range of v values). This feature was never implemented in QuickDraw 3D,
although it was planned. See the discussion of TQ3EllipseData for notes
on the interpretation of uMin and uMax.
The u and v limits here do not have anything to do with the uv parametrization used by
shaders.
- origin
- The center of the disk.
- majorRadius
- A vector from the origin to a point on the perimeter of the disk.
- minorRadius
- A vector from the origin to a point on the perimeter of the disk.
- uMin
- Starting value of the u parameter, which goes around the perimeter counterclockwise. Typically 0, must be in the range [0, 1].
- uMax
- Ending value of the u parameter, which goes around the perimeter counterclockwise. Typically 1, must be in the range [0, 1].
- vMin
- Minimum value of the v parameter, which goes from the perimeter to the origin. Typically 0, must be in the range [0, 1].
- vMax
- Maximum value of the v parameter, which goes from the perimeter to the origin. Typically 1, must be in the range [0, 1].
- diskAttributeSet
- Attributes for the disk. May be NULL.
TQ3EllipseData |
typedef struct TQ3EllipseData {
TQ3Point3D origin;
TQ3Vector3D majorRadius;
TQ3Vector3D minorRadius;
float uMin;
float uMax;
TQ3AttributeSet ellipseAttributeSet;
} TQ3EllipseData;
Data describing the state of an ellipse. The major radius and minor radius
vectors need not be orthogonal, though they should be independent.
You can make a partial ellipse by using values other than 0 and 1 for the
uMin and uMax fields. The ellipse travels
counterclockwise from the uMin to the uMax value.
It is permissible for uMin to be greater than uMax.
For example, if uMin = 7/8 and uMax = 1/8, then the
ellipse covers a range of 45 degrees, including the zero angle.
- origin
- Center of the ellipse.
- majorRadius
- A vector from the origin to a point on the curve.
- minorRadius
- Another vector from the origin to a point on the curve.
- uMin
- Starting value of the u parameter. Typically 0.
- uMax
- Ending value of the u parameter. Typically 1.
- ellipseAttributeSet
- Attributes for the ellipse. May be NULL.
TQ3EllipsoidData |
typedef struct TQ3EllipsoidData {
TQ3Point3D origin;
TQ3Vector3D orientation;
TQ3Vector3D majorRadius;
TQ3Vector3D minorRadius;
float uMin;
float uMax;
float vMin;
float vMax;
TQ3EndCap caps;
TQ3AttributeSet interiorAttributeSet;
TQ3AttributeSet ellipsoidAttributeSet;
} TQ3EllipsoidData;
Data describing the state of an ellipsoid. The major axis, minor axis, and
orientation vectors need not be orthogonal, but should be independent, i.e.,
not coplanar.
The ellipsoid can be expressed by a parametric equation
f(u,v) = origin - cos(πv)orientation + sin(πv)(cos(2πu)majorRadius + sin(2πu)minorRadius)
where u and v range from 0 to 1.
The values uMin, uMax, vMin, and vMax
allow partial ellipsoids, e.g., an ellipsoid with a wedge cut out of it.
Partial ellipsoids were not implemented in QuickDraw 3D.
- origin
- Center of the ellipsoid.
- orientation
- A vector from the origin to a point on the ellipsoid.
- majorRadius
- A vector from the origin to a point on the ellipsoid.
- minorRadius
- A vector from the origin to a point on the ellipsoid.
- uMin
- Minimum value of the u parameter, which goes around the perimeter (the ellipse determined by the major and minor axes). Typically 0.
- uMax
- Maximum value of the u parameter. Typically 1.
- vMin
- Minimum value of the v parameter, which goes from the south pole (origin - orientation) to the north pole (origin + orientation). Typically 0.
- vMax
- Minimum value of the v parameter. Typically 1.
- caps
- Style of caps to be used on partial ellipsoids.
- interiorAttributeSet
- Interior attributes, used for end or interior caps. May be NULL.
- ellipsoidAttributeSet
- Attributes for the ellipsoid surface. May be NULL.
TQ3GeneralPolygonContourData |
typedef struct TQ3GeneralPolygonContourData {
TQ3Uns32 numVertices;
TQ3Vertex3D *vertices;
} TQ3GeneralPolygonContourData;
An ordered list of vertices forming a contour of a general polygon.
Used within the TQ3GeneralPolygonData structure.
- numVertices
- Number of vertices. Must be at least 3.
- vertices
- Array of vertices.
TQ3GeneralPolygonData |
typedef struct TQ3GeneralPolygonData {
TQ3Uns32 numContours;
TQ3GeneralPolygonContourData *contours;
TQ3GeneralPolygonShapeHint shapeHint;
TQ3AttributeSet generalPolygonAttributeSet;
} TQ3GeneralPolygonData;
Data describing a general polygon. A general polygon is a closed figure defined by one or more coplanar closed curves called contours. If there are holes, the even-odd rule determines which parts are inside.
- numContours
- Number of contours in the following array. Must be at least 1.
- contours
- Array of contours.
- shapeHint
- Information about the shape of the general polygon, which may be used by the renderer to optimize drawing.
- generalPolygonAttributeSet
- Set of attributes for the polygon. May be NULL.
TQ3LineData |
typedef struct TQ3LineData {
TQ3Vertex3D vertices[2];
TQ3AttributeSet lineAttributeSet;
} TQ3LineData;
Data describing a line.
- vertices
- Array of two vertices, the ends of the line.
- lineAttributeSet
- Set of attributes for the line. May be NULL.
TQ3MarkerData |
typedef struct TQ3MarkerData {
TQ3Point3D location;
TQ3Int32 xOffset;
TQ3Int32 yOffset;
TQ3Bitmap bitmap;
TQ3AttributeSet markerAttributeSet;
} TQ3MarkerData;
Data describing a bitmap marker, a 2-dimensional image drawn on top of a scene at a specified location.
- location
- Location of the marker, in local coordinates.
- xOffset
- Horizontal offset from the
locationto the upper left corner of the marker, in pixels.- yOffset
- Vertical offset from the
locationto the upper left corner of the marker, in pixels.- bitmap
- A bitmap. Each bit corresponds to a pixel in the image.
- markerAttributeSet
- Marker attributes, which can for instance modify the color or transparency of the 1 bits. May be NULL.
TQ3MeshContourData |
typedef struct TQ3MeshContourData {
TQ3Uns32 numVertices;
TQ3Uns32 *vertexIndices;
} TQ3MeshContourData;
Data describing a contour within a mesh face.
Note that a TQ3MeshContourData is an external data structure
for use with the Q3Mesh_Set/Get/EmptyData functions.
In contrast, a TQ3MeshContour is a pointer to an opaque internal
data structure, which is most likely not a TQ3MeshContourData.
This structure is not available in QD3D.
- numVertices
- Number of vertices. Must be at least 3.
- vertexIndices
- Indices of the vertices of the contour.
TQ3MeshCornerData |
typedef struct TQ3MeshCornerData {
TQ3Uns32 numFaces;
TQ3Uns32 *faceIndices;
TQ3AttributeSet cornerAttributeSet;
} TQ3MeshCornerData;
Data describing a corner for a mesh vertex.
Note that a TQ3MeshCornerData is an external data structure
for use with the Q3Mesh_Set/Get/EmptyData functions.
This structure is not available in QD3D.
- numFaces
- Number of faces. Must be at least 1.
- faceIndices
- Indices of the faces.
- cornerAttributeSet
- Set of attributes for the corner. Should not be NULL.
TQ3MeshData |
typedef struct TQ3MeshData {
TQ3Uns32 numVertices;
TQ3MeshVertexData *vertices;
TQ3Uns32 numEdges;
TQ3MeshEdgeData *edges;
TQ3Uns32 numFaces;
TQ3MeshFaceData *faces;
TQ3AttributeSet meshAttributeSet;
} TQ3MeshData;
Data describing a mesh.
Note that a TQ3MeshData is an external data structure
for use with the Q3Mesh_Set/Get/EmptyData functions.
This structure is not available in QD3D.
- numVertices
- Number of vertices in the following array.
- vertices
- Pointer to array of vertices of the mesh.
- numEdges
- Number of edges in the following array. May be 0 if you do not want to specify any edges.
- edges
- Pointer to an array of edges. May be NULL if you also specify 0 for
numEdges.- numFaces
- Number of faces in the mesh.
- faces
- Pointer to an array of faces.
- meshAttributeSet
- Set of attributes for the mesh. May be NULL.
TQ3MeshEdgeData |
typedef struct TQ3MeshEdgeData {
TQ3Uns32 vertexIndices[2];
TQ3AttributeSet edgeAttributeSet;
} TQ3MeshEdgeData;
Data describing an edge within a mesh.
Used within the TQ3MeshData structure.
Note that a TQ3MeshEdgeData is an external data structure
for use with the Q3Mesh_Set/Get/EmptyData functions.
In contrast, a TQ3MeshEdge is a pointer to an opaque internal
data structure, which is most likely not a TQ3MeshEdgeData.
This structure is not available in QD3D.
- vertexIndices
- Indices of the two vertices that are ends of the edge.
- edgeAttributeSet
- Set of attributes for the edge. May be NULL.
TQ3MeshFaceData |
typedef struct TQ3MeshFaceData {
TQ3Uns32 numContours;
TQ3MeshContourData *contours;
TQ3AttributeSet faceAttributeSet;
} TQ3MeshFaceData;
Data describing a face within a mesh.
Note that a TQ3MeshFaceData is an external data structure
for use with the Q3Mesh_Set/Get/EmptyData functions.
In contrast, a TQ3MeshFace is a pointer to an opaque internal
data structure, which is most likely not a TQ3MeshFaceData.
This structure is not available in QD3D.
- numContours
- Number of contours. Must be at least 1.
- contours
- Contours of the face.
- faceAttributeSet
- Set of attributes for the face. May be NULL.
TQ3MeshIterator |
typedef struct TQ3MeshIterator {
void *var1;
void *var2;
void *var3;
struct {
void *field1;
char field2[4];
} var4;
This structure is used for iterating through various parts of a Mesh. You should consider it opaque, because the meanings of the fields are not documented.
TQ3MeshVertexData |
typedef struct TQ3MeshVertexData {
TQ3Point3D point;
TQ3Uns32 numCorners;
TQ3MeshCornerData *corners;
TQ3AttributeSet attributeSet;
} TQ3MeshVertexData;
Data describing a vertex within a mesh.
Note that a TQ3MeshVertexData is an external data structure
for use with the Q3Mesh_Set/Get/EmptyData functions.
In contrast, a TQ3MeshVertex is a pointer to an opaque internal
data structure, which is most likely not a TQ3MeshVertexData.
This structure is not available in QD3D.
- point
- Location of the vertex.
- numCorners
- Number of corners in the following array. May be 0 if you do not want to specify any corners.
- corners
- Pointer to an array of corners. May be NULL if you also specify 0 for
numCorners.- attributeSet
- Attribute set for the vertex.
TQ3NURBCurveData |
typedef struct TQ3NURBCurveData {
TQ3Uns32 order;
TQ3Uns32 numPoints;
TQ3RationalPoint4D *controlPoints;
float *knots;
TQ3AttributeSet curveAttributeSet;
} TQ3NURBCurveData;
Data defining a NURBS curve, a 3-dimensional curve represented by a nonuniform rational B-spline equation.
- order
- The order of the curve, one more than the degree of the polynomials defining the curve. Must be greater than one.
- numPoints
- Number of control points. Must be greater than or equal to the order.
- controlPoints
- Array of rational 4-dimensional control points.
- knots
- Array of knots that define the curve. The number of knots must equal the sum of
orderandnumPoints. The values must be nondecreasing.- curveAttributeSet
- Set of attributes for the curve. May be NULL.
TQ3NURBPatchData |
typedef struct TQ3NURBPatchData {
TQ3Uns32 uOrder;
TQ3Uns32 vOrder;
TQ3Uns32 numRows;
TQ3Uns32 numColumns;
TQ3RationalPoint4D *controlPoints;
float *uKnots;
float *vKnots;
TQ3Uns32 numTrimLoops;
TQ3NURBPatchTrimLoopData *trimLoops;
TQ3AttributeSet patchAttributeSet;
} TQ3NURBPatchData;
Data describing a NURB patch, a surface defined by a ratio of B-spline surfaces.
- uOrder
- Order of the NURB patch in the u parametric direction. The order is one greater than the degree of the polynomial functions involved, and must be greater than one.
- vOrder
- Order of the NURB patch in the v parametric direction. The order is one greater than the degree of the polynomial functions involved, and must be greater than one.
- numRows
- Number of control points in the u parametric equation. Must be greater than 1.
- numColumns
- Number of control points in the v parametric equation. Must be greater than 1.
- controlPoints
- Array of rational 4-dimensional control points. They are listed first in the direction of increasing u and then in the direction of increasing v. The number of control points is
numRowstimesnumColumns.- uKnots
- Array of knots in the u parametric direction. The number of these knots is the sum of
uOrderandnumColumns. The values must be nondecreasing.- vKnots
- Array of knots in the v parametric direction. The number of these knots is the sum of
vOrderandnumRows. The values must be nondecreasing.- numTrimLoops
- Number of trim loops in the following array. Currently this should be 0.
- trimLoops
- Pointer to an array of trim loop structures. Currently this should be NULL.
- patchAttributeSet
- Set of attributes for the patch. May be NULL.
TQ3NURBPatchTrimCurveData |
typedef struct TQ3NURBPatchTrimCurveData {
TQ3Uns32 order;
TQ3Uns32 numPoints;
TQ3RationalPoint3D *controlPoints;
float *knots;
} TQ3NURBPatchTrimCurveData;
Curve that trims a NURB patch. Note that this is similar to TQ3NURBCurveData, but lacks an attribute set.
- order
- The order of the curve, one more than the degree of the polynomials defining the curve. Must be greater than one.
- numPoints
- Number of control points. Must be greater than or equal to the order.
- controlPoints
- Array of rational 4-dimensional control points.
- knots
- Array of knots that define the curve. The number of knots must equal the sum of
orderandnumPoints. The values must be nondecreasing.
TQ3NURBPatchTrimLoopData |
typedef struct TQ3NURBPatchTrimLoopData {
TQ3Uns32 numTrimCurves;
TQ3NURBPatchTrimCurveData *trimCurves;
} TQ3NURBPatchTrimLoopData;
Data describing curves that trim a NURB patch.
- numTrimCurves
- Number of curves in the following array.
- trimCurves
- Pointer to an array of curves.
TQ3PixmapMarkerData |
typedef struct TQ3PixmapMarkerData {
TQ3Point3D position;
TQ3Int32 xOffset;
TQ3Int32 yOffset;
TQ3StoragePixmap pixmap;
TQ3AttributeSet pixmapMarkerAttributeSet;
} TQ3PixmapMarkerData;
Data describing a pixmap marker, a 2-dimensional color image drawn on top of a scene at a specified location.
- position
- Location of the marker, in local coordinates.
- xOffset
- Horizontal offset from the
positionto the upper left corner of the marker, in pixels.- yOffset
- Vertical offset from the
positionto the upper left corner of the marker, in pixels.- pixmap
- A pixmap.
- pixmapMarkerAttributeSet
- A set of attributes for the marker. May be NULL.
TQ3PointData |
typedef struct TQ3PointData {
TQ3Point3D point;
TQ3AttributeSet pointAttributeSet;
} TQ3PointData;
Data describing a point object.
- point
- Location of the point.
- pointAttributeSet
- Set of attributes for the point. May be NULL.
TQ3PolyLineData |
typedef struct TQ3PolyLineData {
TQ3Uns32 numVertices;
TQ3Vertex3D *vertices;
TQ3AttributeSet *segmentAttributeSet;
TQ3AttributeSet polyLineAttributeSet;
} TQ3PolyLineData;
Data describing a connected but not closed curve made up of several straight line segments.
- numVertices
- Number of vertices of the curve (one more than the number of line segments). Must be at least 2.
- vertices
- Pointer to an array of vertices.
- segmentAttributeSet
- Pointer to an array of attribute sets, one for each segment. If you do not want to assign attributes to any segment, this pointer may be NULL.
- polyLineAttributeSet
- Set of attributes for the whole curve. May be NULL.
TQ3PolygonData |
typedef struct TQ3PolygonData {
TQ3Uns32 numVertices;
TQ3Vertex3D *vertices;
TQ3AttributeSet polygonAttributeSet;
} TQ3PolygonData;
Data describing a simple convex polygon.
- numVertices
- Number of vertices. Must be at least 3.
- vertices
- Pointer to an array of vertices.
- polygonAttributeSet
- Set of attributes for the polygon. May be NULL.
TQ3PolyhedronData |
typedef struct TQ3PolyhedronData {
TQ3Uns32 numVertices;
TQ3Vertex3D *vertices;
TQ3Uns32 numEdges;
TQ3PolyhedronEdgeData *edges;
TQ3Uns32 numTriangles;
TQ3PolyhedronTriangleData *triangles;
TQ3AttributeSet polyhedronAttributeSet;
} TQ3PolyhedronData;
Data describing a polyhedron.
- numVertices
- Number of vertices in the following array.
- vertices
- Pointer to array of vertices of the polyhedron.
- numEdges
- Number of edges in the following array. May be 0 if you do not want to specify any edges.
- edges
- Pointer to an array of edges. May be NULL if you also specify 0 for
numEdges.- numTriangles
- Number of triangles (faces) in the polygon.
- triangles
- Pointer to an array of triangles.
- polyhedronAttributeSet
- Set of attributes for the polyhedron. May be NULL.
TQ3PolyhedronEdgeData |
typedef struct TQ3PolyhedronEdgeData {
TQ3Uns32 vertexIndices[2];
TQ3Uns32 triangleIndices[2];
TQ3AttributeSet edgeAttributeSet;
} TQ3PolyhedronEdgeData;
Data describing an edge within a polyhedron.
- vertexIndices
- Indices of the two vertices that are ends of the edge.
- triangleIndices
- Indices of the two triangles that contain the edge.
- edgeAttributeSet
- Set of attributes for the edge. May be NULL.
TQ3PolyhedronTriangleData |
typedef struct TQ3PolyhedronTriangleData {
TQ3Uns32 vertexIndices[3];
TQ3PolyhedronEdge edgeFlag;
TQ3AttributeSet triangleAttributeSet;
} TQ3PolyhedronTriangleData;
Data describing a triangle within a polyhedron.
- vertexIndices
- Indices of the 3 vertices of the triangle.
- edgeFlag
- Flags indicating which edges of the triangle should be rendered. See
TQ3PolyhedronEdgeMasks.- triangleAttributeSet
- Set of attributes for the triangle. May be NULL.
TQ3TorusData |
typedef struct TQ3TorusData {
TQ3Point3D origin;
TQ3Vector3D orientation;
TQ3Vector3D majorRadius;
TQ3Vector3D minorRadius;
float ratio;
float uMin;
float uMax;
float vMin;
float vMax;
TQ3EndCap caps;
TQ3AttributeSet interiorAttributeSet;
TQ3AttributeSet torusAttributeSet;
} TQ3TorusData;
Data describing a generalized torus. A torus is a surface formed by rotating an
ellipse about an axis that is in the same plane as the ellipse but does not pass
through the ellipse.
To express the torus as a parametric equation, we first define the
elliptical central axis by the equation
axis(u) = cos(2πu) majorRadius + sin(2πu) minorRadius
where majorRadius and minorRadius are independent vectors, and u varies
from 0 to 1. Then we define the torus surface by
f(u,v) = origin + axis(u) - sin(2πv) orientation -
(cos(2πv) * ratio * |orientation| / |axis(u)|) axis(u)
where v also varies from 0 to 1 and vertical bars indicate length of a
vector.
The kind of torus usually encountered in elementary mathematics, with circular
cross sections, would be one where the orientation, majorRadius,
and minorRadius vectors are mutually orthogonal, where
majorRadius and minorRadius have the same length, and where
ratio is 1.
The values uMin, uMax, vMin, and
vMax allow one to create partial tori, e.g., a torus with
a wedge cut out of it. QuickDraw 3D did not implement this feature.
- origin
- Center of rotation.
- orientation
- Vector whose direction is the axis of rotation, and whose length is the length of the radius of the cross-sectional ellipse in the direction of the axis of rotation.
- majorRadius
- Vector from the origin to the center of the ellipse.
- minorRadius
- Vector from the origin to the center of a different cross-sectional ellipse.
- ratio
- The ratio between the radius of the cross-sectional ellipse in the direction of
majorRadius, and the length oforientation.- uMin
- Minimum value in the u parametric direction (the long way around.) Normally 0, must be in interval [0, 1].
- uMax
- Maximum value in the u parametric direction (the long way around.) Normally 1, must be in interval [0, 1].
- vMin
- Minimum value in the v parametric direction (the short way around.) Normally 0, must be in interval [0, 1].
- vMax
- Maximum value in the v parametric direction (the short way around.) Normally 1, must be in interval [0, 1].
- caps
- Cap style. Should be kQ3EndCapNone.
- interiorAttributeSet
- Interior attribute set. Not currently used.
- torusAttributeSet
- Overall attribute set.
TQ3TriGridData |
typedef struct TQ3TriGridData {
TQ3Uns32 numRows;
TQ3Uns32 numColumns;
TQ3Vertex3D *vertices;
TQ3AttributeSet *facetAttributeSet;
TQ3AttributeSet triGridAttributeSet;
} TQ3TriGridData;
Data describing a TriGrid object. A TriGrid is defined by a grid of points in 3-dimensional space. Each set of 4 adjacent points (in the mth and (m+1)st row and nth and (n+1)st column) defines a quadrilateral that can be subdivided into triangles in 2 natural ways. This subdivision is done in an alternating way, such that the vertex in the first row and first column belongs to two triangles.
- numRows
- Number of rows of vertices. Should be at least 2.
- numColumns
- Number of columns of vertices. Should be at least 2.
- vertices
- Pointer to an array of vertices, listed in rectangular order, first by increasing columns and then by increasing rows. The number of vertices should be
numRowstimesnumColumns.- facetAttributeSet
- Pointer to an array of triangle attributes. May be NULL, but otherwise should point to an array of 2×(
numRows-1)×(numColumns-1) attribute sets.- triGridAttributeSet
- Set of attributes for the whole TriGrid object. May be NULL.
TQ3TriMeshAttributeData |
typedef struct TQ3TriMeshAttributeData {
TQ3AttributeType attributeType;
void *data;
char *attributeUseArray;
} TQ3TriMeshAttributeData;
A structure holding an array of attribute data of a particular type.
- attributeType
- Type of the attribute.
- data
- Pointer to an array of attribute data. The number of members in the array is determined by context in the enclosing
TQ3TriMeshDatastructure; for instance, if these are vertex attributes, the number of members is the number of vertices. The size of each member depends on the attribute type.- attributeUseArray
- For non-custom attribute types, this must be NULL. For custom attribute types, it can point to an array of 1-byte 0s and 1s, with 1s indicating which items have the custom attribute.
TQ3TriMeshData |
typedef struct TQ3TriMeshData {
TQ3AttributeSet triMeshAttributeSet;
TQ3Uns32 numTriangles;
TQ3TriMeshTriangleData *triangles;
TQ3Uns32 numTriangleAttributeTypes;
TQ3TriMeshAttributeData *triangleAttributeTypes;
TQ3Uns32 numEdges;
TQ3TriMeshEdgeData *edges;
TQ3Uns32 numEdgeAttributeTypes;
TQ3TriMeshAttributeData *edgeAttributeTypes;
TQ3Uns32 numPoints;
TQ3Point3D *points;
TQ3Uns32 numVertexAttributeTypes;
TQ3TriMeshAttributeData *vertexAttributeTypes;
TQ3BoundingBox bBox;
} TQ3TriMeshData;
Structure describing a TriMesh object, which is an object composed of vertices, edges, and triangular faces. The main difference between a TriMesh and a Polyhedron is that attribute data for vertices, edges, and faces are not stored in attribute sets, but in arrays of attribute data. This is normally more efficient, so long as you are going to be assigning an attribute to every vertex, or every edge, or every face.
- triMeshAttributeSet
- Set of attributes for the whole object. May be NULL.
- numTriangles
- Number of triangles in the following array.
- triangles
- Pointer to an array of triangle data.
- numTriangleAttributeTypes
- Number of triangle attribute types listed in the following array.
- triangleAttributeTypes
- Pointer to an array of attribute data for triangles (faces). May be NULL, if
numTriangleAttributeTypesis 0.- numEdges
- Number of edges in the following array.
- edges
- Pointer to an array of edge data. If you do not wish to specify any edges, you can set this to NULL, and set
numEdgesto 0.- numEdgeAttributeTypes
- Number of edge attribute types in the following array.
- edgeAttributeTypes
- Pointer to an array of edge attribute types. May be NULL, provided that
numEdgeAttributeTypesis 0.- numPoints
- Number of points (vertices).
- points
- Pointer to an array of points.
- numVertexAttributeTypes
- Number of vertex attribute types in the following array.
- vertexAttributeTypes
- Pointer to an array of vertex attribute data. May be NULL, so long as
numVertexAttributeTypesis 0.- bBox
- Bounding box of the TriMesh.
TQ3TriMeshEdgeData |
typedef struct TQ3TriMeshEdgeData {
TQ3Uns32 pointIndices[2];
TQ3Uns32 triangleIndices[2];
} TQ3TriMeshEdgeData;
Data defining an edge within a TriMesh.
- pointIndices
- Array of 2 indices into the TriMesh array of points, the ends of the edge.
- triangleIndices
- Array of 2 indices into the TriMesh array of triangles, the triangles containing the edge.
TQ3TriMeshTriangleData |
typedef struct TQ3TriMeshTriangleData {
TQ3Uns32 pointIndices[3];
} TQ3TriMeshTriangleData;
Data defining a triangle within a TriMesh.
- pointIndices
- Array of 3 indices into the TriMesh array of points.
TQ3TriangleData |
typedef struct TQ3TriangleData {
TQ3Vertex3D vertices[3];
TQ3AttributeSet triangleAttributeSet;
} TQ3TriangleData;
Data defining a single triangle.
- vertices
- The 3 vertices of the triangle.
- triangleAttributeSet
- Set of attributes for the triangle. May be NULL.
© 1999-2008 Quesa Developers (Last Updated 5/10/2008)