Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Common code and setup code for CCmpPathfinder. More...
#include "precompiled.h"
#include "CCmpPathfinder_Common.h"
#include "simulation2/MessageTypes.h"
#include "simulation2/components/ICmpObstruction.h"
#include "simulation2/components/ICmpObstructionManager.h"
#include "simulation2/components/ICmpTerrain.h"
#include "simulation2/components/ICmpWaterManager.h"
#include "simulation2/helpers/HierarchicalPathfinder.h"
#include "simulation2/helpers/LongPathfinder.h"
#include "simulation2/helpers/MapEdgeTiles.h"
#include "simulation2/helpers/Rasterize.h"
#include "simulation2/helpers/VertexPathfinder.h"
#include "simulation2/serialization/SerializedPathfinder.h"
#include "simulation2/serialization/SerializedTypes.h"
#include "ps/CLogger.h"
#include "ps/CStr.h"
#include "ps/Profile.h"
#include "ps/XML/Xeromyces.h"
#include "renderer/Scene.h"
#include <type_traits>
Classes | |
struct | SerializeHelper< LongPathRequest > |
struct | SerializeHelper< ShortPathRequest > |
Functions | |
static void | ExpandImpassableCells (Grid< NavcellData > &grid, u16 clearance, pass_class_t mask) |
Given a grid of passable/impassable navcells (based on some passability mask), computes a new grid where a navcell is impassable (per that mask) if it is <=clearance navcells away from an impassable navcell in the original grid. More... | |
Common code and setup code for CCmpPathfinder.
|
static |
Given a grid of passable/impassable navcells (based on some passability mask), computes a new grid where a navcell is impassable (per that mask) if it is <=clearance navcells away from an impassable navcell in the original grid.
The results are ORed onto the original grid.
This is used for adding clearance onto terrain-based navcell passability.
TODO PATHFINDER: might be nicer to get rounded corners by measuring clearances as Euclidean distances; currently it effectively does dist=max(dx,dy) instead. This would only really be a problem for big clearances.