Gorgon
Show / Hide Table of Contents

Class GorgonLightCommon

Base common properties for a light.

Inheritance
object
GorgonLightCommon
GorgonDirectionalLight
GorgonPointLight
Implements
IGorgonNamedObject
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Renderers.Lights
Assembly: Gorgon.Graphics.Core.dll
Syntax
public abstract class GorgonLightCommon : IGorgonNamedObject

Constructors

| Edit this page View Source

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

| Edit this page View Source

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 Source

Color

Property to set or return the color of the light.

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

Intensity

Property to set or return how bright the light will be.

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

IsUpdated

Property to return whether the light was updated or not.

Declaration
public bool IsUpdated { get; protected set; }
Property Value
Type Description
bool
| Edit this page View Source

LightType

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

Declaration
public abstract LightType LightType { get; }
Property Value
Type Description
LightType
| Edit this page View Source

Name

Property to return the name of the light.

Declaration
public string Name { get; }
Property Value
Type Description
string
| Edit this page View Source

SpecularEnabled

Property to set or return whether to enable specular highlights.

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

SpecularIntensity

Property to set or return the intensity of the specular highlight.

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

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 Source

GetGpuData()

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.

Implements

IGorgonNamedObject

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