19#ifndef HEADER_ARENA_GRAPH_HPP
20#define HEADER_ARENA_GRAPH_HPP
22#include "tracks/graph.hpp"
23#include "utils/cpp2011.hpp"
46 std::set<int> m_blue_node;
49 void loadGoalNodes(
const XMLNode *node);
51 void loadNavmesh(
const std::string &navmesh);
55 void setNearbyNodesOfAllNodes();
62 const std::vector< std::vector< int16_t > >& parent_node);
64 virtual bool hasLapLine() const OVERRIDE {
return false; }
66 virtual void differentNodeColor(
int n, video::SColor* c)
const OVERRIDE;
85 if (i == Graph::UNKNOWN_SECTOR || j == Graph::UNKNOWN_SECTOR)
86 return Graph::UNKNOWN_SECTOR;
93 if (from == Graph::UNKNOWN_SECTOR || to == Graph::UNKNOWN_SECTOR)
A graph made from navmesh.
Definition: arena_graph.hpp:35
static std::vector< int16_t > getPathFromTo(int from, int to, const std::vector< std::vector< int16_t > > &parent_node)
Determines the full path from 'from' to 'to' and returns it in a std::vector (in reverse order).
Definition: arena_graph.cpp:373
static void unitTesting()
Unit testing for arena graph distance and parent node computation.
Definition: arena_graph.cpp:393
int getNextNode(int i, int j) const
Returns the next node on the shortest path from i to j.
Definition: arena_graph.hpp:83
std::vector< std::vector< float > > m_distance_matrix
The actual graph data structure, it is an adjacency matrix.
Definition: arena_graph.hpp:38
std::set< int > m_red_node
Used in soccer mode to colorize the goal lines in minimap.
Definition: arena_graph.hpp:44
std::vector< std::vector< int16_t > > m_parent_node
The matrix that is used to store computed shortest paths.
Definition: arena_graph.hpp:41
float getDistance(int from, int to) const
Returns the distance between any two nodes.
Definition: arena_graph.hpp:91
void computeFloydWarshall()
THIS FUNCTION IS ONLY USED FOR UNIT-TESTING, to verify that the new Dijkstra algorithm gives the same...
Definition: arena_graph.cpp:277
void computeDijkstra(int n)
Dijkstra shortest path computation.
Definition: arena_graph.cpp:220
Definition: arena_node.hpp:32
This class stores a graph of quads.
Definition: graph.hpp:53
utility class used to parse XML files
Definition: xml_node.hpp:48