Microsoft DirectX 9.0 SDK Update (October 2004)

Light Class

Language:

Note: This documentation is preliminary and is subject to change.

Defines a set of lighting properties.

Definition

Visual Basic .NET NotInheritable Public Class Light
   Inherits Object 
C# public sealed class Light : Object
Managed C++ public __gc __sealed class Light  : public Object
JScript .NET public class Light extends Object

Members Table

Method Description
FromLight Creates a new light based on an existing light.
Light Creates a new instance of the Light class.
ToString Obtains a string representation of the current instance.
Update Updates the settings for the current Light object.
Property Description
Ambient Retrieves or sets the ambient color emitted by the light.

This member is a Color Leave Site structure.
AmbientColor Retrieves or sets the ambient color emitted by the light.

This member is a ColorValue structure.
Attenuation0 Retrieves or sets a value that specifies how light intensity changes over distance.
Attenuation1 Retrieves or sets a value that specifies how light intensity changes over distance.
Attenuation2 Retrieves or sets a value that specifies how light intensity changes over distance.
Diffuse Retrieves or sets the diffuse color emitted by the light.

This member is a Color Leave Site structure.
DiffuseColor Retrieves or sets the diffuse color emitted by the light.

This member is a ColorValue structure.
Direction Retrieves or sets the direction in which the light is pointing in world space, as specified by a Vector3 structure.
Enabled Retrieves or sets a Boolean value that enables or disables a set of lighting parameters within a device.
Falloff Retrieves or sets the decrease in illumination between a spotlight's inner cone (the angle specified by InnerConeAngle) and the outer edge of the outer cone (the angle specified by OuterConeAngle).
InnerConeAngle Retrieves or sets the angle, in radians, of a spotlight's inner cone; that is, the fully illuminated spotlight cone.
OuterConeAngle Retrieves or sets the angle, in radians, that defines the outer edge of a spotlight's outer cone.
Position Retrieves or sets the position of the light in world space, as specified by a Vector3 structure.
Range Retrieves or sets the distance beyond which the light has no effect.
Specular Retrieves or sets the specular color emitted by the light.

This member is a Color Leave Site structure.
SpecularColor Retrieves or sets the specular color emitted by the light.

This member is a ColorValue structure.
Type Retrieves or sets the type of the light source.
XDirection Retrieves or sets an X-axis value that indicates the direction in which the light points.
XPosition Retrieves or sets an X-coordinate value that indicates the position of the light.
YDirection Retrieves or sets a Y-axis value that indicates the direction of the light.
YPosition Retrieves or sets a Y-coordinate value that indicates the position of the light.
ZDirection Retrieves or sets a Z-axis value that indicates the direction of the light.
ZPosition Retrieves or sets a Z-coordinate value that indicates the position of the light.

Inheritance Hierarchy

Object Leave Site
Light

Remarks

Light properties are not updated on the device until either Light.Update is called to commit the changes or Light.Enabled is set to true.

Class Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3D (microsoft.directx.direct3d.dll)
Strong Name Microsoft.DirectX.Direct3D,  Version=1.0.2902.0,  Culture=neutral,  PublicKeyToken=31bf3856ad364e35

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center