Pyrogenesis
13997
|
Declares CCmpPathfinder, whose implementation is split into multiple source files, and provides common code needed for more than one of those files. More...
#include "simulation2/system/Component.h"
#include "ICmpPathfinder.h"
#include "graphics/Overlay.h"
#include "graphics/Terrain.h"
#include "maths/MathUtil.h"
#include "simulation2/helpers/Geometry.h"
#include "simulation2/helpers/Grid.h"
Go to the source code of this file.
Classes | |
class | PathfinderPassability |
struct | AsyncLongPathRequest |
struct | AsyncShortPathRequest |
class | CCmpPathfinder |
Implementation of ICmpPathfinder. More... | |
Macros | |
#define | PATHFIND_DEBUG 1 |
#define | IS_TERRAIN_PASSABLE(item, classmask) (((item) & (classmask)) == 0) |
#define | IS_PASSABLE(item, classmask) (((item) & ((classmask) | 1)) == 0) |
#define | GET_COST_CLASS(item) ((item) >> (PASS_CLASS_BITS + 2)) |
#define | COST_CLASS_MASK(id) ( (TerrainTile) ((id) << (PASS_CLASS_BITS + 2)) ) |
Typedefs | |
typedef u16 | TerrainTile |
typedef SparseGrid< PathfindTile > | PathfindTileGrid |
Variables | |
const int | PASS_CLASS_BITS = 10 |
const int | COST_CLASS_BITS = 16 - (PASS_CLASS_BITS + 2) |
Declares CCmpPathfinder, whose implementation is split into multiple source files, and provides common code needed for more than one of those files.
CCmpPathfinder includes two pathfinding algorithms (one tile-based, one vertex-based) with some shared state and functionality, so the code is split into CCmpPathfinder_Vertex.cpp, CCmpPathfinder_Tile.cpp and CCmpPathfinder.cpp
Definition in file CCmpPathfinder_Common.h.
#define COST_CLASS_MASK | ( | id | ) | ( (TerrainTile) ((id) << (PASS_CLASS_BITS + 2)) ) |
Definition at line 137 of file CCmpPathfinder_Common.h.
#define GET_COST_CLASS | ( | item | ) | ((item) >> (PASS_CLASS_BITS + 2)) |
Definition at line 136 of file CCmpPathfinder_Common.h.
#define IS_PASSABLE | ( | item, | |
classmask | |||
) | (((item) & ((classmask) | 1)) == 0) |
Definition at line 135 of file CCmpPathfinder_Common.h.
#define IS_TERRAIN_PASSABLE | ( | item, | |
classmask | |||
) | (((item) & (classmask)) == 0) |
Definition at line 134 of file CCmpPathfinder_Common.h.
#define PATHFIND_DEBUG 1 |
Definition at line 47 of file CCmpPathfinder_Common.h.
typedef SparseGrid<PathfindTile> PathfindTileGrid |
Definition at line 139 of file CCmpPathfinder_Common.h.
typedef u16 TerrainTile |
Definition at line 126 of file CCmpPathfinder_Common.h.
const int COST_CLASS_BITS = 16 - (PASS_CLASS_BITS + 2) |
Definition at line 133 of file CCmpPathfinder_Common.h.
const int PASS_CLASS_BITS = 10 |
Definition at line 132 of file CCmpPathfinder_Common.h.