Class GorgonPointLight
Point light properties for passing to a GPU lighting shader.
Inherited Members
Namespace: Gorgon.Renderers.Lights
Assembly: Gorgon.Graphics.Core.dll
Syntax
public sealed class GorgonPointLight : GorgonLightCommon, IGorgonNamedObject, IEquatable<GorgonPointLight>
Constructors
| Edit this page View SourceGorgonPointLight(GorgonPointLight, string)
Initializes a new instance of the GorgonPointLight class.
Declaration
public GorgonPointLight(GorgonPointLight copy, string newName = null)
Parameters
Type | Name | Description |
---|---|---|
GorgonPointLight | copy | The light data to copy. |
string | newName | [Optional] The new name for the light. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
GorgonPointLight(string)
Initializes a new instance of the GorgonPointLight class.
Declaration
public GorgonPointLight(string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | [Optional] The name of the light. |
Properties
| Edit this page View SourceConstantAttenuation
Property to set or return the constant intensity falloff for the light.
Declaration
public float ConstantAttenuation { get; set; }
Property Value
Type | Description |
---|---|
float |
LightType
Property to set or return the type of light to render.
Declaration
public override LightType LightType { get; }
Property Value
Type | Description |
---|---|
LightType |
Overrides
| Edit this page View SourceLinearAttenuation
Property to set or return the linear intensity falloff for the light.
Declaration
public float LinearAttenuation { get; set; }
Property Value
Type | Description |
---|---|
float |
Position
Property to set or return the position for the light.
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
QuadraticAttenuation
Property to set or return the quadratic intensity falloff for the light.
Declaration
public float QuadraticAttenuation { get; set; }
Property Value
Type | Description |
---|---|
float |
Range
Property to set or return the range for the point light.
Declaration
public float Range { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
The range is the area that is affected by the light. If an object vertex minus the position of the light is greater than the range value, it will not be lit.
The default value is the square root of the floating point MaxValue.
Methods
| Edit this page View SourceEquals(GorgonPointLight)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(GorgonPointLight other)
Parameters
Type | Name | Description |
---|---|---|
GorgonPointLight | 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. |