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
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. 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 
)
private

◆ GetNodeIndex()

int GetNodeIndex ( )
private

◆ Insert()

void Insert ( Agent  agent)

Add a new agent to the tree.

Warning
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
private

◆ filledNodes

int filledNodes = 1
private

◆ LeafSize

const int LeafSize = 15
private

◆ maxRadius

float maxRadius = 0
private

◆ nodes

Node [] nodes = new Node[42]
private

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