Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
QuadTree::Level< T > Class Template Reference

Public Member Functions

 Level (uvec2 const &size=uvec2(0, 0), T const &borderValue=(T) 0)
 
T & at (uvec2 const &pos)
 
T & at (uint const x, uint const y)
 
T * data ()
 
void clear ()
 
void resize (uvec2 const &size)
 
uvec2 const & size () const
 

Private Attributes

uvec2 m_size
 
vector< T > m_data
 
m_borderValue
 

Detailed Description

template<typename T>
class QuadTree::Level< T >

QuadTree::Level represents a level in the quad-tree.

Definition at line 15 of file QuadTree.hpp.

Constructor & Destructor Documentation

Level ( uvec2 const &  size = uvec2(0,0),
T const &  borderValue = (T)0 
)
inline

Constructs a Level.

Parameters
sizeThe size of the level
borderValuethe value that shall be returned when accessing a cell outside the borders

Definition at line 28 of file QuadTree.hpp.

Member Function Documentation

T& at ( uvec2 const &  pos)
inline

Accessor to a cell.

Parameters
posThe position of the cell
Returns
The value at the cell

Definition at line 39 of file QuadTree.hpp.

T& at ( uint const  x,
uint const  y 
)
inline

Accessor to a cell.

Parameters
xThe x-coordinate of the cell
yThe y-coordinate of the cell
Returns
The value at the cell

Definition at line 56 of file QuadTree.hpp.

void clear ( )
inline

Sets all cells to 0.

Definition at line 71 of file QuadTree.hpp.

T* data ( )
inline

Accessor to the layers data.

Returns
The layers data

Definition at line 64 of file QuadTree.hpp.

void resize ( uvec2 const &  size)
inline

Resizes the layer.

Parameters
sizeThe new size of the layer

Definition at line 79 of file QuadTree.hpp.

uvec2 const& size ( ) const
inline

Accessor to the layers size.

Returns
The layers size.

Definition at line 100 of file QuadTree.hpp.

Member Data Documentation

T m_borderValue
private

The value that shall be returned when accessing a cell outside the borders

Definition at line 19 of file QuadTree.hpp.

vector<T> m_data
private

The data of the value

Definition at line 18 of file QuadTree.hpp.

uvec2 m_size
private

The size of the level

Definition at line 17 of file QuadTree.hpp.


The documentation for this class was generated from the following file: