DistantLight Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An infinitely large distant light source that emits light in a single direction. For example, a distant light could be used to represent sunlight.
public ref class DistantLight sealed : CompositionLight
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DistantLight final : CompositionLight
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
class DistantLight final : CompositionLight
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class DistantLight : CompositionLight
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public sealed class DistantLight : CompositionLight
Public NotInheritable Class DistantLight
Inherits CompositionLight
- Inheritance
- Attributes
Examples
_distantLight = _compositor.CreateDistantLight();
_distantLight.Color = Colors.Yellow;
_distantLight.Direction = new Vector3(0,-1, 0);
_distantLight.CoordinateSpace = root;
_distantLight.Targets.Add(root);
Remarks
DistantLights and SpotLights support direction.
DistantLight is one of the four light types derived from CompositionLight.
Light | Description | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Note A Visual cannot be targeted by more than two non-ambient lights (PointLight, SpotLight or DistantLight). Properties
Methods
Applies toSee also |