kgrid2d.h File Reference

#include <math.h>
#include <QtCore/QPair>
#include <QtCore/QVector>
#include <QtCore/QTextStream>
#include <kglobal.h>

Include dependency graph for kgrid2d.h:

Go to the source code of this file.

Namespaces

namespace  KGrid2D

Classes

class  KGrid2D::Generic< Type >
 This template class represents a generic bidimensionnal grid. More...
class  KGrid2D::SquareBase
 This class contains static methods to manipulate coordinates for a square bidimensionnal grid. More...
class  KGrid2D::Square< T >
 This template is a Generic implementation for a square bidimensionnal grid (SquareBase). More...
class  KGrid2D::HexagonalBase
 This class contains static methods to manipulate coordinates on an hexagonal grid where hexagons form horizontal lines:. More...
class  KGrid2D::Hexagonal< Type >
 This template implements a hexagonal grid where hexagons form horizontal lines:. More...

Typedefs

typedef QPair< int, int > KGrid2D::Coord
 This type represents coordinates on a bidimensionnal grid.
typedef QList< Coord > KGrid2D::CoordList
 This type represents a list of Coord.

Functions

KGrid2D::Coord operator+ (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
KGrid2D::Coord operator- (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
KGrid2D::Coord maximum (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
 
Returns:
the maximum of both coordinates.

KGrid2D::Coord minimum (const KGrid2D::Coord &c1, const KGrid2D::Coord &c2)
 
Returns:
the minimum of both coordinates.

QTextStream & operator<< (QTextStream &s, const KGrid2D::Coord &c)
QTextStream & operator<< (QTextStream &s, const KGrid2D::CoordList &list)
template<class Type>
QDataStream & operator<< (QDataStream &s, const KGrid2D::Generic< Type > &m)
template<class Type>
QDataStream & operator>> (QDataStream &s, KGrid2D::Generic< Type > &m)


Function Documentation

KGrid2D::Coord maximum ( const KGrid2D::Coord c1,
const KGrid2D::Coord c2 
) [inline]

Returns:
the maximum of both coordinates.

Definition at line 61 of file kgrid2d.h.

KGrid2D::Coord minimum ( const KGrid2D::Coord c1,
const KGrid2D::Coord c2 
) [inline]

Returns:
the minimum of both coordinates.

Definition at line 68 of file kgrid2d.h.

KGrid2D::Coord operator+ ( const KGrid2D::Coord c1,
const KGrid2D::Coord c2 
) [inline]

Definition at line 48 of file kgrid2d.h.

KGrid2D::Coord operator- ( const KGrid2D::Coord c1,
const KGrid2D::Coord c2 
) [inline]

Definition at line 53 of file kgrid2d.h.

template<class Type>
QDataStream& operator<< ( QDataStream &  s,
const KGrid2D::Generic< Type > &  m 
) [inline]

Definition at line 203 of file kgrid2d.h.

QTextStream& operator<< ( QTextStream &  s,
const KGrid2D::CoordList list 
) [inline]

Definition at line 76 of file kgrid2d.h.

QTextStream& operator<< ( QTextStream &  s,
const KGrid2D::Coord c 
) [inline]

Definition at line 72 of file kgrid2d.h.

template<class Type>
QDataStream& operator>> ( QDataStream &  s,
KGrid2D::Generic< Type > &  m 
) [inline]

Definition at line 210 of file kgrid2d.h.

References KGrid2D::Generic< Type >::resize(), and KGrid2D::Generic< Type >::size().

Here is the call graph for this function:


Generated on Sun Mar 16 08:03:02 2008 for Libkdegames by  doxygen 1.5.3