

4 Data Structures
4 Vectors
QuickDraw3D defines two- and three-dimensional vectors in the usual way, as pairs and triples of floating-point numbers. Vectors are defined by data types distinct from those that define points primarily for conceptual clarity and for enforcing the correct usage of vectors in mathematical routines. Vectors are defined by the TQ3Vector2D
and TQ3Vector3D
data types.
typedef struct TQ3Vector2D {
float x;
float y;
} TQ3Vector2D;
typedef struct TQ3Vector3D {
float x;
float y;
float z;
} TQ3Vector3D;
x
The x scalar component of a vector.
y
The y scalar component of a vector.
z
The z scalar component of a vector.
3D Graphics Programming with QuickDraw 3D - 21 OCT 1995© Apple Computer, Inc.


Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker