Class BBTree Extends IAstarPooledObject

Public

Axis Aligned Bounding Box Tree.

Holds a bounding box tree of triangles.

A* Pro Feature:

This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited.
The Pro version can be bought here

Inner Types

Public Methods

Clear ()

Clear the tree.

Public
OnDrawGizmos ()
Public
QueryClosest (p, constraint, distance)

Queries the tree for the closest node to p constrained by the NNConstraint.

Public
QueryClosest (p, constraint, distance, previous)

Queries the tree for the closest node to p constrained by the NNConstraint trying to improve an existing solution.

Public
QueryClosestXZ (p, constraint, distance, previous)

Queries the tree for the closest node to p constrained by the NNConstraint trying to improve an existing solution.

Public
QueryInside (p, constraint)

Searches for a node which contains the specified point.

Public
RebuildFrom (nodes)

Rebuilds the tree using the specified nodes.

Public

Public Variables

Size
Public

Private/Protected Members

count
Private
DrawDebugNode (node, yoffset, color)
Private Static
DrawDebugRect (rect)
Private Static
EnsureCapacity (c)
Private
EnsureNodeCapacity (c)
Private
GetBox (rect)
Private
GetOrderedChildren (first, second, firstDist, secondDist, p)

Orders the box indices first and second by the approximate distance to the point p.

Private
leafNodes
Private
MaximumLeafSize
Private
NodeBounds (permutation, nodeBounds, from, to)

Calculates the bounding box in XZ space of all nodes between from (inclusive) and to (exclusive)

Private Static
NodeIntersectsCircle (node, p, radius)
Private Static
nodeLookup
Private
OnDrawGizmos (boxi, depth)
Private
OnEnterPool ()
Private
RebuildFromInternal (nodes, permutation, nodeBounds, from, to, odd)
Private
RectIntersectsCircle (r, p, radius)

Returns true if p is within radius from r.

Private Static
SearchBoxClosest (boxi, p, closestSqrDist, constraint, nnInfo)
Private
SearchBoxClosestXZ (boxi, p, closestSqrDist, constraint, nnInfo)
Private
SearchBoxInside (boxi, p, constraint)
Private
SplitByX (nodes, permutation, from, to, divider)
Private Static
SplitByZ (nodes, permutation, from, to, divider)
Private Static
SquaredRectPointDistance (r, p)

Returns distance from p to the rectangle r.

Private Static
tree

Holds all tree nodes.

Private