DistantLight 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
無限大型遠距光源,會以單一方向發出光線。 例如,遠距光線可用來代表 S。
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
- 繼承
- 屬性
範例
_distantLight = _compositor.CreateDistantLight();
_distantLight.Color = Colors.Yellow;
_distantLight.Direction = new Vector3(0,-1, 0);
_distantLight.CoordinateSpace = root;
_distantLight.Targets.Add(root);
備註
DistantLight和 SpotLight支援方向。
DistantLight 是衍生自 CompositionLight的四種光線類型之一。