Class GorgonLightCommon
Base common properties for a light.
Implements
Inherited Members
Namespace: Gorgon.Renderers.Lights
Assembly: Gorgon.Graphics.Core.dll
Syntax
public abstract class GorgonLightCommon : IGorgonNamedObject
Constructors
| Edit this page View SourceGorgonLightCommon(GorgonLightCommon, string)
Initializes a new instance of the GorgonLightCommon class.
Declaration
protected GorgonLightCommon(GorgonLightCommon copy, string newName = null)
Parameters
Type | Name | Description |
---|---|---|
GorgonLightCommon | copy | The light data to copy. |
string | newName | [Optional] The new name for the light. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
GorgonLightCommon(string)
Initializes a new instance of the GorgonLightCommon class.
Declaration
protected GorgonLightCommon(string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | [Optional] The name of the light. |
Properties
| Edit this page View SourceColor
Property to set or return the color of the light.
Declaration
public GorgonColor Color { get; set; }
Property Value
Type | Description |
---|---|
GorgonColor |
Intensity
Property to set or return how bright the light will be.
Declaration
public float Intensity { get; set; }
Property Value
Type | Description |
---|---|
float |
IsUpdated
Property to return whether the light was updated or not.
Declaration
public bool IsUpdated { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
LightType
Property to set or return the type of light to render.
Declaration
public abstract LightType LightType { get; }
Property Value
Type | Description |
---|---|
LightType |
Name
Property to return the name of the light.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
SpecularEnabled
Property to set or return whether to enable specular highlights.
Declaration
public bool SpecularEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
SpecularIntensity
Property to set or return the intensity of the specular highlight.
Declaration
public float SpecularIntensity { get; set; }
Property Value
Type | Description |
---|---|
float |
SpecularPower
Property to set or return the intensity of the specular highlight.
Declaration
public float SpecularPower { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceGetGpuData()
Function to return data that can be updated to the GPU for use in shaders.
Declaration
public abstract ref readonly GorgonGpuLightData GetGpuData()
Returns
Type | Description |
---|---|
GorgonGpuLightData | A reference to the data to send to the GPU. |