KGrid2D::Generic< Type > Class Template Reference
This template class represents a generic bidimensionnal grid.
More...
#include <kgrid2d.h>
Inheritance diagram for KGrid2D::Generic< Type >:
List of all members.
Detailed Description
template<class Type>
class KGrid2D::Generic< Type >
This template class represents a generic bidimensionnal grid.
Each node contains an element of the template type.
- Since:
- 3.2
Definition at line 96 of file kgrid2d.h.
Constructor & Destructor Documentation
Member Function Documentation
template<class Type> |
void KGrid2D::Generic< Type >::resize |
( |
uint |
width, |
|
|
uint |
height |
|
) |
[inline] |
|
template<class Type> |
void KGrid2D::Generic< Type >::fill |
( |
const Type & |
value |
) |
[inline] |
|
|
Fill the nodes with the given value.
Definition at line 120 of file kgrid2d.h. |
|
- Returns:
- the width.
Definition at line 127 of file kgrid2d.h. |
|
- Returns:
- the height.
Definition at line 131 of file kgrid2d.h. |
|
- Returns:
- the number of nodes (ie width*height).
Definition at line 135 of file kgrid2d.h. |
|
- Returns:
- the coordinate corresponding to the linear index.
Definition at line 147 of file kgrid2d.h. |
|
- Returns:
- the value at the given coordinate.
Definition at line 154 of file kgrid2d.h. |
|
- Returns:
- the value at the given coordinate.
Definition at line 158 of file kgrid2d.h. |
|
- Returns:
- the value at the given coordinate.
Definition at line 162 of file kgrid2d.h. |
|
- Returns:
- the value at the given coordinate.
Definition at line 166 of file kgrid2d.h. |
template<class Type> |
const Type& KGrid2D::Generic< Type >::at |
( |
uint |
index |
) |
const [inline] |
|
|
- Returns:
- the value at the given linear index.
Definition at line 171 of file kgrid2d.h. |
|
- Returns:
- the value at the given linear index.
Definition at line 175 of file kgrid2d.h. |
template<class Type> |
const Type& KGrid2D::Generic< Type >::operator[] |
( |
uint |
index |
) |
const [inline] |
|
|
- Returns:
- the value at the given linear index.
Definition at line 179 of file kgrid2d.h. |
template<class Type> |
Type& KGrid2D::Generic< Type >::operator[] |
( |
uint |
index |
) |
[inline] |
|
|
- Returns:
- the value at the given linear index.
Definition at line 183 of file kgrid2d.h. |
|
- Returns:
- if the given coordinate is inside the grid.
Definition at line 188 of file kgrid2d.h. |
|
Bound the given coordinate with the grid dimensions.
Definition at line 196 of file kgrid2d.h. |
The documentation for this class was generated from the following file:
This file is part of the documentation for libkdegames Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Apr 18 06:22:59 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003