PointLightBase.Range Propiedad

Definición

Obtiene o establece la distancia a partir de la cual la luz no tiene ningún efecto.Gets or sets the distance beyond which the light has no effect.

public:
 property double Range { double get(); void set(double value); };
public double Range { get; set; }
member this.Range : double with get, set
Public Property Range As Double

Valor de propiedad

Valor de tipo Double que especifica la distancia a partir de la cual la luz ya no se proyecta.Double that specifies the distance beyond which the light has no effect.

Ejemplos

En el ejemplo siguiente se establece esta propiedad en el código.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

Comentarios

Información sobre propiedades de dependenciaDependency Property Information

Campo de identificadorIdentifier field RangeProperty
Propiedades de metadatos establecidas en trueMetadata properties set to true NoneNone

Se aplica a