45 #ifndef __GRAPH_VERTEX_H__
46 #define __GRAPH_VERTEX_H__
48 #include "mengeCommon.h"
195 #endif // __GRAPH_VERTEX_H__
GraphEdge * _edges
An array of edges connecting to other vertices.
Definition: GraphVertex.h:176
GraphVertex & operator=(const GraphVertex &n)
Assignment operator.
Definition: GraphVertex.cpp:62
void setPosition(const Vector2 &p)
Sets the graph vertex's position.
Definition: GraphVertex.h:108
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
float getDistance(const GraphVertex &other)
Computes the distance between this vertex and the given vertex.
Definition: GraphVertex.h:81
size_t _id
The identifier for this vertex.
Definition: GraphVertex.h:191
void setEdge(const GraphEdge &edge, size_t i)
Sets the ith edge for the vertex.
Definition: GraphVertex.cpp:89
A graph edge.
Definition: GraphEdge.h:58
void set(Type x, Type y)
Set the x- and y-values from scalar values.
Definition: Vector2.h:121
Vector2 _pos
The position of this vertex.
Definition: GraphVertex.h:186
size_t getID() const
Retrive the identifier for this node.
Definition: GraphVertex.h:101
const GraphEdge & getEdge(size_t i) const
Retrieves a const pointer to the ith edge connected to this node.
Definition: GraphVertex.h:169
const GraphVertex * getNeighbor(size_t i) const
Returns a pointer to the ith neighbor.
Definition: GraphVertex.cpp:96
size_t getEdgeCount() const
Reports the number of edges on the node.
Definition: GraphVertex.h:153
~GraphVertex()
Destructor.
Definition: GraphVertex.cpp:54
A graph vertex.
Definition: GraphVertex.h:56
GraphEdge & getEdge(size_t i)
Retrieves the ith edge connected to this node.
Definition: GraphVertex.h:161
GraphVertex()
Constructor.
Definition: GraphVertex.cpp:49
The definition of a graph edge for performing graph searches and path planning.
void setID(size_t id)
Sets the node identifier.
Definition: GraphVertex.h:96
Vector2 getPosition() const
Reports the position of the vertex.
Definition: GraphVertex.h:115
void setDegree(size_t degree)
Sets the degree – the number of neighbors this vertex has.
Definition: GraphVertex.cpp:103
size_t _edgeCount
The number of edges connecting to this vertex.
Definition: GraphVertex.h:181
size_t getNeighborCount() const
Reports the number of vertices adjacent to this vertex.
Definition: GraphVertex.h:128