Gorgon
Show / Hide Table of Contents

Class GorgonPointLight

Point light properties for passing to a GPU lighting shader.

Inheritance
object
GorgonLightCommon
GorgonPointLight
Implements
IGorgonNamedObject
IEquatable<GorgonPointLight>
Inherited Members
GorgonLightCommon.IsUpdated
GorgonLightCommon.Color
GorgonLightCommon.SpecularEnabled
GorgonLightCommon.SpecularPower
GorgonLightCommon.SpecularIntensity
GorgonLightCommon.Intensity
GorgonLightCommon.Name
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: Gorgon.Renderers.Lights
Assembly: Gorgon.Graphics.Core.dll
Syntax
public sealed class GorgonPointLight : GorgonLightCommon, IGorgonNamedObject, IEquatable<GorgonPointLight>

Constructors

| Edit this page View Source

GorgonPointLight(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 copy parameter is null.

| Edit this page View Source

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 Source

ConstantAttenuation

Property to set or return the constant intensity falloff for the light.

Declaration
public float ConstantAttenuation { get; set; }
Property Value
Type Description
float
| Edit this page View Source

LightType

Property to set or return the type of light to render.

Declaration
public override LightType LightType { get; }
Property Value
Type Description
LightType
Overrides
GorgonLightCommon.LightType
| Edit this page View Source

LinearAttenuation

Property to set or return the linear intensity falloff for the light.

Declaration
public float LinearAttenuation { get; set; }
Property Value
Type Description
float
| Edit this page View Source

Position

Property to set or return the position for the light.

Declaration
public Vector3 Position { get; set; }
Property Value
Type Description
Vector3
| Edit this page View Source

QuadraticAttenuation

Property to set or return the quadratic intensity falloff for the light.

Declaration
public float QuadraticAttenuation { get; set; }
Property Value
Type Description
float
| Edit this page View Source

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 Source

Equals(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).
| Edit this page View Source

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.

Overrides
GorgonLightCommon.GetGpuData()

Implements

IGorgonNamedObject
IEquatable<T>

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author