Class ArrayStorage
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
A array buffer defined by its struct size.
To use it, caller must first call GetId() to obtain an unique id in order to modify the buffer. Caller must restrictly use this unique id to access the buffer.
Caller must call ReleaseId(int) to release the id once caller is no longer needed to use this buffer. The released id will be reused by an new caller.public sealed class ArrayStorage : DisposeObject, IDisposable
- Inheritance
-
ArrayStorage
- Implements
- Inherited Members
Constructors
ArrayStorage(int)
public ArrayStorage(int structSize)
Parameters
structSizeint
Fields
MaxArraySizeExpoentialIncrement
public static int MaxArraySizeExpoentialIncrement
Field Value
MinArraySize
public static int MinArraySize
Field Value
Properties
StructSize
public int StructSize { get; }
Property Value
Methods
Clear(int)
public void Clear(int id)
Parameters
idint
GetArray()
public byte[] GetArray()
Returns
- byte[]
GetId()
public int GetId()
Returns
GetOffSet(int)
public int GetOffSet(int id)
Parameters
idint
Returns
OnDispose(bool)
Disposes of object resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolIf true, managed resources should be disposed of in addition to unmanaged resources.
Read(int, int, nint, int)
public bool Read(int id, int offset, nint dest, int size)
Parameters
Returns
Read(int, nint)
public bool Read(int id, nint dest)
Parameters
Returns
Read<T>(int, int, out T)
public bool Read<T>(int id, int offset, out T value) where T : unmanaged
Parameters
Returns
Type Parameters
T
ReleaseId(int)
public void ReleaseId(int id)
Parameters
idint
Write(int, int, nint, int)
public bool Write(int id, int offset, nint data, int dataLength)
Parameters
Returns
Write<T>(int, int, ref T)
public bool Write<T>(int id, int offset, ref T value) where T : unmanaged
Parameters
Returns
Type Parameters
T