45 #ifndef __NAV_MESH_NODE_H__
46 #define __NAV_MESH_NODE_H__
58 class NavMeshObstacle;
284 #endif // __NAV_MESH_NODE_H__
unsigned int * _vertIDs
An array of indices into the vertex list defining the polygon. The indices must be ordered such that ...
Definition: NavMeshPoly.h:155
const NavMeshEdge * getEdge(size_t i) const
Retrieves a const pointer to the ith edge connected to this node.
Definition: NavMeshNode.h:199
NavMeshEdge ** _edges
An array of edges connecting to other nodes.
Definition: NavMeshNode.h:249
bool loadFromAscii(std::ifstream &f)
Sets the node properties from a node definition in the given ascii file stream.
Definition: NavMeshNode.cpp:128
NavMeshNode()
Constructor.
Definition: NavMeshNode.cpp:52
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
float getElevation(const Vector2 &point) const
Computes the elevation of the polygon at the given point.
Definition: NavMeshPoly.cpp:161
const NavMeshObstacle * getObstacle(size_t i) const
Returns a const pointer to the ith obstacle in the node.
Definition: NavMeshNode.h:153
NavMeshPoly _poly
The polygon associated with this node.
Definition: NavMeshNode.h:275
const NavMeshNode * getNeighbor(size_t i) const
Returns a pointer to the ith neighbor.
Definition: NavMeshNode.cpp:99
size_t _vertCount
The number of vertices in the polygon.
Definition: NavMeshPoly.h:160
unsigned int _id
The identifier of this node.
Definition: NavMeshNode.h:280
size_t getObstacleCount() const
Returns the number of obstacles connected to this node.
Definition: NavMeshNode.h:145
The navigation mesh adjacency graph node. It corresponds to a convex polygon in the navigation mesh...
Definition: NavMeshNode.h:64
NavMeshNode & operator=(const NavMeshNode &n)
Assignment operator.
Definition: NavMeshNode.cpp:68
NavMeshEdge * getConnection(unsigned nodeID)
Returns the pointer to the edge connecting this node with the node whose identifier is given...
Definition: NavMeshNode.cpp:106
The polygon used in each node of a navigation mesh graph.
Definition: NavMeshPoly.h:61
Vector2 getGradient() const
Computes the gradient based on this node's polygon.
Definition: NavMeshNode.h:239
void setID(unsigned int id)
Sets the node identifier.
Definition: NavMeshNode.h:86
void setVertices(const Vector2 *vertices)
Sets this node's polygon to the given vertex array. The polygon can then evaluate its indices with re...
Definition: NavMeshNode.h:129
bool containsPoint(const Vector2 &point) const
Reports if the given point is inside the polygon.
Definition: NavMeshNode.h:219
void set(Type x, Type y)
Set the x- and y-values from scalar values.
Definition: Vector2.h:121
Vector2 getCenter() const
Reports the center (centroid) of the node's polygon.
Definition: NavMeshNode.h:105
The navigation mesh adjacency graph edge.
Definition: NavMeshEdge.h:72
~NavMeshNode()
Destructor.
Definition: NavMeshNode.cpp:57
Defines the geometric, convex polygon for each navigation mesh node.
Class for computing paths through a navigation mesh.
Definition: PathPlanner.h:133
Vector2 getGradient() const
Reports the gradient of the polygon. Because it is a plane, the gradient is constant at all positions...
Definition: NavMeshPoly.h:106
Vector3 getCenter3D() const
Reports the center (centroid) of the node's polygon.
Definition: NavMeshNode.h:112
const Vector2 * _vertices
A pointer to the mesh vertex information for performing geometric tests.
Definition: NavMeshPoly.h:166
Vector2 _center
The "position" of the node - used to compute distance between node and goal (A* heuristic) ...
Definition: NavMeshNode.h:270
NavMeshObstacle ** _obstacles
An array of obstacles connected to this node.
Definition: NavMeshNode.h:259
float getElevation(const Vector2 &p) const
Computes the height based on this node's polygon.
Definition: NavMeshNode.h:234
size_t getEdgeCount() const
Reports the number of edges on the node.
Definition: NavMeshNode.h:183
unsigned int getID() const
Retrive the identifier for this node.
Definition: NavMeshNode.h:91
size_t _obstCount
The number of obstacles connecting to this node.
Definition: NavMeshNode.h:264
unsigned int getVertexID(size_t i) const
Gets the index of the ith vertex in this node's polygon.
Definition: NavMeshNode.h:138
Specification of an obstacle. It is the same as a pedModel specification but includes a pointer to a ...
Definition: NavMeshObstacle.h:61
Collection of convenient pre-compiler information for fsm definitions.
The class for defining a navigation mesh. A decomposition of the free space into a connected mesh of ...
Definition: NavMesh.h:120
size_t getVertexCount() const
Returns the number of vertices in the node's polygon.
Definition: NavMeshNode.h:119
size_t getNeighborCount() const
Reports the number of nodes adjacent to this node.
Definition: NavMeshNode.h:166
void setCenter(const Vector2 &c)
Sets the node's center value.
Definition: NavMeshNode.h:98
bool containsPoint(const Vector2 &point) const
Reports if the point lies inside the polygon. NOTE: This is limited to 2D polygons.
Definition: NavMeshPoly.cpp:75
NavMeshObstacle * getObstacle(size_t i)
Returns a const pointer to the ith obstacle in the node.
Definition: NavMeshNode.h:161
Type x() const
Get the x-value.
Definition: Vector2.h:106
size_t _edgeCount
The number of edges connecting to this node.
Definition: NavMeshNode.h:254
NavMeshEdge * getEdge(size_t i)
Retrieves the ith edge connected to this node.
Definition: NavMeshNode.h:191
Type y() const
Get the y-value.
Definition: Vector2.h:113