Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
Menge::Agents::ProximityQuery Class Referenceabstract

The base class for filtering spatial queries according to proximity. More...

#include <ProximityQuery.h>

Inheritance diagram for Menge::Agents::ProximityQuery:
Menge::Agents::BaseAgent Menge::Agents::KNearestQuery ORCA::Agent PedVO::Agent

Public Member Functions

 ProximityQuery ()
 default Constructor.
 
virtual void startQuery ()=0
 resets the query
 
virtual Vector2 getQueryPoint ()=0
 gets the start point for the query More...
 
virtual float getMaxAgentRange ()=0
 updates the max agent query range if conditions inside the Query are met typically, we don't shrink the query range until the result set is full More...
 
virtual float getMaxObstacleRange ()=0
 updates the max query obstacle range if conditions inside the Query are met typically, we don't shrink the query range until the result set is full More...
 
virtual void filterAgent (const BaseAgent *agent, float distSq)=0
 filters an agent and determines if it needs to be in the result set More...
 
virtual void filterObstacle (const Obstacle *obstacle, float distSq)=0
 filters an obstacle and determines if it needs to be in the result set More...
 

Protected Member Functions

virtual ~ProximityQuery ()
 Virtual destructor.
 

Detailed Description

The base class for filtering spatial queries according to proximity.

A spatial query performs basic operations on a query structure The ProximityQuery class is tasked with taking whatever data the spatialquery gives us and filtering the result set to fit our desires. For example K-nearest, K-nearest with minRange ProximityQueries work with obstacles and agents. They must support BOTH Children must overwrite filterAgent and filterObstacle

Member Function Documentation

virtual void Menge::Agents::ProximityQuery::filterAgent ( const BaseAgent agent,
float  distSq 
)
pure virtual

filters an agent and determines if it needs to be in the result set

CHILDREN MUST OVERWRITE THIS

Parameters
agentthe agent to consider
distSqthe distance to the agent

Implemented in Menge::Agents::BaseAgent, and Menge::Agents::KNearestQuery.

virtual void Menge::Agents::ProximityQuery::filterObstacle ( const Obstacle obstacle,
float  distSq 
)
pure virtual

filters an obstacle and determines if it needs to be in the result set

CHILDREN MUST OVERWRITE THIS

Parameters
obstaclethe obstacle to consider
distSqthe distance to the obstacle

Implemented in Menge::Agents::BaseAgent, and Menge::Agents::KNearestQuery.

virtual float Menge::Agents::ProximityQuery::getMaxAgentRange ( )
pure virtual

updates the max agent query range if conditions inside the Query are met typically, we don't shrink the query range until the result set is full

Returns
the current max query range

Implemented in Menge::Agents::BaseAgent, and Menge::Agents::KNearestQuery.

virtual float Menge::Agents::ProximityQuery::getMaxObstacleRange ( )
pure virtual

updates the max query obstacle range if conditions inside the Query are met typically, we don't shrink the query range until the result set is full

Returns
the current max query range

Implemented in Menge::Agents::BaseAgent, and Menge::Agents::KNearestQuery.

virtual Vector2 Menge::Agents::ProximityQuery::getQueryPoint ( )
pure virtual

gets the start point for the query

Returns
the query point for this Query

Implemented in Menge::Agents::BaseAgent, and Menge::Agents::KNearestQuery.


The documentation for this class was generated from the following file: