PowerUI.FixedSizeBuffer< T > Class Template Reference

Detailed Description

A special type of array which is made up of a set of 'blocks'. Each block consists of a fixed amount of type T elements. This fixed amount is the block size. It regulates an internal array and only resizes when necessary. Example usage: PowerUI.DynamicMesh.Vertices For example, A block size of 4 (e.g. 4 vertices in a square) and a block count of 3 generates a 12 element array.

Public Member Functions

 FixedSizeBuffer (int blockSize)
 Creates a new buffer with the given block size - that's how many T elements form a block. More...
 
 FixedSizeBuffer (int blockSize, bool clear)
 Creates a new buffer with the given block size - that's how many T elements form a block. More...
 
void Resize (int blockCount)
 Resizes the buffer to make sure the given amount of blocks will fit. More...
 

Public Attributes

T[] Buffer
 The output array. More...
 
int BlockSize
 How many T typed objects make up a 'block' in our buffer. More...
 
int BlockCount
 How many blocks are currently in the buffer. More...
 

Private Attributes

bool Clear
 Should this buffer clear? More...
 

Constructor & Destructor Documentation

PowerUI.FixedSizeBuffer< T >.FixedSizeBuffer ( int  blockSize)
inline

Creates a new buffer with the given block size - that's how many T elements form a block.

PowerUI.FixedSizeBuffer< T >.FixedSizeBuffer ( int  blockSize,
bool  clear 
)
inline

Creates a new buffer with the given block size - that's how many T elements form a block.

Member Function Documentation

void PowerUI.FixedSizeBuffer< T >.Resize ( int  blockCount)
inline

Resizes the buffer to make sure the given amount of blocks will fit.

Parameters
blockCountHow many blocks we want in the buffer.

Member Data Documentation

int PowerUI.FixedSizeBuffer< T >.BlockCount

How many blocks are currently in the buffer.

int PowerUI.FixedSizeBuffer< T >.BlockSize

How many T typed objects make up a 'block' in our buffer.

T [] PowerUI.FixedSizeBuffer< T >.Buffer

The output array.

bool PowerUI.FixedSizeBuffer< T >.Clear
private

Should this buffer clear?