A* Pathfinding Project
3.8
The A* Pathfinding Project for Unity 3D
|
KD-Tree implementation for rvo agents. More...
KD-Tree implementation for rvo agents.
Classes | |
struct | AgentTreeNode |
class | ObstacleTreeNode |
Public Member Functions | |
KDTree (Simulator simulator) | |
void | BuildAgentTree () |
void | BuildObstacleTree () |
void | GetAgentNeighbours (Agent agent, float rangeSq) |
void | GetObstacleNeighbours (Agent agent, float rangeSq) |
void | RebuildAgents () |
Private Member Functions | |
void | BuildAgentTreeRecursive (int start, int end, int node) |
ObstacleTreeNode | BuildObstacleTreeRecursive (List< ObstacleVertex > obstacles) |
int | countDepth (ObstacleTreeNode node) |
void | QueryAgentTreeRecursive (Agent agent, ref float rangeSq, int node) |
void | QueryObstacleTreeRecursive (Agent agent, float rangeSq, ObstacleTreeNode node) |
float | Sqr (float v) |
Static Private Member Functions | |
static ObstacleTreeNode | GetOTN () |
static void | RecycleOTN (ObstacleTreeNode node) |
Private Attributes | |
List< Agent > | agents |
AgentTreeNode[] | agentTree |
const int | MAX_LEAF_SIZE = 10 |
ObstacleTreeNode | obstacleRoot |
bool | rebuildAgents = false |
Simulator | simulator |
Static Private Attributes | |
static Stack< ObstacleTreeNode > | OTNPool = new Stack<ObstacleTreeNode>() |
void BuildAgentTree | ( | ) |
|
private |
void BuildObstacleTree | ( | ) |
|
private |
|
private |
void GetAgentNeighbours | ( | Agent | agent, |
float | rangeSq | ||
) |
void GetObstacleNeighbours | ( | Agent | agent, |
float | rangeSq | ||
) |
|
staticprivate |
|
private |
|
private |
void RebuildAgents | ( | ) |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |