3D Graphics Programming with QuickDraw 3D
QuickDraw3D supports one color space, the RGB color space defined by three color component values (one each for red, green, and blue). The RGB color space can be visualized as a cube, as in Figure 21-1, with corners of black, the three primary colors (red, green, and blue), the three secondary colors (cyan, magenta, and yellow), and white. See also Color Plate 2 at the front of this book.
You specify a single color in the RGB color space by filling in a structure of type TQ3ColorRGB
:
typedef struct TQ3ColorRGB { float r; /*red component*/ float g; /*green component*/ float b; /*blue component*/ } TQ3ColorRGB;The QuickDraw3D Color utilities all operate on structures of type
TQ3ColorRGB
. Each field in an TQ3ColorRGB
structure should contain a value in the range 0.0 to 1.0, inclusive.
Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker