|
Planeshift
|
Provides local steering behaviors for a group of agents. More...
#include <DetourCrowd.h>
Public Member Functions | |
| int | addAgent (const float *pos, const dtCrowdAgentParams *params) |
| Adds a new agent to the crowd. More... | |
| dtCrowd () | |
| int | getActiveAgents (dtCrowdAgent **agents, const int maxAgents) |
| Gets the active agents int the agent pool. More... | |
| const dtCrowdAgent * | getAgent (const int idx) |
| Gets the specified agent from the pool. More... | |
| const int | getAgentCount () const |
| The maximum number of agents that can be managed by the object. More... | |
| dtQueryFilter * | getEditableFilter () |
| Gets the filter used by the crowd. More... | |
| const dtQueryFilter * | getFilter () const |
| Gets the filter used by the crowd. More... | |
| const dtProximityGrid * | getGrid () const |
| Gets the crowd's proximity grid. More... | |
| const dtNavMeshQuery * | getNavMeshQuery () const |
| Gets the query object used by the crowd. More... | |
| const dtObstacleAvoidanceParams * | getObstacleAvoidanceParams (const int idx) const |
| Gets the shared avoidance configuration for the specified index. More... | |
| const dtPathQueue * | getPathQueue () const |
| Gets the crowd's path request queue. More... | |
| const float * | getQueryExtents () const |
| Gets the search extents [(x, y, z)] used by the crowd for query operations. More... | |
| int | getVelocitySampleCount () const |
| Gets the velocity sample count. More... | |
| bool | init (const int maxAgents, const float maxAgentRadius, dtNavMesh *nav) |
| Initializes the crowd. More... | |
| void | removeAgent (const int idx) |
| Removes the agent from the crowd. More... | |
| bool | requestMoveTarget (const int idx, dtPolyRef ref, const float *pos) |
| Submits a new move request for the specified agent. More... | |
| bool | requestMoveVelocity (const int idx, const float *vel) |
| Submits a new move request for the specified agent. More... | |
| bool | resetMoveTarget (const int idx) |
| Resets any request for the specified agent. More... | |
| void | setObstacleAvoidanceParams (const int idx, const dtObstacleAvoidanceParams *params) |
| Sets the shared avoidance configuration for the specified index. More... | |
| void | update (const float dt, dtCrowdAgentDebugInfo *debug) |
| Updates the steering and positions of all agents. More... | |
| void | updateAgentParameters (const int idx, const dtCrowdAgentParams *params) |
| Updates the specified agent's configuration. More... | |
| ~dtCrowd () | |
Provides local steering behaviors for a group of agents.
Definition at line 191 of file DetourCrowd.h.
| dtCrowd::dtCrowd | ( | ) |
| dtCrowd::~dtCrowd | ( | ) |
| int dtCrowd::addAgent | ( | const float * | pos, |
| const dtCrowdAgentParams * | params | ||
| ) |
Adds a new agent to the crowd.
| [in] | pos | The requested position of the agent. [(x, y, z)] |
| [in] | params | The configutation of the agent. |
| int dtCrowd::getActiveAgents | ( | dtCrowdAgent ** | agents, |
| const int | maxAgents | ||
| ) |
Gets the active agents int the agent pool.
| [out] | agents | An array of agent pointers. [(dtCrowdAgent *) * maxAgents] |
| [in] | maxAgents | The size of the crowd agent array. |
agents. | const dtCrowdAgent* dtCrowd::getAgent | ( | const int | idx | ) |
Gets the specified agent from the pool.
| [in] | idx | The agent index. [Limits: 0 <= value < getAgentCount()] |
| const int dtCrowd::getAgentCount | ( | ) | const |
The maximum number of agents that can be managed by the object.
|
inline |
Gets the filter used by the crowd.
Definition at line 308 of file DetourCrowd.h.
|
inline |
Gets the filter used by the crowd.
Definition at line 304 of file DetourCrowd.h.
|
inline |
Gets the crowd's proximity grid.
Definition at line 320 of file DetourCrowd.h.
|
inline |
Gets the query object used by the crowd.
Definition at line 327 of file DetourCrowd.h.
| const dtObstacleAvoidanceParams* dtCrowd::getObstacleAvoidanceParams | ( | const int | idx | ) | const |
Gets the shared avoidance configuration for the specified index.
| [in] | idx | The index of the configuration to retreive. [Limits: 0 <= value < DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS] |
|
inline |
Gets the crowd's path request queue.
Definition at line 324 of file DetourCrowd.h.
|
inline |
Gets the search extents [(x, y, z)] used by the crowd for query operations.
Definition at line 312 of file DetourCrowd.h.
|
inline |
Gets the velocity sample count.
Definition at line 316 of file DetourCrowd.h.
Initializes the crowd.
| [in] | maxAgents | The maximum number of agents the crowd can manage. [Limit: >= 1] |
| [in] | maxAgentRadius | The maximum radius of any agent that will be added to the crowd. [Limit: > 0] |
| [in] | nav | The navigation mesh to use for planning. |
| void dtCrowd::removeAgent | ( | const int | idx | ) |
Removes the agent from the crowd.
| [in] | idx | The agent index. [Limits: 0 <= value < getAgentCount()] |
Submits a new move request for the specified agent.
| [in] | idx | The agent index. [Limits: 0 <= value < getAgentCount()] |
| [in] | ref | The position's polygon reference. |
| [in] | pos | The position within the polygon. [(x, y, z)] |
Submits a new move request for the specified agent.
| [in] | idx | The agent index. [Limits: 0 <= value < getAgentCount()] |
| [in] | vel | The movement velocity. [(x, y, z)] |
| bool dtCrowd::resetMoveTarget | ( | const int | idx | ) |
Resets any request for the specified agent.
| [in] | idx | The agent index. [Limits: 0 <= value < getAgentCount()] |
| void dtCrowd::setObstacleAvoidanceParams | ( | const int | idx, |
| const dtObstacleAvoidanceParams * | params | ||
| ) |
Sets the shared avoidance configuration for the specified index.
| [in] | idx | The index. [Limits: 0 <= value < DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS] |
| [in] | params | The new configuration. |
| void dtCrowd::update | ( | const float | dt, |
| dtCrowdAgentDebugInfo * | debug | ||
| ) |
Updates the steering and positions of all agents.
| [in] | dt | The time, in seconds, to update the simulation. [Limit: > 0] |
| [out] | debug | A debug object to load with debug information. [Opt] |
| void dtCrowd::updateAgentParameters | ( | const int | idx, |
| const dtCrowdAgentParams * | params | ||
| ) |
Updates the specified agent's configuration.
| [in] | idx | The agent index. [Limits: 0 <= value < getAgentCount()] |
| [in] | params | The new agent configuration. |