8 Data Structures

8 Light Data Structure

You use a light data structure to get or set basic information about a light source of any kind. A light data structure is defined by the TQ3LightData data type.

typedef struct TQ3LightData {
 TQ3Boolean         isOn;
 float         brightness;
 TQ3ColorRGB         color;
} TQ3LightData;
isOn A Boolean value that indicates whether the light source is active (kQ3True) or inactive (kQ3False).
brightness The brightness or intensity of the light source. The value in this field is a floating-point number in the range 0.0 to 1.0, inclusive. Some renderers may allow you to specify overbright lights (where the value in this field is greater than 1.0) or lights with negative brightness (where the value in this field is less than 0.0); the effects produced by out-of-range brightness values are renderer-specific.
color The color of the light emitted by a light source.

3D Graphics Programming with QuickDraw 3D - 16 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker