Space Engineers
Public Member Functions | Properties | List of all members
VRage.ModAPI.IMyStorage Interface Reference
Inheritance diagram for VRage.ModAPI.IMyStorage:
Sandbox.Engine.Voxels.IMyStorage Sandbox.Engine.Voxels.MyStorageBase Sandbox.Engine.Voxels.MyStorageBase Sandbox.Engine.Voxels.MyOctreeStorage Sandbox.Engine.Voxels.MyOctreeStorage

Public Member Functions

void Save (out byte[] outCompressedData)
 Gets compressed voxel data More...
 
void OverwriteAllMaterials (byte materialIndex)
 Replaces all materials in range with the specific material More...
 
ContainmentType Intersect (ref BoundingBox box, bool lazy)
 Returns the intersection with the storage region More...
 
bool Intersect (ref LineD line)
 Returns true if the specific line intersects the storage region More...
 
void PinAndExecute (Action action)
 Pins the voxel storage to prevent closing, then executes specified action. Unpins when action completes. More...
 
void PinAndExecute (Action< IMyStorage > action)
 Pins the voxel storage to prevent closing, then executes specified action. Unpins when action completes. 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 ReadRange (MyStorageData target, MyStorageDataTypeFlags dataToRead, int lodIndex, Vector3I lodVoxelRangeMin, 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, Vector3I lodVoxelRangeMin, Vector3I lodVoxelRangeMax, ref MyVoxelRequestFlags requestFlags)
 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 WriteRange (MyStorageData source, MyStorageDataTypeFlags dataToWrite, Vector3I voxelRangeMin, 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...
 

Properties

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...
 

Detailed Description

Definition at line 7 of file IMyStorage.cs.

Member Function Documentation

ContainmentType VRage.ModAPI.IMyStorage.Intersect ( ref BoundingBox  box,
bool  lazy 
)

Returns the intersection with the storage region

Parameters
box
lazy
Returns

Implemented in Sandbox.Engine.Voxels.MyStorageBase, and Sandbox.Engine.Voxels.IMyStorage.

bool VRage.ModAPI.IMyStorage.Intersect ( ref LineD  line)

Returns true if the specific line intersects the storage region

Parameters
line
Returns

Implemented in Sandbox.Engine.Voxels.MyStorageBase, and Sandbox.Engine.Voxels.IMyStorage.

void VRage.ModAPI.IMyStorage.OverwriteAllMaterials ( byte  materialIndex)

Replaces all materials in range with the specific material

Parameters
materialIndex
void VRage.ModAPI.IMyStorage.PinAndExecute ( Action  action)

Pins the voxel storage to prevent closing, then executes specified action. Unpins when action completes.

Parameters
actionAction to execute
void VRage.ModAPI.IMyStorage.PinAndExecute ( Action< IMyStorage action)

Pins the voxel storage to prevent closing, then executes specified action. Unpins when action completes.

Parameters
actionAction to execute
void VRage.ModAPI.IMyStorage.ReadRange ( MyStorageData  target,
MyStorageDataTypeFlags  dataToRead,
int  lodIndex,
Vector3I  lodVoxelRangeMin,
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.

Parameters
target
dataToRead
lodIndex
lodVoxelRangeMinInclusive.
lodVoxelRangeMaxInclusive.
void VRage.ModAPI.IMyStorage.ReadRange ( MyStorageData  target,
MyStorageDataTypeFlags  dataToRead,
int  lodIndex,
Vector3I  lodVoxelRangeMin,
Vector3I  lodVoxelRangeMax,
ref MyVoxelRequestFlags  requestFlags 
)

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.

Parameters
target
dataToRead
lodIndex
lodVoxelRangeMin
lodVoxelRangeMax
requestFlags
void VRage.ModAPI.IMyStorage.Reset ( MyStorageDataTypeFlags  dataToReset)

Resets the data specified by flags to values from data provider, or default if no provider is assigned.

Parameters
dataToReset

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

void VRage.ModAPI.IMyStorage.Save ( out byte[]  outCompressedData)

Gets compressed voxel data

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

void VRage.ModAPI.IMyStorage.WriteRange ( MyStorageData  source,
MyStorageDataTypeFlags  dataToWrite,
Vector3I  voxelRangeMin,
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).

Parameters
source
dataToWrite
voxelRangeMinInclusive.
voxelRangeMaxInclusive.

Property Documentation

bool VRage.ModAPI.IMyStorage.Closed
get

Returns true if voxel storage was closed

Definition at line 12 of file IMyStorage.cs.

bool VRage.ModAPI.IMyStorage.MarkedForClose
get

Returns true if the voxel storage is marked for a pending close

Definition at line 17 of file IMyStorage.cs.

Vector3I VRage.ModAPI.IMyStorage.Size
get

The size of the voxel storage, in voxels

Definition at line 27 of file IMyStorage.cs.


The documentation for this interface was generated from the following file: