Table of Contents

Class DirectionalLight2D

Namespace
LibGFX.Graphics.Lights
Assembly
LibGFX.dll

An directional light

public class DirectionalLight2D : Light, IIdentifier, ISerialization
Inheritance
DirectionalLight2D
Implements
Inherited Members

Constructors

DirectionalLight2D()

Initializes a new instance of the DirectionalLight2D class.

public DirectionalLight2D()

DirectionalLight2D(Vector4, float)

Creates a new instance of the DirectionalLight2D class.

public DirectionalLight2D(Vector4 color, float intensity)

Parameters

color Vector4
intensity float

Properties

HasShadowMap

Determines if the light has a shadow map.

public override bool HasShadowMap { get; }

Property Value

bool

Methods

Deserialize(JObject, SerializationContext, Func<JObject, bool>)

Populates the object's properties from the specified JSON object using the provided serialization context.

public override void Deserialize(JObject obj, SerializationContext serializationContext, Func<JObject, bool> callback = null)

Parameters

obj JObject
serializationContext SerializationContext

The context to use during deserialization, providing additional information or services required for the process.

callback Func<JObject, bool>

Dispose(IRenderDevice)

Releases all resources used by the object and performs any necessary cleanup using the specified render device.

public override void Dispose(IRenderDevice renderer)

Parameters

renderer IRenderDevice

The render device to use for releasing graphics resources. Cannot be null.

Init(IRenderDevice)

Initializes the object using the specified render device.

public override void Init(IRenderDevice renderer)

Parameters

renderer IRenderDevice

The render device to use for initialization. Cannot be null.

Serialize(JsonWriter, SerializationContext, Action<JsonWriter>)

Serializes the current object to a JSON representation suitable for storage or transmission.

public override void Serialize(JsonWriter writer, SerializationContext serializationContext, Action<JsonWriter> callback = null)

Parameters

writer JsonWriter
serializationContext SerializationContext

The context that provides information and services required for serialization.

callback Action<JsonWriter>