Managing Point Lights
QuickDraw 3D provides routines that you can use to create and edit point lights.
Q3PointLight_New
You can use the
Q3PointLight_New
function to create a new point light.
TQ3LightObject Q3PointLight_New (
const TQ3PointLightData *pointLightData);
-
pointLightData
-
A pointer to a point light data structure.
DESCRIPTION
The
Q3PointLight_New
function returns, as its function result, a new point light having the characteristics specified by the
pointLightData
parameter.
Q3PointLight_GetCastShadowsState
You can use the
Q3PointLight_GetCastShadowsState
function to get the shadow-casting state of a point light.
TQ3Status Q3PointLight_GetCastShadowsState (
TQ3LightObject light,
TQ3Boolean *castsShadows);
-
light
-
A point light object.
-
castsShadows
-
On exit, a Boolean value that indicates whether the specified light casts shadows (
kQ3True
) or does not cast shadows (
kQ3False
).
DESCRIPTION
The
Q3PointLight_GetCastShadowsState
function returns, in the
castsShadows
parameter, a Boolean value that indicates whether the light specified by the
light
parameter casts shadows (
kQ3True
) or does not cast shadows (
kQ3False
).
Q3PointLight_SetCastShadowsState
You can use the
Q3PointLight_SetCastShadowsState
function to set the shadow-casting state of a point light.
TQ3Status Q3PointLight_SetCastShadowsState (
TQ3LightObject light,
TQ3Boolean castsShadows);
-
light
-
A point light object.
-
castsShadows
-
A Boolean value that indicates whether the specified light casts shadows (
kQ3True
) or does not cast shadows (
kQ3False
).
DESCRIPTION
The
Q3PointLight_SetCastShadowsState
function sets the shadow-casting state of the point light specified by the
light
parameter to the Boolean value specified in the
castsShadows
parameter.
Q3PointLight_GetAttenuation
You can use the
Q3PointLight_GetAttenuation
function to get the attenuation of a point light.
TQ3Status Q3PointLight_GetAttenuation (
TQ3LightObject light,
TQ3AttenuationType *attenuation);
-
light
-
A point light object.
-
attenuation
-
On exit, the type of attenuation of the light. See
"Light Attenuation Values"
for a description of the constants that can be returned in this parameter.
DESCRIPTION
The
Q3PointLight_GetAttenuation
function returns, in the
attenuation
parameter, the current attenuation value of the point light specified by the
light
parameter.
Q3PointLight_SetAttenuation
You can use the
Q3PointLight_SetAttenuation
function to set the attenuation of a point light.
TQ3Status Q3PointLight_SetAttenuation (
TQ3LightObject light,
TQ3AttenuationType attenuation);
-
light
-
A point light object.
-
attenuation
-
The desired type of attenuation of the light. See
"Light Attenuation Values"
for a description of the constants that can be passed in this parameter.
DESCRIPTION
The
Q3PointLight_SetAttenuation
function sets the attenuation value of the point light specified by the
light
parameter to the value passed in the
attenuation
parameter.
Q3PointLight_GetLocation
You can use the
Q3PointLight_GetLocation
function to get the location of a point light.
TQ3Status Q3PointLight_GetLocation (
TQ3LightObject light,
TQ3Point3D *location);
-
light
-
A point light object.
-
location
-
On exit, the location of the point light, in world coordinates.
DESCRIPTION
The
Q3PointLight_GetLocation
function returns, in the
location
parameter, the current location of the point light specified by the
light
parameter.
Q3PointLight_SetLocation
You can use the
Q3PointLight_SetLocation
function to set the location of a point light.
TQ3Status Q3PointLight_SetLocation (
TQ3LightObject light,
const TQ3Point3D *location);
-
light
-
A point light object.
-
location
-
The desired location of the point light, in world coordinates.
DESCRIPTION
The
Q3PointLight_SetLocation
function sets the location of the point light specified by the
light
parameter to the value passed in the
location
parameter.
Q3PointLight_GetData
You can use the
Q3PointLight_GetData
function to get the data that defines a point light.
TQ3Status Q3PointLight_GetData (
TQ3LightObject light,
TQ3PointLightData *pointLightData);
-
light
-
A point light object.
-
pointLightData
-
On exit, a pointer to a point light data structure.
DESCRIPTION
The
Q3PointLight_GetData
function returns, through the
pointLightData
parameter, information about the point light specified by the
light
parameter. See
"Point Light Data Structure"
for a description of a point light data structure.
Q3PointLight_SetData
You can use the
Q3PointLight_SetData
function to set the data that defines a point light.
TQ3Status Q3PointLight_SetData (
TQ3LightObject light,
const TQ3PointLightData *pointLightData);
-
light
-
A point light object.
-
pointLightData
-
A pointer to a point light data structure.
DESCRIPTION
The
Q3PointLight_SetData
function sets the data associated with the point light specified by the
light
parameter to the data specified by the
pointLightData
parameter.
© 1997 Apple Computer, Inc.