Table of Contents

Class ProceduralSky

Namespace
LibGFX.Graphics.Enviroment
Assembly
LibGFX.dll

Represents a procedural sky

public class ProceduralSky : IEnviroment, IGraphicsResource, ISerialization
Inheritance
ProceduralSky
Implements
Inherited Members

Constructors

ProceduralSky()

Creates a new instance of the ProceduralSky class

public ProceduralSky()

Properties

CloudColor

The color of the clouds

public Vector3 CloudColor { get; set; }

Property Value

Vector3

Coverage

The coverage of the clouds

public bool Coverage { get; set; }

Property Value

bool

CoverageFactor

The coverage factor for the clouds

public float CoverageFactor { get; set; }

Property Value

float

CoverageTexture

The texture used for the cloud coverage

public Texture CoverageTexture { get; set; }

Property Value

Texture

IsInitialized

Gets a value indicating whether the object has been initialized and is ready for use.

public bool IsInitialized { get; }

Property Value

bool

SkyBottomColor

The bottom color of the sky

public Vector3 SkyBottomColor { get; set; }

Property Value

Vector3

SkyTopColor

The top color of the sky

public Vector3 SkyTopColor { get; set; }

Property Value

Vector3

SkylineOffset

The offset of the skyline

public float SkylineOffset { get; set; }

Property Value

float

SkylineScale

The scale of the skyline

public float SkylineScale { get; set; }

Property Value

float

SunColor

The color of the sun

public Vector3 SunColor { get; set; }

Property Value

Vector3

SunDirection

The direction of the sun

public Vector3 SunDirection { get; set; }

Property Value

Vector3

SunIntensity

The intensity of the sun

public float SunIntensity { get; set; }

Property Value

float

SunSize

The size of the sun

public float SunSize { get; set; }

Property Value

float

Transform

The transform of the sky

public Transform Transform { get; set; }

Property Value

Transform

Methods

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

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

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

Parameters

obj JObject
serializationContext SerializationContext

The SerializationContext to use during deserialization. Provides context or settings that may influence how the data is interpreted.

callback Func<JObject, bool>

Remarks

This method expects the JSON object to contain all necessary fields for successful deserialization. Missing or invalid fields may result in incomplete or incorrect object state.

Dispose(IRenderDevice)

Disposes the procedural sky

public void Dispose(IRenderDevice renderer)

Parameters

renderer IRenderDevice

FreeCPUResources()

Releases any CPU resources that are currently allocated by the component.

public void FreeCPUResources()

Remarks

Call this method when the component no longer needs to perform CPU-intensive operations to allow the system to reclaim resources. After calling this method, the component may not be able to perform certain operations until resources are reallocated.

Init(IRenderDevice)

Initializes the procedural sky

public void Init(IRenderDevice renderer)

Parameters

renderer IRenderDevice

Exceptions

Exception

Render(IRenderDevice, Camera, Viewport)

Renders the procedural sky

public void Render(IRenderDevice renderer, Camera camera, Viewport viewport)

Parameters

renderer IRenderDevice
camera Camera
viewport Viewport

Serialize(JsonWriter, SerializationContext, Action<JsonWriter>)

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

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

Parameters

writer JsonWriter
serializationContext SerializationContext

The context that provides serialization settings and state information used during the serialization process.

callback Action<JsonWriter>