Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/helpers/VertexPathfinder.h
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | private: | ||||
mutable std::vector<Vertex> m_Vertexes; | mutable std::vector<Vertex> m_Vertexes; | ||||
// List of collision edges - paths must never cross these. | // List of collision edges - paths must never cross these. | ||||
// (Edges are one-sided so intersections are fine in one direction, but not the other direction.) | // (Edges are one-sided so intersections are fine in one direction, but not the other direction.) | ||||
mutable std::vector<Edge> m_Edges; | mutable std::vector<Edge> m_Edges; | ||||
mutable std::vector<Square> m_EdgeSquares; // Axis-aligned squares; equivalent to 4 edges. | mutable std::vector<Square> m_EdgeSquares; // Axis-aligned squares; equivalent to 4 edges. | ||||
}; | }; | ||||
/** | /** | ||||
* If there are several vertex pathfinders running asynchronously, their debug output might conflict. | * There are several vertex pathfinders running asynchronously, so their debug output | ||||
* To remain thread-safe, this single class will handle the debug data. | * might conflict. To remain thread-safe, this single class will handle the debug data. | ||||
* NB: though threadsafe, the way things are setup means you can have a few | * NB: though threadsafe, the way things are setup means you can have a few | ||||
* more graphs and edges than you'd expect showing up in the rendered graph. | * more graphs and edges than you'd expect showing up in the rendered graph. | ||||
*/ | */ | ||||
class VertexPathfinderDebugOverlay | class VertexPathfinderDebugOverlay | ||||
{ | { | ||||
friend class VertexPathfinder; | friend class VertexPathfinder; | ||||
public: | public: | ||||
void SetDebugOverlay(bool enabled) { m_DebugOverlay = enabled; } | void SetDebugOverlay(bool enabled) { m_DebugOverlay = enabled; } | ||||
Show All 16 Lines |
Wildfire Games · Phabricator