Table of Contents

Class Light

Namespace
LibGFX.Graphics.Lights
Assembly
LibGFX.dll

Base class for all light types.

public abstract class Light : IIdentifier, ISerialization
Inheritance
Light
Implements
Derived
Inherited Members

Properties

Color

The color of the light.

public virtual Vector4 Color { get; set; }

Property Value

Vector4

HasShadowMap

Indicates whether the light has a shadow map.

public abstract bool HasShadowMap { get; }

Property Value

bool

ID

Gets the unique identifier for this instance.

public Guid ID { get; }

Property Value

Guid

Intensity

The intensity of the light.

public virtual float Intensity { get; set; }

Property Value

float

Name

Gets or sets the name associated with the object.

public string Name { get; set; }

Property Value

string

Position

The position of the light.

public virtual Vector3 Position { get; set; }

Property Value

Vector3

ShadowMap

The range of the light.

public DepthOnlyRenderTarget ShadowMap { get; set; }

Property Value

DepthOnlyRenderTarget

ShadowMapSize

The size of the shadow map in pixels.

public Vector2i ShadowMapSize { get; set; }

Property Value

Vector2i

Methods

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

Populates the current object with values from the specified JSON object.

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

Parameters

obj JObject
serializationContext SerializationContext
callback Func<JObject, bool>

Dispose(IRenderDevice)

Disposes the light resources associated with the renderer.

public abstract void Dispose(IRenderDevice renderer)

Parameters

renderer IRenderDevice

Init(IRenderDevice)

Initializes the light with the given renderer.

public abstract void Init(IRenderDevice renderer)

Parameters

renderer IRenderDevice

Serialize(JsonWriter, SerializationContext, Action<JsonWriter>)

Serializes the current object to a Newtonsoft.Json.Linq.JObject using the specified serialization context.

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

Parameters

writer JsonWriter
serializationContext SerializationContext

The context that provides information and settings required for serialization.

callback Action<JsonWriter>