Menge
Modular Pedestrian Simulation Framework for Research and Development
|
A spatial query structure based on a navigation mesh. More...
#include <SpatialQueryNavMesh.h>
Public Member Functions | |
NavMeshSpatialQuery () | |
Constructor. | |
virtual void | setAgents (const std::vector< BaseAgent * > &agents) |
Define the set of agents on which kd-tree will query. | |
virtual void | updateAgents () |
Allows the spatial query structure to update its knowledge of the agent positions. More... | |
virtual void | agentQuery (ProximityQuery *query) const |
gets agents within a range, and passes them to the supplied filter More... | |
virtual void | agentQuery (ProximityQuery *query, float &rangeSq) const |
performs an agent based proximity query More... | |
virtual void | processObstacles () |
Do the necessary pre-computation to support obstacle definitions. | |
virtual void | obstacleQuery (ProximityQuery *query) const |
performs an obstacle based proximity query More... | |
virtual void | obstacleQuery (ProximityQuery *query, float rangeSq) const |
performs an obstacle based proximity query More... | |
virtual bool | queryVisibility (const Vector2 &q1, const Vector2 &q2, float radius) const |
Queries the visibility between two points within a specified radius. NOT CURRENTLY IMPLEMENTED! More... | |
void | setNavMeshLocalizer (const NavMeshLocalizerPtr &nml) |
Sets the navigation mesh localizer pointer. More... | |
virtual BFSM::Task * | getTask () |
Returns a pointer to the nav mesh localizer task. More... | |
Public Member Functions inherited from Menge::Agents::SpatialQuery | |
SpatialQuery () | |
Constructor. | |
virtual void | addObstacle (Obstacle *obs) |
adds an obstacle to the internal list of the spatial query | |
const std::vector< Obstacle * > | getObstacles () |
returns the collected obstacles of the spatial query for use in visualization More... | |
virtual void | setNeighborVisibleTest (bool state) |
Sets the spatial query to include visibility in finding agent neighbors. More... | |
void | setTestVisibility (bool status) |
Sets the test visibility status of the neighbor functions. More... | |
bool | getTestVisibility () const |
Reports the test visibility property of the spatial query instance. More... | |
Public Member Functions inherited from Menge::Element | |
void | destroy () |
This supplants the destructor. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
Returns an optional visualization element associated with the element. More... | |
Protected Attributes | |
std::vector< BaseAgent * > | _agents |
A vector of pointers to all the agents in the simulation. | |
NavMeshLocalizerPtr | _localizer |
The localizer tied to the given navigation mesh. | |
Protected Attributes inherited from Menge::Agents::SpatialQuery | |
bool | _testVisibility |
Dictates if visibility queries should be used (true) for neighbor queries or not (false). | |
std::vector< Obstacle * > | _obstacles |
an internal central list of obstacles | |
Additional Inherited Members | |
Protected Member Functions inherited from Menge::Agents::SpatialQuery | |
virtual | ~SpatialQuery () |
Virtual destructor. | |
A spatial query structure based on a navigation mesh.
|
virtual |
gets agents within a range, and passes them to the supplied filter
query | a pointer to the proximity query to be performed |
Implements Menge::Agents::SpatialQuery.
|
virtual |
performs an agent based proximity query
query | a pointer to the proximity query to be performed |
rangeSq | the range to search (extracted and mutable) |
|
virtual |
Returns a pointer to the nav mesh localizer task.
Reimplemented from Menge::Element.
|
virtual |
performs an obstacle based proximity query
query | a pointer to the proximity query to be performed |
Implements Menge::Agents::SpatialQuery.
|
virtual |
performs an obstacle based proximity query
query | a pointer to the proximity query to be performed |
rangeSq | the range to search (extracted and mutable) |
|
virtual |
Queries the visibility between two points within a specified radius. NOT CURRENTLY IMPLEMENTED!
q1 | The first point between which visibility is to be tested. |
q2 | The second point between which visibility is to be tested. |
radius | The radius within which visibility is to be tested. |
Implements Menge::Agents::SpatialQuery.
|
inline |
Sets the navigation mesh localizer pointer.
nml | The managed pointer to the navigation mesh localizer. |
|
inlinevirtual |
Allows the spatial query structure to update its knowledge of the agent positions.
This happens by the NavMeshLocalizer as an FSM task.
Implements Menge::Agents::SpatialQuery.