Space Engineers
|
Classes | |
struct | ChunkHeader |
Public Types | |
enum | ChunkTypeEnum : ushort { ChunkTypeEnum.StorageMetaData = 1, ChunkTypeEnum.MaterialIndexTable = 2, ChunkTypeEnum.MacroContentNodes = 3, ChunkTypeEnum.MacroMaterialNodes = 4, ChunkTypeEnum.ContentLeafProvider = 5, ChunkTypeEnum.ContentLeafOctree = 6, ChunkTypeEnum.MaterialLeafProvider = 7, ChunkTypeEnum.MaterialLeafOctree = 8, ChunkTypeEnum.DataProvider = 9, ChunkTypeEnum.EndOfFile = ushort.MaxValue } |
Public Member Functions | |
MyOctreeStorage () | |
MyOctreeStorage (IMyStorageDataProvider dataProvider, Vector3I size) | |
override IMyStorage | Copy () |
override void | DebugDraw (MyVoxelBase referenceVoxelMap, MyVoxelDebugDrawMode mode) |
void | Voxelize (MyStorageDataTypeFlags data) |
For debugging/testing only! This can be very slow for large storage. More... | |
override unsafe ContainmentType | IntersectInternal (ref BoundingBox box, bool lazy) |
override unsafe bool | IntersectInternal (ref LineD line) |
Public Member Functions inherited from Sandbox.Engine.Voxels.MyStorageBase | |
void | InitWriteCache (int prealloc=128) |
bool | CleanCachedChunks () |
bool | WritePending (bool force=false) |
void | GetStats (out WriteCacheStats stats) |
MyStorageBase () | |
unsafe bool | ChangeMaterials (Dictionary< byte, byte > map) |
void | Save (out byte[] outCompressedData) |
Gets compressed voxel data More... | |
void | Reset (MyStorageDataTypeFlags dataToReset) |
Resets the data specified by flags to values from data provider, or default if no provider is assigned. More... | |
void | OverwriteAllMaterials (MyVoxelMaterialDefinition material) |
void | WriteRange (MyStorageData source, MyStorageDataTypeFlags dataToWrite, ref Vector3I voxelRangeMin, ref Vector3I voxelRangeMax) |
Writes range of content and/or materials from cache to storage. Note that this can only write to LOD0 (higher LODs must be computed based on that). More... | |
void | ReadRange (MyStorageData target, MyStorageDataTypeFlags dataToRead, int lodIndex, ref Vector3I lodVoxelRangeMin, ref Vector3I lodVoxelRangeMax) |
Reads range of content and/or materials from specified LOD. If you want to write data back later, you must read LOD0 as that is the only writable one. More... | |
void | ReadRange (MyStorageData target, MyStorageDataTypeFlags dataToRead, int lodIndex, ref Vector3I lodVoxelRangeMin, ref Vector3I lodVoxelRangeMax, ref MyVoxelRequestFlags requestFlags) |
ContainmentType | Intersect (ref BoundingBox box, bool lazy) |
bool | Intersect (ref LineD line) |
void | Reset () |
virtual void | CloseInternal () |
void | Close () |
StoragePin | Pin () |
void | Unpin () |
Public Member Functions inherited from VRage.ModAPI.IMyStorage | |
void | PinAndExecute (Action< IMyStorage > action) |
Pins the voxel storage to prevent closing, then executes specified action. Unpins when action completes. More... | |
Public Attributes | |
const int | LeafLodCount = 4 |
const int | LeafSizeInVoxels = 1 << LeafLodCount |
Protected Member Functions | |
override void | ResetInternal (MyStorageDataTypeFlags dataToReset) |
override void | OverwriteAllMaterialsInternal (MyVoxelMaterialDefinition material) |
override void | LoadInternal (int fileVersion, Stream stream, ref bool isOldFormat) |
override void | SaveInternal (Stream stream) |
override void | ReadRangeInternal (MyStorageData target, ref Vector3I targetWriteOffset, MyStorageDataTypeFlags dataToRead, int lodIndex, ref Vector3I lodVoxelCoordStart, ref Vector3I lodVoxelCoordEnd, ref MyVoxelRequestFlags flags) |
unsafe override void | WriteRangeInternal (MyStorageData source, MyStorageDataTypeFlags dataToWrite, ref Vector3I voxelRangeMin, ref Vector3I voxelRangeMax) |
Protected Member Functions inherited from Sandbox.Engine.Voxels.MyStorageBase | |
void | SaveCompressedData (out byte[] compressedData) |
Properties | |
override IMyStorageDataProvider | DataProvider [get, set] |
Properties inherited from Sandbox.Engine.Voxels.MyStorageBase | |
bool | CachedWrites [get, set] |
bool | HasPendingWrites [get] |
bool | HasCachedChunks [get] |
abstract IMyStorageDataProvider | DataProvider [get, set] |
bool | Shared [get, protected set] |
bool | MarkedForClose [get] |
bool | Pinned [get] |
MyVoxelGeometry | Geometry [get] |
Vector3I | Size [get, protected set] |
bool | Closed [get] |
Properties inherited from VRage.ModAPI.IMyStorage | |
bool | Closed [get] |
Returns true if voxel storage was closed More... | |
bool | MarkedForClose [get] |
Returns true if the voxel storage is marked for a pending close More... | |
Vector3I | Size [get] |
The size of the voxel storage, in voxels More... | |
Properties inherited from Sandbox.Engine.Voxels.IMyStorage | |
new Vector3I | Size [get] |
MyVoxelGeometry | Geometry [get] |
IMyStorageDataProvider | DataProvider [get] |
bool | Closed [get] |
bool | Shared [get] |
Additional Inherited Members | |
Static Public Member Functions inherited from Sandbox.Engine.Voxels.MyStorageBase | |
static MyStorageBase | LoadFromFile (string absoluteFilePath, Dictionary< byte, byte > modifiers=null) |
static void | ResetCache () |
static MyStorageBase | Load (string name) |
static MyStorageBase | Load (byte[] memoryBuffer) |
Static Public Attributes inherited from Sandbox.Engine.Voxels.MyStorageBase | |
static bool | UseStorageCache = true |
Protected Attributes inherited from Sandbox.Engine.Voxels.MyStorageBase | |
const string | STORAGE_TYPE_NAME_CELL = "Cell" |
const int | STORAGE_TYPE_VERSION_CELL = 2 |
const string | STORAGE_TYPE_NAME_OCTREE = "Octree" |
const int | STORAGE_TYPE_VERSION_OCTREE = 1 |
byte[] | m_compressedData |
readonly FastResourceLock | m_storageLock = new FastResourceLock() |
byte | m_defaultMaterial = MyDefinitionManager.Static.GetDefaultVoxelMaterialDefinition().Index |
Events inherited from Sandbox.Engine.Voxels.MyStorageBase | |
RangeChangedDelegate | RangeChanged |
Events inherited from Sandbox.Engine.Voxels.IMyStorage | |
RangeChangedDelegate | RangeChanged |
please use RangeChanged on voxelbase if possible More... | |
Definition at line 19 of file MyOctreeStorage.cs.
enum Sandbox.Engine.Voxels.MyOctreeStorage.ChunkTypeEnum : ushort |
Enumerator | |
---|---|
StorageMetaData | |
MaterialIndexTable | |
MacroContentNodes | |
MacroMaterialNodes | |
ContentLeafProvider | |
ContentLeafOctree | |
MaterialLeafProvider | |
MaterialLeafOctree | |
DataProvider | |
EndOfFile |
Definition at line 23 of file MyOctreeStorage.cs.
|
inline |
Definition at line 94 of file MyOctreeStorage.cs.
|
inline |
Definition at line 96 of file MyOctreeStorage.cs.
|
inlinevirtual |
Reimplemented from Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 307 of file MyOctreeStorage.cs.
|
inlinevirtual |
Reimplemented from Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 389 of file MyOctreeStorage.cs.
|
inlinevirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 1138 of file MyOctreeStorage.cs.
|
inlinevirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 1216 of file MyOctreeStorage.cs.
|
inlineprotectedvirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 178 of file MyOctreeStorage.cs.
|
inlineprotectedvirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 173 of file MyOctreeStorage.cs.
|
inlineprotectedvirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 318 of file MyOctreeStorage.cs.
|
inlineprotectedvirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 125 of file MyOctreeStorage.cs.
|
inlineprotectedvirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 288 of file MyOctreeStorage.cs.
|
inline |
For debugging/testing only! This can be very slow for large storage.
Definition at line 492 of file MyOctreeStorage.cs.
|
inlineprotectedvirtual |
Implements Sandbox.Engine.Voxels.MyStorageBase.
Definition at line 353 of file MyOctreeStorage.cs.
const int Sandbox.Engine.Voxels.MyOctreeStorage.LeafLodCount = 4 |
Definition at line 59 of file MyOctreeStorage.cs.
const int Sandbox.Engine.Voxels.MyOctreeStorage.LeafSizeInVoxels = 1 << LeafLodCount |
Definition at line 60 of file MyOctreeStorage.cs.
|
getset |
Definition at line 81 of file MyOctreeStorage.cs.