Recast Navigation
Navigation-mesh Toolset for Games
DetourCrowd.cpp File Reference
#include <string.h>
#include <float.h>
#include <stdlib.h>
#include <new>
#include "DetourCrowd.h"
#include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h"
#include "DetourObstacleAvoidance.h"
#include "DetourCommon.h"
#include "DetourMath.h"
#include "DetourAssert.h"
#include "DetourAlloc.h"

Functions

dtCrowddtAllocCrowd ()
 Allocates a crowd object using the Detour allocator. More...
 
void dtFreeCrowd (dtCrowd *ptr)
 Frees the specified crowd object using the Detour allocator. More...
 
float tween (const float t, const float t0, const float t1)
 
static void integrate (dtCrowdAgent *ag, const float dt)
 
static bool overOffmeshConnection (const dtCrowdAgent *ag, const float radius)
 
static float getDistanceToGoal (const dtCrowdAgent *ag, const float range)
 
static void calcSmoothSteerDirection (const dtCrowdAgent *ag, float *dir)
 
static void calcStraightSteerDirection (const dtCrowdAgent *ag, float *dir)
 
static int addNeighbour (const int idx, const float dist, dtCrowdNeighbour *neis, const int nneis, const int maxNeis)
 
static int getNeighbours (const float *pos, const float height, const float range, const dtCrowdAgent *skip, dtCrowdNeighbour *result, const int maxResult, dtCrowdAgent **agents, const int, dtProximityGrid *grid)
 
static int addToOptQueue (dtCrowdAgent *newag, dtCrowdAgent **agents, const int nagents, const int maxAgents)
 
static int addToPathQueue (dtCrowdAgent *newag, dtCrowdAgent **agents, const int nagents, const int maxAgents)
 

Variables

static const int MAX_ITERS_PER_UPDATE = 100
 
static const int MAX_PATHQUEUE_NODES = 4096
 
static const int MAX_COMMON_NODES = 512
 

Function Documentation

◆ addNeighbour()

static int addNeighbour ( const int  idx,
const float  dist,
dtCrowdNeighbour neis,
const int  nneis,
const int  maxNeis 
)
static

◆ addToOptQueue()

static int addToOptQueue ( dtCrowdAgent newag,
dtCrowdAgent **  agents,
const int  nagents,
const int  maxAgents 
)
static

◆ addToPathQueue()

static int addToPathQueue ( dtCrowdAgent newag,
dtCrowdAgent **  agents,
const int  nagents,
const int  maxAgents 
)
static

◆ calcSmoothSteerDirection()

static void calcSmoothSteerDirection ( const dtCrowdAgent ag,
float *  dir 
)
static

◆ calcStraightSteerDirection()

static void calcStraightSteerDirection ( const dtCrowdAgent ag,
float *  dir 
)
static

◆ getDistanceToGoal()

static float getDistanceToGoal ( const dtCrowdAgent ag,
const float  range 
)
static

◆ getNeighbours()

static int getNeighbours ( const float *  pos,
const float  height,
const float  range,
const dtCrowdAgent skip,
dtCrowdNeighbour result,
const int  maxResult,
dtCrowdAgent **  agents,
const int  ,
dtProximityGrid grid 
)
static

◆ integrate()

static void integrate ( dtCrowdAgent ag,
const float  dt 
)
static

◆ overOffmeshConnection()

static bool overOffmeshConnection ( const dtCrowdAgent ag,
const float  radius 
)
static

◆ tween()

float tween ( const float  t,
const float  t0,
const float  t1 
)
inline

Variable Documentation

◆ MAX_COMMON_NODES

const int MAX_COMMON_NODES = 512
static

◆ MAX_ITERS_PER_UPDATE

const int MAX_ITERS_PER_UPDATE = 100
static

◆ MAX_PATHQUEUE_NODES

const int MAX_PATHQUEUE_NODES = 4096
static