48 #include "mengeCommon.h"
77 Graph(
const std::string & fileName );
91 virtual const std::string &
getLabel()
const {
return LABEL; }
110 static Resource * load(
const std::string & fileName );
156 size_t getClosestVertex(
const Vector2 & point,
float radius );
168 RoadMapPath * getPath(
size_t startID,
size_t endID );
179 inline float computeH(
size_t v,
const Vector2 & goal ) {
return abs( _vertices[v].getPosition() - goal ); }
195 void initHeapMemory();
256 #endif // __GRAPH_H__
unsigned int * _PATH
The full set of data for reconstructing the path. For any given entry i, the value at i is the index ...
Definition: Graph.h:222
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
ResourcePtr< Graph > GraphPtr
forward declaration of graph resource pointer. see graph.h for more details
Definition: VelCompRoadMap.h:63
A roadmap graph and the infrastructure for performing graph searches. NOTE: This implementation assum...
Definition: Graph.h:70
float * _DATA
The block of data for tracking the f, g, and h data for nodes. (This is where DATA_SIZE = 3N comes fr...
Definition: Graph.h:231
The base, abstract class defining goals.
Definition: Goal.h:110
Basic class for managing on-disk resources.
Definition: Resource.h:98
GraphPtr loadGraph(const std::string &fileName)
Loads the graph of the given name.
Definition: Graph.cpp:304
A base exception for resources to throw.
Definition: Resource.h:58
bool * _STATE
Block of data for reportin node state (if its in a heap or if its no longer used for calculation...
Definition: Graph.h:238
GraphVertex * _vertices
An array containing all vertices.
Definition: Graph.h:189
size_t DATA_SIZE
The size of a block of data used for COST in the A* algorithm (3N, N = number of nodes) ...
Definition: Graph.h:201
unsigned int * _HEAP
The full set of data to serve as the heap There are N entries in a single heap and one heap per threa...
Definition: Graph.h:214
The namespace contains the Behavior Finite State Machine (BFSM) definition.
size_t getVertexCount() const
Return the number of vertices in the graph.
Definition: Graph.h:127
A path on a roadmap between vertices.
Definition: RoadMapPath.h:82
A graph vertex.
Definition: GraphVertex.h:56
Defines the basic agent properties and functionality that all simulation agents share.
Definition: BaseAgent.h:123
The basic class for all on-disk resources.
virtual const std::string & getLabel() const
Returns a unique resource label to be used to identify different resource types which use the same un...
Definition: Graph.h:91
size_t _vCount
The number of vertices.
Definition: Graph.h:184
The namespace that contains the basic simulation mechanisms.
size_t STATE_SIZE
The size of a block of data used for STATE in the A* algorithm (2N, N = number of nodes) ...
Definition: Graph.h:207
The definition of a graph vertex for performing graph searches and path planning. ...
float computeH(size_t v, const Vector2 &goal)
Compute's "h" for the A* algorithm. H is the estimate of the cost of a node to a goal point...
Definition: Graph.h:179
static const std::string LABEL
The unique label for this data type to be used with resource management.
Definition: Graph.h:144