73#include "recastnavigation/DetourCrowd.h"
211 dtObstacleAvoidanceDebugData*
_vod =
nullptr;
static const NavigationMeshConfig & getConfigParams(const NavigationMesh &navMesh) noexcept
I32 _activeAgents
Number of (active) agents in the crowd.
vec3< F32 > getLastDestination() const noexcept
void setMoveTarget(const vec3< F32 > &position, bool adjust)
bool _anticipateTurns
Agent configuration parameters.
static bool destinationReached(const dtCrowdAgent *agent, F32 maxDistanceFromTarget)
const dtCrowdAgent * getAgent(const I32 id) const
Retrieve agent with specified ID from the crowd.
void setNavMesh(NavigationMesh *navMesh) noexcept
Change the navigation mesh for this crowd.
I32 getMaxNbAgents() const
The maximum number of agents that are allowed in this crowd.
vector< I32 > getActiveAgentIDs() const
Get the IDs of all (active) agents in this crowd.
bool isValidNavMesh() const
Check if the navMesh is valid.
F32 getAgentHeight() const noexcept
static constexpr I32 AGENT_MAX_TRAIL
Max pathlength for calculated paths.
AgentTrail _trails[MAX_AGENTS]
static vec3< F32 > calcVel(const vec3< F32 > &position, const vec3< F32 > &target, D64 speed)
dtPolyRef _targetRef
The latest set target or destination section in the recast navmesh.
void removeAgent(I32 idx)
Remove agent with specified ID from the crowd.
bool stopAgent(I32 agentID) const
const NavigationMesh & getNavMesh() const noexcept
Get the navigation mesh associated with this crowd.
F32 getAgentRadius() const noexcept
F32 _obstacleAvoidanceType
dtCrowd * _crowd
Reference to the DetourCrowd object that is wrapped.
void update(U64 deltaTimeUS)
static F32 getDistanceToGoal(const dtCrowdAgent *agent, F32 maxRange)
bool requestVelocity(I32 agentID, const vec3< F32 > &velocity) const
NavigationMesh * _recast
Reference to the Recast/Detour wrapper object for Divide.
dtObstacleAvoidanceDebugData * _vod
Parameters for obstacle avoidance of DetourCrowd steering.
static constexpr I32 MAX_AGENTS
Max number of agents allowed in this crowd.
I32 addAgent(const vec3< F32 > &position, F32 maxSpeed, F32 acceleration)
dtCrowdAgentDebugInfo _agentDebug
I32 getNbAgents() const noexcept
The number of (active) agents in this crowd.
void getActiveAgents(vector< dtCrowdAgent * > &agentsOut) const
Get all (active) agents in this crowd.
F32 _targetPos[3]
The latest set target or destination position.
F32 getAgentRadius() const noexcept
F32 getAgentHeight() const noexcept
Handle console commands that start with a forward slash.
eastl::vector< Type > vector
Stores the calculated paths for each agent in the crowd.
F32 trail[AGENT_MAX_TRAIL *3]