43 #ifndef __K_NEAREST_QUERY_H__
44 #define __K_NEAREST_QUERY_H__
size_t agentResultCount()
gets the number of agent results stored currently
Definition: KNearestQuery.h:136
size_t _maxObstacleResults
the max number of obstacle results to store
Definition: KNearestQuery.h:199
virtual float getMaxAgentRange()
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
Definition: KNearestQuery.cpp:114
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
void setQueryPoint(Vector2 point)
sets the query point
Definition: KNearestQuery.h:107
float _initialRange
the base max range of queries
Definition: KNearestQuery.h:232
void filterObstacle(const Obstacle *obstacle, float distSq)
filters an obstacle and determines if it is within the set of k-nearest neighbors ...
Definition: KNearestQuery.cpp:80
struct to store obstacle proximity query results.
Definition: SpatialQueryStructs.h:87
void setMaxObstacleResults(size_t results)
sets the max number of obstacle results for this query to store
Definition: KNearestQuery.h:99
struct to store agent proximity query results.
Definition: SpatialQueryStructs.h:64
void setQueryRangeSq(float range)
sets the query point
Definition: KNearestQuery.h:114
void setMaxAgentResults(size_t results)
sets the max number of agent results for this query to store
Definition: KNearestQuery.h:92
std::vector< NearObstacle > _obstacleResults
vector of pairs. Each pair contains a distance to an obstacle, and the obstacle
Definition: KNearestQuery.h:222
virtual float getMaxObstacleRange()
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
Definition: KNearestQuery.h:188
void filterAgent(const BaseAgent *agent, float distSq)
filters an agent and determines if it is within the set of k-nearest neighbors
Definition: KNearestQuery.cpp:51
float _maxAgentResultDistance
the max distance to an agent result. Useful for informing the spatial query to stop searching further...
Definition: KNearestQuery.h:205
The base class for filtering spatial queries according to proximity.
Definition: ProximityQuery.h:72
size_t obstacleResultCount()
gets the number of obstacle results stored currently
Definition: KNearestQuery.h:143
Vector2 _queryPoint
the start point for the query
Definition: KNearestQuery.h:227
NearAgent getAgentResult(size_t i)
gets the ith agent result
Definition: KNearestQuery.h:164
KNearestQuery()
default Constructor.
Definition: KNearestQuery.h:68
Defines static obstacles in the simulation.
Definition: Obstacle.h:56
size_t _maxAgentResults
the max number of agent results to store
Definition: KNearestQuery.h:188
size_t maxObstacleResults()
gets the max number of obstacle results for this query to store
Definition: KNearestQuery.h:129
virtual Vector2 getQueryPoint()
gets the start point for the query
Definition: KNearestQuery.h:156
Structs for storing results from spatial queries.
The base class for all objects which actually perform filtering and store results from spatial querie...
std::vector< NearAgent > _agentResults
vector of pairs. Each pair contains a distance to an agent, and the agent
Definition: KNearestQuery.h:217
Defines the basic agent properties and functionality that all simulation agents share.
Definition: BaseAgent.h:123
The K-Nearest query class.
Definition: KNearestQuery.h:63
float _maxObstacleResultDistance
the max distance to an obstacle result. Useful for informing the spatial query to stop searching furt...
Definition: KNearestQuery.h:211
The namespace that contains the basic simulation mechanisms.
void startQuery()
clears the result vectors. Resets the query
Definition: KNearestQuery.cpp:104
NearObstacle getObstacleResult(size_t i)
gets the ith obstacle result
Definition: KNearestQuery.h:172
size_t maxAgentResults()
gets the max number of agent results for this query to store
Definition: KNearestQuery.h:122