28 Level(uvec2
const &
size = uvec2(0,0), T
const & borderValue = (T)0)
39 T&
at(uvec2
const & pos)
41 if (pos.x < 0 || pos.x >=
m_size.x ||
42 pos.y < 0 || pos.y >=
m_size.y)
56 T&
at(uint
const x, uint
const y)
81 if (
m_size == size)
return;
85 auto realSize = size.x*size.y;
92 m_data.assign(realSize, 0);
131 void resize(uvec2
const & size);
137 template<
typename tFnc>
163 bool findNear(uvec2
const & pos, OUT
id_t & foundId, OUT uvec2 & foundPos, OUT
float & foundDistance);
203 template<
typename TBaseLayer,
typename TCurrentLayer>
204 void updateLayerArea(TBaseLayer base, TCurrentLayer current, uint
const offset_x, uint
const offset_y, uint size)
206 for (uint y = 0; y < min(offset_y+size,current->size().y); y++)
207 for (uint x = 0; x < min(offset_x+size,current->size().x); x++)
218 template<
typename TBaseLayer,
typename TCurrentLayer>
219 void updateLayerCell(TBaseLayer base, TCurrentLayer current, uint
const x, uint
const y)
221 current->at(x,y) = base->at(x*2+0, y*2+0)
222 || base->at(x*2+1, y*2+0)
223 || base->at(x*2+0, y*2+1)
224 || base->at(x*2+1, y*2+1);
uint16 id_t
The data-type used for the id-buffer.
Configuration & getConfig()
void updateLayerArea(TBaseLayer base, TCurrentLayer current, uint const offset_x, uint const offset_y, uint size)
vector< MidLevel > m_levels
uint const maxDistance() const
void resize(uvec2 const &size)
void updateLayersBaseCell(uint const layer, uint const x, uint const y)
array< auto_reset_event, 4 > m_updateLayersParallelMutex
Level< BOOLEAN > MidLevel
void updateLayersParallel()
bool pickerMultiThreaded() const
Level(uvec2 const &size=uvec2(0, 0), T const &borderValue=(T) 0)
void updateLayersSerial()
void updateLayerCell(TBaseLayer base, TCurrentLayer current, uint const x, uint const y)
uvec2 const & size() const
T & at(uint const x, uint const y)
void resize(uvec2 const &size)
bool findNear(uvec2 const &pos, OUT id_t &foundId, OUT uvec2 &foundPos, OUT float &foundDistance)
QuadTree(Application *app, uvec2 const &size, uint const maxDistance)