PointLightBase.ConstantAttenuation 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置光强度按其随距离减弱的常数值。
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
属性值
光强度按其随距离减弱的双精度值。
示例
以下示例在代码中设置此属性。
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
注解
依赖项属性信息
标识符字段 | ConstantAttenuationProperty |
元数据属性设置为 true |
无 |