#include <kgrid2d.h>

Public Member Functions | |
| Generic (uint width=0, uint height=0) | |
| Constructor. | |
| virtual | ~Generic () |
| void | resize (uint width, uint height) |
| Resize the grid. | |
| void | fill (const Type &value) |
| Fill the nodes with the given value. | |
| uint | width () const |
| |
| uint | height () const |
| |
| uint | size () const |
| |
| uint | index (const Coord &c) const |
| |
| Coord | coord (uint index) const |
| |
| const Type & | at (const Coord &c) const |
| |
| Type & | at (const Coord &c) |
| |
| const Type & | operator[] (const Coord &c) const |
| |
| Type & | operator[] (const Coord &c) |
| |
| const Type & | at (uint index) const |
| |
| Type & | at (uint index) |
| |
| const Type & | operator[] (uint index) const |
| |
| Type & | operator[] (uint index) |
| |
| bool | inside (const Coord &c) const |
| |
| void | bound (Coord &c) const |
| Bound the given coordinate with the grid dimensions. | |
Protected Attributes | |
| uint | _width |
| uint | _height |
| QVector< Type > | _vector |
Each node contains an element of the template type.
Definition at line 91 of file kgrid2d.h.
| KGrid2D::Generic< Type >::Generic | ( | uint | width = 0, |
|
| uint | height = 0 | |||
| ) | [inline] |
| virtual KGrid2D::Generic< Type >::~Generic | ( | ) | [inline, virtual] |
| void KGrid2D::Generic< Type >::resize | ( | uint | width, | |
| uint | height | |||
| ) | [inline] |
Resize the grid.
Definition at line 106 of file kgrid2d.h.
Referenced by KGrid2D::Generic< T >::Generic(), and operator>>().
| void KGrid2D::Generic< Type >::fill | ( | const Type & | value | ) | [inline] |
| uint KGrid2D::Generic< Type >::width | ( | ) | const [inline] |
Definition at line 122 of file kgrid2d.h.
Referenced by KGrid2D::Generic< T >::Generic().
| uint KGrid2D::Generic< Type >::height | ( | ) | const [inline] |
Definition at line 126 of file kgrid2d.h.
Referenced by KGrid2D::Generic< T >::Generic().
| uint KGrid2D::Generic< Type >::size | ( | ) | const [inline] |
Definition at line 130 of file kgrid2d.h.
Referenced by operator>>().
| uint KGrid2D::Generic< Type >::index | ( | const Coord & | c | ) | const [inline] |
Definition at line 135 of file kgrid2d.h.
Referenced by KGrid2D::Generic< T >::at(), and KGrid2D::Generic< T >::operator[]().
| Coord KGrid2D::Generic< Type >::coord | ( | uint | index | ) | const [inline] |
| const Type& KGrid2D::Generic< Type >::at | ( | const Coord & | c | ) | const [inline] |
| Type& KGrid2D::Generic< Type >::at | ( | const Coord & | c | ) | [inline] |
| const Type& KGrid2D::Generic< Type >::operator[] | ( | const Coord & | c | ) | const [inline] |
| Type& KGrid2D::Generic< Type >::operator[] | ( | const Coord & | c | ) | [inline] |
| const Type& KGrid2D::Generic< Type >::at | ( | uint | index | ) | const [inline] |
| Type& KGrid2D::Generic< Type >::at | ( | uint | index | ) | [inline] |
| const Type& KGrid2D::Generic< Type >::operator[] | ( | uint | index | ) | const [inline] |
| Type& KGrid2D::Generic< Type >::operator[] | ( | uint | index | ) | [inline] |
| bool KGrid2D::Generic< Type >::inside | ( | const Coord & | c | ) | const [inline] |
| void KGrid2D::Generic< Type >::bound | ( | Coord & | c | ) | const [inline] |
uint KGrid2D::Generic< Type >::_width [protected] |
Definition at line 197 of file kgrid2d.h.
Referenced by KGrid2D::Generic< T >::bound(), KGrid2D::Generic< T >::coord(), KGrid2D::Generic< T >::index(), KGrid2D::Generic< T >::inside(), KGrid2D::Generic< T >::resize(), KGrid2D::Generic< T >::size(), and KGrid2D::Generic< T >::width().
uint KGrid2D::Generic< Type >::_height [protected] |
Definition at line 197 of file kgrid2d.h.
Referenced by KGrid2D::Generic< T >::bound(), KGrid2D::Generic< T >::height(), KGrid2D::Generic< T >::inside(), KGrid2D::Generic< T >::resize(), and KGrid2D::Generic< T >::size().
QVector<Type> KGrid2D::Generic< Type >::_vector [protected] |
Definition at line 198 of file kgrid2d.h.
Referenced by KGrid2D::Generic< T >::at(), KGrid2D::Generic< T >::fill(), KGrid2D::Generic< T >::operator[](), and KGrid2D::Generic< T >::resize().
1.5.3