Struct UntypedList
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
public struct UntypedList
- Inherited Members
Constructors
UntypedList(int, int, BufferPool)
public UntypedList(int elementSizeInBytes, int initialCapacityInElements, BufferPool pool)
Parameters
Fields
Buffer
public Buffer<byte> Buffer
Field Value
- Buffer<byte>
ByteCount
public int ByteCount
Field Value
Count
public int Count
Field Value
ElementSizeInBytes
public int ElementSizeInBytes
Field Value
Methods
Add<T>(ref T, int, BufferPool)
public int Add<T>(ref T data, int minimumCount, BufferPool pool)
Parameters
data
TminimumCount
intpool
BufferPool
Returns
Type Parameters
T
Allocate(int, int, BufferPool)
Allocates an element in the list, initializing the backing buffer if needed.
public int Allocate(int elementSizeInBytes, int minimumElementCount, BufferPool pool)
Parameters
elementSizeInBytes
intNumber of bytes per element.
minimumElementCount
intMinimum size of the backing buffer to create if this is a new allocation.
pool
BufferPoolPool to pull allocations from.
Returns
- int
Index of the element in bytes within the list's buffer.
AllocateUnsafely()
public byte* AllocateUnsafely()
Returns
- byte*
AllocateUnsafely<T>()
public ref T AllocateUnsafely<T>()
Returns
- T
Type Parameters
T
Allocate<T>(int, BufferPool)
public int Allocate<T>(int minimumElementCount, BufferPool pool)
Parameters
minimumElementCount
intpool
BufferPool
Returns
Type Parameters
T
GetFromBytes<T>(int)
public ref T GetFromBytes<T>(int byteIndex)
Parameters
byteIndex
int
Returns
- T
Type Parameters
T
Get<T>(int)
public ref T Get<T>(int index)
Parameters
index
int
Returns
- T
Type Parameters
T