Class DebrisCache
Caches information about tree debris presence in the world. Used in plant and trampling simulation.
Inheritance
System.Object
DebrisCache
Namespace: Eco.Simulation.WorldLayers
Assembly: Eco.Simulation.dll
Syntax
public class DebrisCache : Object, IStorage, ISerializable
Constructors
DebrisCache(IPersistent)
Declaration
public DebrisCache(IPersistent storageHandle)
Parameters
Type | Name | Description |
---|---|---|
IPersistent | storageHandle |
Properties
Cache
Cache contains mapping between X,Z and Y of tree debris. It only supports one tree debris in a column which should be fine in 99.999% cases and we don't need 100% precision here.
Declaration
public ThreadSafeDictionary<Vector2i, int> Cache { get; }
Property Value
Type | Description |
---|---|
ThreadSafeDictionary<Vector2i, System.Int32> |
StorageHandle
Declaration
public IPersistent StorageHandle { get; set; }
Property Value
Type | Description |
---|---|
IPersistent |
Methods
Flush()
Flushes queued block changes and actualizes cache state.
Declaration
public void Flush()
Initialize(Vector3i)
Declaration
public void Initialize(Vector3i worldVoxelSize)
Parameters
Type | Name | Description |
---|---|---|
Vector3i | worldVoxelSize |