PointLight PointLight PointLight PointLight Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
A point source of light that emanates light in all directions.

public : sealed class PointLight : CompositionLight, IPointLight, IPointLight2public sealed class PointLight : CompositionLight, IPointLight, IPointLight2Public NotInheritable Class PointLight Inherits CompositionLight Implements IPointLight, IPointLight2// This API is not available in Javascript.
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Inherited Members

Inherited methods

Inherited properties

Remarks

A PointLight gives off light equally in all directions.

PointLight is one of the four light types derived from CompositionLight.

LightDescription
AmbientLight A light source that emits non directional light that appears to have been reflected by everything in the scene.
DistantLight An infinitely large distant light source that emits light in a single direction.
PointLight A point source of light that emits light in all directions.
SpotLight A light source that emits inner and outer cones of light.
Note

A Visual cannot be targeted by more than two non-ambient lights (PointLight, SpotLight or DistantLight).

Properties

Color Color Color Color

Color of the light.

public : Color Color { get; set; }public Color Color { get; set; }Public ReadWrite Property Color As Color// This API is not available in Javascript.
Value
Color Color Color Color

Color of the light.

Examples


_pointLight.Color = Colors.LightPink;   

ConstantAttenuation ConstantAttenuation ConstantAttenuation ConstantAttenuation

The constant coefficient in the light's attenuation equation. Controls light intensity.

public : float ConstantAttenuation { get; set; }public float ConstantAttenuation { get; set; }Public ReadWrite Property ConstantAttenuation As float// This API is not available in Javascript.
Value
float float float float

The constant coefficient in the light's attenuation equation. Controls light intensity. Range is from 0 to infinity.

Examples


_pointLight.ConstantAttenuation =1; 

Remarks

The PointLight.ConstantAttenuation property is part of the attenuation equation which also includes PointLight.LinearAttenuation and PointLight.QuadraticAttenuation:

1/(Constant+Linear*(Distance/100)+Quadratic*(Distance/100)(Distance/100))

See Also

CoordinateSpace CoordinateSpace CoordinateSpace CoordinateSpace

The Visual used to determine the light's offset. The light's offset property is relative to this Visual's coordinate space. PointLight.CoordinateSpace is a required property. If PointLight.CoordinateSpace is not set, the PointLight will not render.

public : Visual CoordinateSpace { get; set; }public Visual CoordinateSpace { get; set; }Public ReadWrite Property CoordinateSpace As Visual// This API is not available in Javascript.
Value
Visual Visual Visual Visual

The Visual used to determine the light's offset.

Examples


_pointLight.CoordinateSpace = root;  

Remarks

PointLight.Offset is relative to PointLight.CoordinateSpace . Every Visual has an implicit 3D coordinate space, defined in this way:

X-axis runs from the left edge to the right edge of the visual.  Y-axis runs from the top of the visual to the bottom.  Z-axis is perpandicular to the visual.

X direction is from left to right. Y direction is from top to bottom. Z direction is point out of the plane. The original point of this coordinate is the upper-left corner of the visual, and the unit is DIP. A light's offset is defined in this coordinate.

See Also

Intensity Intensity Intensity Intensity

Prerelease. Gets or sets the intensity of the light.

public : float Intensity { get; set; }public float Intensity { get; set; }Public ReadWrite Property Intensity As float// This API is not available in Javascript.
Value
float float float float

The intensity of the light.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

LinearAttenuation LinearAttenuation LinearAttenuation LinearAttenuation

The linear coefficient in the light's attenuation equation that determines how the light falls-off with distance.

public : float LinearAttenuation { get; set; }public float LinearAttenuation { get; set; }Public ReadWrite Property LinearAttenuation As float// This API is not available in Javascript.
Value
float float float float

The linear coefficient in the light's attenuation equation that determines how the light falls-off with distance. Range is from 0 to infinity.

Examples


_pointLight.LinearAttenuation = .14F; 

Remarks

The PointLight.LinearAttenuation property is part of the attenuation equation which also contains PointLight.ConstantAttenuation and PointLight.QuadraticAttenuation:

1/(Constant+Linear*(Distance/100)+Quadratic*(Distance/100)*(Distance/100))

See Also

Offset Offset Offset Offset

Offset of the light source relative to its coordinate space Visual.

public : Vector3 Offset { get; set; }public Vector3 Offset { get; set; }Public ReadWrite Property Offset As Vector3// This API is not available in Javascript.
Value
Vector3 Vector3 Vector3 Vector3

Offset of the light source relative to its coordinate space Visual.

QuadraticAttenuation QuadraticAttenuation QuadraticAttenuation QuadraticAttenuation

The quadratic portion of the attenuation equation that determines how the light falls off with distance.

public : float QuadraticAttenuation { get; set; }public float QuadraticAttenuation { get; set; }Public ReadWrite Property QuadraticAttenuation As float// This API is not available in Javascript.
Value
float float float float

The quadratic portion of the attenuation equation that determines how the light falls off with distance. Controls light intensity falloff based on distance squared. Range is from 0 to infinity.

Examples


_pointLight.QuadraticAttenuation = .0007F; 

Remarks

The PointLight.QuadraticAttenuation property is part of the attenuation equation which also includes PointLight.LinearAttenuation and PointLight.ConstantAttenuation:

1/(Constant+Linear*(Distance/100)+Quadratic*(Distance/100)*(Distance/100))

See Also

See Also