|
| NAVMESH_API | dtCrowd () |
| |
| NAVMESH_API | ~dtCrowd () |
| |
| NAVMESH_API bool | init (const int maxAgents, const dtReal maxAgentRadius, dtNavMesh *nav) |
| |
| NAVMESH_API bool | initAvoidance (const int maxNeighbors, const int maxWalls, const int maxCustomPatterns) |
| |
| NAVMESH_API void | setObstacleAvoidanceParams (const int idx, const dtObstacleAvoidanceParams *params) |
| |
| NAVMESH_API const dtObstacleAvoidanceParams * | getObstacleAvoidanceParams (const int idx) const |
| |
| NAVMESH_API void | setObstacleAvoidancePattern (int idx, const dtReal *angles, const dtReal *radii, int nsamples) |
| |
| NAVMESH_API bool | getObstacleAvoidancePattern (int idx, dtReal *angles, dtReal *radii, int *nsamples) |
| |
| NAVMESH_API const dtCrowdAgent * | getAgent (const int idx) |
| |
| NAVMESH_API const int | getAgentCount () const |
| |
| NAVMESH_API int | addAgent (const dtReal *pos, const dtCrowdAgentParams ¶ms, const dtQueryFilter *filter) |
| |
| NAVMESH_API void | updateAgentParameters (const int idx, const dtCrowdAgentParams ¶ms) |
| |
| NAVMESH_API bool | updateAgentFilter (const int idx, const dtQueryFilter *filter) |
| |
| NAVMESH_API void | updateAgentState (const int idx, bool repath) |
| |
| NAVMESH_API void | removeAgent (const int idx) |
| |
| NAVMESH_API bool | requestMoveTarget (const int idx, dtPolyRef ref, const dtReal *pos) |
| |
| NAVMESH_API bool | requestMoveVelocity (const int idx, const dtReal *vel) |
| |
| NAVMESH_API bool | resetMoveTarget (const int idx) |
| |
| NAVMESH_API bool | setAgentWaiting (const int idx) |
| |
| NAVMESH_API bool | setAgentBackOnLink (const int idx) |
| |
| NAVMESH_API bool | resetAgentVelocity (const int idx) |
| |
| NAVMESH_API int | getActiveAgents (dtCrowdAgent **agents, const int maxAgents) |
| |
| NAVMESH_API int | cacheActiveAgents () |
| |
| NAVMESH_API void | update (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepPaths (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepProximityData (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepNextMovePoint (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepSteering (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepAvoidance (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepMove (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepCorridor (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepOffMeshAnim (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | updateStepOffMeshVelocity (const dtReal dt, dtCrowdAgentDebugInfo *debug) |
| |
| NAVMESH_API void | setAgentCheckInterval (const dtReal t) |
| |
| NAVMESH_API bool | setAgentCorridor (const int idx, const dtPolyRef *path, const int npath) |
| |
| NAVMESH_API void | setSingleAreaVisibilityOptimization (bool bEnable) |
| |
| NAVMESH_API void | setPruneStartedOffmeshConnections (bool bRemoveFromCorridor) |
| |
| NAVMESH_API void | setEarlyReachTestOptimization (bool bEnable) |
| | [UE]
|
| |
| NAVMESH_API void | setPathOffsetRadiusMultiplier (dtReal RadiusMultiplier) |
| | [UE] Set agent radius multiplier for offseting path from corners
|
| |
| NAVMESH_API void | setSeparationFilter (dtReal InFilter) |
| | [UE] Set separation filter param
|
| |
| NAVMESH_API bool | isOutsideCorridor (const int idx) const |
| | [UE] Check if agent moved away from its path corridor
|
| |
| NAVMESH_API const dtQueryFilter * | getFilter (const int idx) const |
| |
| NAVMESH_API dtQueryFilter * | getEditableFilter (const int idx) |
| |
| const dtReal * | getQueryExtents () const |
| |
| int | getVelocitySampleCount () const |
| |
| const dtProximityGrid * | getGrid () const |
| |
| const dtPathQueue * | getPathQueue () const |
| |
| const dtNavMeshQuery * | getNavMeshQuery () const |
| | Gets the query object used by the crowd.
|
| |
| const dtSharedBoundary * | getSharedBoundary () const |
| | Gets shared boundary cache.
|
| |
| dtCrowdAgent ** | getActiveAgents () const |
| | Gets all cached active agents.
|
| |
| int | getNumActiveAgents () const |
| |
| int | getAgentIndex (const dtCrowdAgent *agent) const |
| |
| const dtCrowdAgentAnimation * | getAgentAnims () const |
| | Gets all agent animations.
|
| |
Provides local steering behaviors for a group of agents.
This is the core class of the Crowd module. See the Crowd documentation for a summary of the crowd features.
A common method for setting up the crowd is as follows:
- Allocate the crowd using dtAllocCrowd.
- Initialize the crowd using init().
- Set the avoidance configurations using setObstacleAvoidanceParams().
- Add agents using addAgent() and make an initial movement request using requestMoveTarget().
A common process for managing the crowd is as follows:
- Call update() to allow the crowd to manage its agents.
- Retrieve agent information using getActiveAgents().
- Make movement requests using requestMoveTarget() when movement goal changes.
- Repeat every frame.
Some agent configuration settings can be updated using updateAgentParameters(). But the crowd owns the agent position. So it is not possible to update an active agent's position. If agent position must be fed back into the crowd, the agent must be removed and re-added.
Notes:
- Path related information is available for newly added agents only after an update() has been performed.
- Agent objects are kept in a pool and re-used. So it is important when using agent objects to check the value of dtCrowdAgent::active to determine if the agent is actually in use or not.
- This class is meant to provide 'local' movement. There is a limit of 256 polygons in the path corridor.
So it is not meant to provide automatic pathfinding services over long distances.
- See also
- dtAllocCrowd(), dtFreeCrowd(), init(), dtCrowdAgent