A* Pathfinding Project  4.0.9
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
RVOQuadtree Class Reference

Quadtree for quick nearest neighbour search of rvo agents. More...

Detailed Description

Quadtree for quick nearest neighbour search of rvo agents.

See Also
Pathfinding.RVO.Simulator

Classes

struct  Node
 Node in a quadtree for storing RVO agents. More...
 
struct  QuadtreeQuery
 

Public Member Functions

void CalculateSpeeds ()
 
void Clear ()
 Removes all agents from the tree.
 
void DebugDraw ()
 
void Insert (Agent agent)
 Add a new agent to the tree.
 
void Query (Vector2 p, float speed, float timeHorizon, float agentRadius, Agent agent)
 
void SetBounds (Rect r)
 

Private Member Functions

void DebugDrawRec (int i, Rect r)
 
int GetNodeIndex ()
 

Private Attributes

Rect bounds
 
int filledNodes = 1
 
const int LeafSize = 15
 
float maxRadius = 0
 
Node[] nodes = new Node[42]
 

Member Function Documentation

void CalculateSpeeds ( )
void Clear ( )

Removes all agents from the tree.

void DebugDraw ( )
void DebugDrawRec ( int  i,
Rect  r 
)
private
int GetNodeIndex ( )
private
void Insert ( Agent  agent)

Add a new agent to the tree.

Warning
Agents must not be added multiple times to the same tree
void Query ( Vector2  p,
float  speed,
float  timeHorizon,
float  agentRadius,
Agent  agent 
)
void SetBounds ( Rect  r)

Member Data Documentation

Rect bounds
private
int filledNodes = 1
private
const int LeafSize = 15
private
float maxRadius = 0
private
Node [] nodes = new Node[42]
private

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