Menge
Modular Pedestrian Simulation Framework for Research and Development
|
Spatial query object. Used to determine obstacles and agents near an agent – based on a kd-tree. More...
#include <SpatialQueryKDTree.h>
Public Member Functions | |
BergKDTree () | |
Constructor. | |
virtual void | setAgents (const std::vector< BaseAgent * > &agents) |
Define the set of agents on which kd-tree will query. More... | |
virtual void | updateAgents () |
Allows the spatial query structure to update its knowledge of the agent positions. | |
virtual void | agentQuery (ProximityQuery *query) 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 |
perform 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. 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 BFSM::Task * | getTask () |
Return an optional task associated with this element. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
Returns an optional visualization element associated with the element. More... | |
Protected Attributes | |
AgentKDTree | _agentTree |
A kd-tree for the agent queries. | |
ObstacleKDTree | _obstTree |
A kd-tree for the obstacle queries. | |
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. | |
Spatial query object. Used to determine obstacles and agents near an agent – based on a kd-tree.
|
inlinevirtual |
performs an agent based proximity query
query | a pointer to the proximity query to be performed |
Implements Menge::Agents::SpatialQuery.
|
inlinevirtual |
perform an obstacle based proximity query
query | a pointer to the proximity query to be performed |
Implements Menge::Agents::SpatialQuery.
|
inlinevirtual |
Queries the visibility between two points within a specified radius.
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.
|
inlinevirtual |
Define the set of agents on which kd-tree will query.
agents | The set of agents in the simulator to be managed. |
Implements Menge::Agents::SpatialQuery.