Vectors
QuickDraw 3D 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 theTQ3Vector2D
andTQ3Vector3D
data types.
typedef struct TQ3Vector2D { float x; float y; } TQ3Vector2D; typedef struct TQ3Vector3D { float x; float y; float z; } TQ3Vector3D;
Field Description
x
- The x scalar component of a vector.
y
- The y scalar component of a vector.
z
- The z scalar component of a vector.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help