Gorgon
Show / Hide Table of Contents

Class GorgonDirectionalLight

Directional light properties for passing to a GPU lighting shader.

Inheritance
object
GorgonLightCommon
GorgonDirectionalLight
Implements
IGorgonNamedObject
IEquatable<GorgonDirectionalLight>
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 GorgonDirectionalLight : GorgonLightCommon, IGorgonNamedObject, IEquatable<GorgonDirectionalLight>

Constructors

| Edit this page View Source

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

| Edit this page View Source

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 Source

LightDirection

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

This property is ignored when the LightType property is set to Point.

| 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

Methods

| Edit this page View Source

Equals(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).
| 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