A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
KDTree Class Reference
+ Collaboration diagram for KDTree:

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< Agentagents
 
AgentTreeNode[] agentTree
 
const int MAX_LEAF_SIZE = 10
 
ObstacleTreeNode obstacleRoot
 
bool rebuildAgents = false
 
Simulator simulator
 

Static Private Attributes

static Stack< ObstacleTreeNodeOTNPool = new Stack<ObstacleTreeNode>()
 

The documentation for this class was generated from the following file: