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
Coverage
The coverage of the clouds
public bool Coverage { get; set; }
Property Value
CoverageFactor
The coverage factor for the clouds
public float CoverageFactor { get; set; }
Property Value
CoverageTexture
The texture used for the cloud coverage
public Texture CoverageTexture { get; set; }
Property Value
IsInitialized
Gets a value indicating whether the object has been initialized and is ready for use.
public bool IsInitialized { get; }
Property Value
SkyBottomColor
The bottom color of the sky
public Vector3 SkyBottomColor { get; set; }
Property Value
SkyTopColor
The top color of the sky
public Vector3 SkyTopColor { get; set; }
Property Value
SkylineOffset
The offset of the skyline
public float SkylineOffset { get; set; }
Property Value
SkylineScale
The scale of the skyline
public float SkylineScale { get; set; }
Property Value
SunColor
The color of the sun
public Vector3 SunColor { get; set; }
Property Value
SunDirection
The direction of the sun
public Vector3 SunDirection { get; set; }
Property Value
SunIntensity
The intensity of the sun
public float SunIntensity { get; set; }
Property Value
SunSize
The size of the sun
public float SunSize { get; set; }
Property Value
Transform
The transform of the sky
public Transform Transform { get; set; }
Property Value
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
objJObjectserializationContextSerializationContextThe SerializationContext to use during deserialization. Provides context or settings that may influence how the data is interpreted.
callbackFunc<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
rendererIRenderDevice
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
rendererIRenderDevice
Exceptions
Render(IRenderDevice, Camera, Viewport)
Renders the procedural sky
public void Render(IRenderDevice renderer, Camera camera, Viewport viewport)
Parameters
rendererIRenderDevicecameraCameraviewportViewport
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
writerJsonWriterserializationContextSerializationContextThe context that provides serialization settings and state information used during the serialization process.
callbackAction<JsonWriter>