Light.Color 속성

정의

조명의 색을 가져오거나 설정합니다.

public:
 property System::Windows::Media::Color Color { System::Windows::Media::Color get(); void set(System::Windows::Media::Color value); };
public System.Windows.Media.Color Color { get; set; }
member this.Color : System.Windows.Media.Color with get, set
Public Property Color As Color

속성 값

Color

조명의 색입니다.

예제

다음 다양 한 Light3D 개체에 적용 하는이 속성을 표시 합니다.

<ModelVisual3D.Content>
    <AmbientLight Color="#333333" />
</ModelVisual3D.Content>
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

적용 대상