[]
        
(Showing Draft Content)

C1.Util.DX.Matrix4x4.Shadow

Shadow Method

Shadow(Vector3, Vector3, float)

Creates a matrix that flattens geometry into a specified plane as if casting a shadow from a specified light source.

Declaration
public static Matrix4x4 Shadow(Vector3 lightDirection, Vector3 normal, float d)
Public Shared Function Shadow(lightDirection As Vector3, normal As Vector3, d As Single) As Matrix4x4
Parameters
Type Name Description
Vector3 lightDirection

The direction from which the light that will cast the shadow is coming.

Vector3 normal

The plane's normal vector.

float d

The plane's distance from the origin along its normal vector.

Returns
Type Description
Matrix4x4

A new matrix that can be used to flatten geometry onto the specified plane from the specified direction.