PointLightBase.ConstantAttenuation Property
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.
Gets or sets a constant value by which the intensity of the light diminishes over distance.
public:
property double ConstantAttenuation { double get(); void set(double value); };
public double ConstantAttenuation { get; set; }
member this.ConstantAttenuation : double with get, set
Public Property ConstantAttenuation As Double
Property Value
Double by which the intensity of the light diminishes over distance.
Examples
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;
}
Public Sub New()
For i As Integer = 0 To nbrDirLights - 1
_dirLight(i) = New DirectionalLight()
_dirLight(i).Color = _dirLightColor(i)
_dirLight(i).Direction = _dirVector(i)
Next i
_ptLight.Position = New Point3D(-3, -7, 10)
_ptLight.Color = System.Windows.Media.Brushes.White.Color
_ptLight.Range = 15.0
_ptLight.ConstantAttenuation = 3.0
End Sub
Remarks
Dependency Property Information
Identifier field | ConstantAttenuationProperty |
Metadata properties set to true |
None |
Applies to
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.