Pyrogenesis trunk
|
Similar to Grid, except optimised for sparse usage (the grid is subdivided into buckets whose contents are only initialised on demand, to save on memset cost). More...
#include <Grid.h>
Public Member Functions | |
SparseGrid (u16 w, u16 h) | |
~SparseGrid () | |
void | reset () |
void | set (int i, int j, const T &value) |
T & | get (int i, int j) |
Public Attributes | |
u16 | m_W |
u16 | m_H |
u16 | m_BW |
u16 | m_BH |
T ** | m_Data |
size_t | m_DirtyID |
Private Types | |
enum | { BucketBits = 4 , BucketSize = 1 << BucketBits } |
Private Member Functions | |
NONCOPYABLE (SparseGrid) | |
T * | GetBucket (int i, int j) |
Similar to Grid, except optimised for sparse usage (the grid is subdivided into buckets whose contents are only initialised on demand, to save on memset cost).
|
private |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
private |
|
inline |
|
inline |
u16 SparseGrid< T >::m_BH |
u16 SparseGrid< T >::m_BW |
T** SparseGrid< T >::m_Data |
size_t SparseGrid< T >::m_DirtyID |
u16 SparseGrid< T >::m_H |
u16 SparseGrid< T >::m_W |