DirectionalLight Constructors
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.
Constructs a light that projects its effect along a direction specified by a Vector3D.
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. |
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
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
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
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: