ConstantAttenuation Property
Collapse the table of content
Expand the table of content

PointLightBase.ConstantAttenuation Property

 

Gets or sets a constant value by which the intensity of the light diminishes over distance.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public double ConstantAttenuation { get; set; }

Property Value

Type: System.Double

Double by which the intensity of the light diminishes over distance.

Identifier field

ConstantAttenuationProperty

Metadata properties set to true

None

The following example sets this property in code.

public MyLights()
{
    for (int i = 0; i < nbrDirLights; i++)
    {
        _dirLight[i] = new DirectionalLight();
        _dirLight[i].Color = _dirLightColor[i];
        _dirLight[i].Direction = _dirVector[i];
    }

    _ptLight.Position = new Point3D(-3, -7, 10);
    _ptLight.Color = System.Windows.Media.Brushes.White.Color;
    _ptLight.Range = 15.0;
    _ptLight.ConstantAttenuation = 3.0;
}

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft