Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 4 - Geometric Objects / Geometric Objects Reference
Data Structures


Rational Points

QuickDraw 3D defines three- and four-dimensional rational points as pairs and triples of floating-point numbers, together with a floating-point weight. You'll use the TQ3RationalPoint4D data type for defining control points of rational surfaces and solids. The TQ3RationalPoint4D data type represents homogeneous points in four-dimensional space. To get the equivalent three-dimensional point, divide the point's x, y, and z components by the w component.

typedef struct TQ3RationalPoint3D {
   float       x;
   float       y;
   float       w;
} TQ3RationalPoint3D;
typedef struct TQ3RationalPoint4D {
   float       x;
   float       y;
   float       z;
   float       w;
} TQ3RationalPoint4D;
Field Description
x
The x coordinate (abscissa) of a rational point.
y
The y coordinate (ordinate) of a rational point.
z
The z coordinate of a rational point.
w
The weight of a rational point.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help