Class GorgonDirectionalLight
Directional light properties for passing to a GPU lighting shader.
Inherited Members
Namespace: Gorgon.Renderers.Lights
Assembly: Gorgon.Graphics.Core.dll
Syntax
public sealed class GorgonDirectionalLight : GorgonLightCommon, IGorgonNamedObject, IEquatable<GorgonDirectionalLight>
Constructors
| Edit this page View SourceGorgonDirectionalLight(GorgonDirectionalLight, string)
Initializes a new instance of the GorgonDirectionalLight class.
Declaration
public GorgonDirectionalLight(GorgonDirectionalLight copy, string newName = null)
Parameters
Type | Name | Description |
---|---|---|
GorgonDirectionalLight | copy | The light data to copy. |
string | newName | [Optional] The new name for the light. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
GorgonDirectionalLight(string)
Initializes a new instance of the GorgonDirectionalLight class.
Declaration
public GorgonDirectionalLight(string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | [Optional] The name of the light. |
Properties
| Edit this page View SourceLightDirection
Property to set or return the direction of the light for directional lighting.
Declaration
public Vector3 LightDirection { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
| Edit this page View SourceLightType
Property to set or return the type of light to render.
Declaration
public override LightType LightType { get; }
Property Value
Type | Description |
---|---|
LightType |
Overrides
Methods
| Edit this page View SourceEquals(GorgonDirectionalLight)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(GorgonDirectionalLight other)
Parameters
Type | Name | Description |
---|---|---|
GorgonDirectionalLight | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool |
true
True
true
true (True in Visual Basic) if the current object is equal to the other parameter; otherwise, falseFalsefalsefalse (False in Visual Basic).
|
GetGpuData()
Function to return data that can be updated to the GPU for use in shaders.
Declaration
public override ref readonly GorgonGpuLightData GetGpuData()
Returns
Type | Description |
---|---|
GorgonGpuLightData | A reference to the data to send to the GPU. |