DirectionalLight Constructors

Definition

Constructs a light that projects its effect along a direction specified by a Vector3D.

Overloads

DirectionalLight()

Creates an instance of a light that projects its effect in a specified direction.

DirectionalLight(Color, Vector3D)

Creates an instance of a light that projects its effect along a specified Vector3D with a specified color.

DirectionalLight()

Creates an instance of a light that projects its effect in a specified direction.

public:
 DirectionalLight();
public DirectionalLight ();
Public Sub New ()

Examples

The following code excerpt creates a DirectionalLight.

<DirectionalLight Color="#FFFFFFFF" Direction="-3,-4,-5" />

Remarks

This constructor creates an instance of a white light projected along a Vector3D of value (0,0,-1).

DirectionalLights have a direction, but no position in space.

Applies to

DirectionalLight(Color, Vector3D)

Creates an instance of a light that projects its effect along a specified Vector3D with a specified color.

public:
 DirectionalLight(System::Windows::Media::Color diffuseColor, System::Windows::Media::Media3D::Vector3D direction);
public DirectionalLight (System.Windows.Media.Color diffuseColor, System.Windows.Media.Media3D.Vector3D direction);
new System.Windows.Media.Media3D.DirectionalLight : System.Windows.Media.Color * System.Windows.Media.Media3D.Vector3D -> System.Windows.Media.Media3D.DirectionalLight
Public Sub New (diffuseColor As Color, direction As Vector3D)

Parameters

diffuseColor
Color

Diffuse color of the new light.

direction
Vector3D

Direction of the new light.

Examples

The following code excerpt creates a DirectionalLight.

<DirectionalLight Color="#FFFFFFFF" Direction="-3,-4,-5" />

Remarks

DirectionalLights have a direction, but no position in space.

Applies to