Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
#include "graphics/Terrain.h"
#include "maths/MathUtil.h"
#include "simulation2/system/Entity.h"
#include "PathGoal.h"
Go to the source code of this file.
Classes | |
struct | LongPathRequest |
struct | ShortPathRequest |
struct | Waypoint |
struct | WaypointPath |
Returned path. More... | |
struct | PathCost |
Represents the cost of a path consisting of horizontal/vertical and diagonal movements over a uniform-cost grid. More... | |
class | PathfinderPassability |
Namespaces | |
namespace | Pathfinding |
Macros | |
#define | IS_PASSABLE(item, classmask) (((item) & (classmask)) == 0) |
#define | PASS_CLASS_MASK_FROM_INDEX(id) ((pass_class_t)(1u << id)) |
#define | SPECIAL_PASS_CLASS PASS_CLASS_MASK_FROM_INDEX((PASS_CLASS_BITS-1)) |
Typedefs | |
typedef u16 | pass_class_t |
typedef u16 | NavcellData |
Functions | |
void | Pathfinding::NearestNavcell (entity_pos_t x, entity_pos_t z, u16 &i, u16 &j, u16 w, u16 h) |
Compute the navcell indexes on the grid nearest to a given point w, h are the grid dimensions, i.e. More... | |
void | Pathfinding::TerrainTileCenter (u16 i, u16 j, entity_pos_t &x, entity_pos_t &z) |
Returns the position of the center of the given terrain tile. More... | |
void | Pathfinding::NavcellCenter (u16 i, u16 j, entity_pos_t &x, entity_pos_t &z) |
bool | Pathfinding::CheckLineMovement (entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, pass_class_t passClass, const Grid< NavcellData > &grid) |
Variables | |
constexpr int | PASS_CLASS_BITS = 16 |
constexpr fixed | Pathfinding::NAVCELL_SIZE = fixed::FromInt(1) |
The long-range pathfinder operates primarily over a navigation grid (a uniform-cost 2D passability grid, with horizontal/vertical (not diagonal) connectivity). More... | |
constexpr int | Pathfinding::NAVCELL_SIZE_INT = 1 |
constexpr int | Pathfinding::NAVCELL_SIZE_LOG2 = 0 |
constexpr int | Pathfinding::NAVCELLS_PER_TERRAIN_TILE = TERRAIN_TILE_SIZE / NAVCELL_SIZE_INT |
The terrain grid is coarser, and it is often convenient to convert from one to the other. More... | |
constexpr entity_pos_t | Pathfinding::CLEARANCE_EXTENSION_RADIUS = fixed::FromInt(1) |
To make sure the long-range pathfinder is more strict than the short-range one, we need to slightly over-rasterize. More... | |
#define IS_PASSABLE | ( | item, | |
classmask | |||
) | (((item) & (classmask)) == 0) |
#define PASS_CLASS_MASK_FROM_INDEX | ( | id | ) | ((pass_class_t)(1u << id)) |
#define SPECIAL_PASS_CLASS PASS_CLASS_MASK_FROM_INDEX((PASS_CLASS_BITS-1)) |
typedef u16 NavcellData |
typedef u16 pass_class_t |
|
inlineconstexpr |