![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Common code and setup code for CCmpPathfinder. More...
#include "precompiled.h"#include "CCmpPathfinder_Common.h"#include "graphics/Terrain.h"#include "lib/code_generation.h"#include "lib/debug.h"#include "lib/path.h"#include "maths/Fixed.h"#include "maths/FixedVector2D.h"#include "maths/MathUtil.h"#include "ps/CLogger.h"#include "ps/Filesystem.h"#include "ps/Future.h"#include "ps/Profile.h"#include "ps/Profiler2.h"#include "ps/TaskManager.h"#include "ps/XML/Xeromyces.h"#include "simulation2/MessageTypes.h"#include "simulation2/components/ICmpObstruction.h"#include "simulation2/components/ICmpObstructionManager.h"#include "simulation2/components/ICmpPathfinder.h"#include "simulation2/components/ICmpPosition.h"#include "simulation2/components/ICmpTerrain.h"#include "simulation2/components/ICmpWaterManager.h"#include "simulation2/helpers/Grid.h"#include "simulation2/helpers/HierarchicalPathfinder.h"#include "simulation2/helpers/LongPathfinder.h"#include "simulation2/helpers/MapEdgeTiles.h"#include "simulation2/helpers/PathGoal.h"#include "simulation2/helpers/Pathfinding.h"#include "simulation2/helpers/Position.h"#include "simulation2/helpers/Rasterize.h"#include "simulation2/helpers/VertexPathfinder.h"#include "simulation2/serialization/SerializeTemplates.h"#include "simulation2/serialization/SerializedPathfinder.h"#include "simulation2/serialization/SerializedTypes.h"#include "simulation2/system/Component.h"#include "simulation2/system/Entity.h"#include "simulation2/system/Message.h"#include <algorithm>#include <atomic>#include <cstring>#include <map>#include <memory>#include <string>#include <type_traits>#include <utility>#include <vector>
Classes | |
| struct | SerializeHelper< LongPathRequest > |
| struct | SerializeHelper< ShortPathRequest > |
Namespaces | |
| namespace | anonymous_namespace{CCmpPathfinder.cpp} |
Functions | |
| void | anonymous_namespace{CCmpPathfinder.cpp}::BuildTextureRGBA (const CCmpPathfinder &pathfinder, std::uint8_t *data, std::size_t w, std::size_t h) |
| static void | ExpandImpassableCells (Grid< NavcellData > &grid, std::uint16_t 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.