Cytopia
0.3
A city building simulation game
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
z
~
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
a
c
d
e
g
i
m
n
p
r
s
t
u
v
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Functions
b
c
d
f
g
i
m
o
p
r
s
t
w
Variables
a
c
d
g
h
i
l
m
n
r
s
t
Typedefs
a
c
d
e
f
g
i
j
l
m
n
r
s
t
v
Enumerations
Enumerator
a
b
d
e
f
g
l
m
n
p
r
s
t
u
w
z
Macros
_
c
e
i
l
n
r
s
t
v
Examples
▼
Cytopia
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
▼
engine
►
audio
►
basics
►
common
▼
GameObjects
►
MapGrid.hxx
MapGrid.inl.hxx
MapNode.cxx
►
MapNode.hxx
►
map
EventManager.cxx
►
EventManager.hxx
►
Layout.hxx
►
Map.cxx
►
Map.hxx
►
MessageQueue.hxx
MessageQueue.inl.hxx
►
ResourcesManager.cxx
►
ResourcesManager.hxx
Sprite.cxx
►
Sprite.hxx
►
TileManager.cxx
►
TileManager.hxx
►
UIManager.cxx
►
UIManager.hxx
WindowManager.cxx
►
WindowManager.hxx
►
game
►
scripting
►
services
►
util
►
windows
Game.cxx
►
Game.hxx
►
main.cxx
►
MainMenu.cxx
►
MainMenu.hxx
phc.hxx
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
MapGrid.hxx
Go to the documentation of this file.
1
#ifndef MAPGRID_HXX_
2
#define MAPGRID_HXX_
3
4
#include "../basics/Point.hxx"
5
#include <vector>
6
7
template
<
class
T>
class
MapGrid
8
{
9
public
:
10
explicit
MapGrid
(T node);
11
virtual
~MapGrid
() = 0;
12
13
size_t
size
() {
return
m_gridNodes
.size(); };
14
20
virtual
void
addNode
(T node);
21
27
virtual
void
removeNode
(
Point
coordinate);
28
35
bool
isNeighbor
(
Point
coordinate)
const
;
36
43
bool
isMemberOf
(
Point
coordinate)
const
;
44
45
// iterators
46
auto
begin
() {
return
m_gridNodes
.begin(); }
47
auto
end
() {
return
m_gridNodes
.end(); }
48
49
protected
:
50
std::vector<T>
m_gridNodes
;
51
};
52
53
#include "
MapGrid.inl.hxx
"
54
55
#endif
MapGrid.inl.hxx
MapGrid::begin
auto begin()
Definition:
MapGrid.hxx:46
MapGrid::addNode
virtual void addNode(T node)
Add a T node to this gridnode.
Definition:
MapGrid.inl.hxx:7
MapGrid::size
size_t size()
Definition:
MapGrid.hxx:13
MapGrid::isNeighbor
bool isNeighbor(Point coordinate) const
If this coordinate is a neighbor of one of the node in the grid.
Definition:
MapGrid.inl.hxx:16
MapGrid::end
auto end()
Definition:
MapGrid.hxx:47
MapGrid::~MapGrid
virtual ~MapGrid()=0
Definition:
MapGrid.inl.hxx:5
MapGrid::MapGrid
MapGrid(T node)
Definition:
MapGrid.inl.hxx:3
MapGrid::isMemberOf
bool isMemberOf(Point coordinate) const
If this coordinate is part of the grid.
Definition:
MapGrid.inl.hxx:22
MapGrid::removeNode
virtual void removeNode(Point coordinate)
Remove a node on a given coordinate from this gridnode.
Definition:
MapGrid.inl.hxx:9
MapGrid::m_gridNodes
std::vector< T > m_gridNodes
Definition:
MapGrid.hxx:50
Point
Definition:
Point.hxx:7
MapGrid
Definition:
MapGrid.hxx:7
src
engine
GameObjects
MapGrid.hxx
Generated on Sun Nov 27 2022 09:50:52 for Cytopia by
1.8.17