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

Public Member Functions

void OverwriteAllMaterials (MyVoxelMaterialDefinition material)
 
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)
 
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...
 
ContainmentType Intersect (ref BoundingBox box, bool lazy=true)
 
bool Intersect (ref LineD line)
 
void DebugDraw (MyVoxelBase voxelMap, MyVoxelDebugDrawMode mode)
 
StoragePin Pin ()
 
void Unpin ()
 
void Reset ()
 
void Close ()
 
IMyStorage Copy ()
 
- Public Member Functions inherited from VRage.ModAPI.IMyStorage
void Save (out byte[] outCompressedData)
 Gets compressed voxel data More...
 
void OverwriteAllMaterials (byte materialIndex)
 Replaces all materials in range with the specific material 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

new Vector3I Size [get]
 
MyVoxelGeometry Geometry [get]
 
IMyStorageDataProvider DataProvider [get]
 
bool Closed [get]
 
bool Shared [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...
 

Events

RangeChangedDelegate RangeChanged
 please use RangeChanged on voxelbase if possible More...
 

Detailed Description

Definition at line 14 of file IMyStorage.cs.

Member Function Documentation

void Sandbox.Engine.Voxels.IMyStorage.Close ( )
IMyStorage Sandbox.Engine.Voxels.IMyStorage.Copy ( )
void Sandbox.Engine.Voxels.IMyStorage.DebugDraw ( MyVoxelBase  voxelMap,
MyVoxelDebugDrawMode  mode 
)
ContainmentType Sandbox.Engine.Voxels.IMyStorage.Intersect ( ref BoundingBox  box,
bool  lazy = true 
)

Check for intersection with a bounding box.

The bounding box must be in local space (LLB corner origin).

If lazy is true the method is faster but may return Intersects when the box is actually contained.

Implements VRage.ModAPI.IMyStorage.

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

bool Sandbox.Engine.Voxels.IMyStorage.Intersect ( ref LineD  line)

Find the smallest continuous segment from the provided line that may intersect the storage (within some storage dependent margin).

The coordinates must be in local space (LLB corner origin).

The provided segment is replaced with the intersecting segment.

This returns true when there is intersection, false otherwise.

Implements VRage.ModAPI.IMyStorage.

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

void Sandbox.Engine.Voxels.IMyStorage.OverwriteAllMaterials ( MyVoxelMaterialDefinition  material)
StoragePin Sandbox.Engine.Voxels.IMyStorage.Pin ( )

Pin storage.

Prevent the storage from closing while the pin is alive.

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

void Sandbox.Engine.Voxels.IMyStorage.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.

Parameters
lodVoxelRangeMinInclusive.
lodVoxelRangeMaxInclusive.

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

void Sandbox.Engine.Voxels.IMyStorage.ReadRange ( MyStorageData  target,
MyStorageDataTypeFlags  dataToRead,
int  lodIndex,
ref Vector3I  lodVoxelRangeMin,
ref Vector3I  lodVoxelRangeMax,
ref MyVoxelRequestFlags  requestFlags 
)

Read from the storage accepting the optimizations provided in requestFlags.

After this call requestFlags will inform of which optimization were in fact employed on the request.

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

void Sandbox.Engine.Voxels.IMyStorage.Reset ( )
void Sandbox.Engine.Voxels.IMyStorage.Unpin ( )
void Sandbox.Engine.Voxels.IMyStorage.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).

Parameters
voxelRangeMinInclusive.
voxelRangeMaxInclusive.

Implemented in Sandbox.Engine.Voxels.MyStorageBase.

Property Documentation

bool Sandbox.Engine.Voxels.IMyStorage.Closed
get

Weather the storage is closed.

Definition at line 85 of file IMyStorage.cs.

IMyStorageDataProvider Sandbox.Engine.Voxels.IMyStorage.DataProvider
get

Definition at line 71 of file IMyStorage.cs.

MyVoxelGeometry Sandbox.Engine.Voxels.IMyStorage.Geometry
get

Definition at line 18 of file IMyStorage.cs.

bool Sandbox.Engine.Voxels.IMyStorage.Shared
get

Definition at line 91 of file IMyStorage.cs.

new Vector3I Sandbox.Engine.Voxels.IMyStorage.Size
get

Definition at line 16 of file IMyStorage.cs.

Event Documentation

RangeChangedDelegate Sandbox.Engine.Voxels.IMyStorage.RangeChanged

please use RangeChanged on voxelbase if possible

Definition at line 23 of file IMyStorage.cs.


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