A* Pathfinding Project  4.1.14
The A* Pathfinding Project for Unity 3D
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


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. More...
void DebugDraw ()
void Insert (Agent agent)
 Add a new agent to the tree. More...
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

◆ CalculateSpeeds()

void CalculateSpeeds ( )

◆ Clear()

void Clear ( )

Removes all agents from the tree.

◆ DebugDraw()

void DebugDraw ( )

◆ DebugDrawRec()

void DebugDrawRec ( int  i,
Rect  r 

◆ GetNodeIndex()

int GetNodeIndex ( )

◆ Insert()

void Insert ( Agent  agent)

Add a new agent to the tree.

Agents must not be added multiple times to the same tree

◆ Query()

void Query ( Vector2  p,
float  speed,
float  timeHorizon,
float  agentRadius,
Agent  agent 

◆ SetBounds()

void SetBounds ( Rect  r)

Member Data Documentation

◆ bounds

Rect bounds

◆ filledNodes

int filledNodes = 1

◆ LeafSize

const int LeafSize = 15

◆ maxRadius

float maxRadius = 0

◆ nodes

Node [] nodes = new Node[42]

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