# Class DynamicTree

java.lang.Object
com.codename1.gaming.physics.box2d.collision.broadphase.DynamicTree

All Implemented Interfaces:
  `BroadPhaseStrategy`

public class DynamicTree extends Object implements BroadPhaseStrategy

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `DynamicTree.TreeNodeStack`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `MAX_STACK_SIZE`
  `static final int`
  `NULL_NODE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DynamicTree()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final int`
  `computeHeight()`
  `final int`
  `createProxy(AABB aabb, Object userData)`
  `final void`
  `destroyProxy(int proxyId)`
  `void`
  `drawTree(DebugDraw argDraw)`
  `void`
  `drawTree(DebugDraw argDraw, DynamicTreeNode node, int spot, int height)`
  `float`
  `getAreaRatio()`
  `final AABB`
  `getFatAABB(int proxyId)`
  `int`
  `getHeight()`
  `int`
  `getInsertionCount()`
  `int`
  `getMaxBalance()`
  `final Object`
  `getUserData(int proxyId)`
  `final boolean`
  `moveProxy(int proxyId, AABB aabb, Vec2 displacement)`
  `final void`
  `query(TreeCallback callback, AABB aabb)`
  `void`
  `raycast(TreeRayCastCallback callback, RayCastInput input)`
  `void`
  `rebuildBottomUp()`
  `void`
  `validate()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### MAX_STACK_SIZE

    public static final int MAX_STACK_SIZE
    See Also:
      - Constant Field Values

  - ### NULL_NODE

    public static final int NULL_NODE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DynamicTree

    public DynamicTree()

- ## Method Details

  - ### createProxy

    public final int createProxy(AABB aabb, Object userData)
    Specified by:
      `createProxy` in interface `BroadPhaseStrategy`

  - ### destroyProxy

    public final void destroyProxy(int proxyId)
    Specified by:
      `destroyProxy` in interface `BroadPhaseStrategy`

  - ### moveProxy

    public final boolean moveProxy(int proxyId, AABB aabb, Vec2 displacement)
    Specified by:
      `moveProxy` in interface `BroadPhaseStrategy`

  - ### getUserData

    public final Object getUserData(int proxyId)
    Specified by:
      `getUserData` in interface `BroadPhaseStrategy`

  - ### getFatAABB

    public final AABB getFatAABB(int proxyId)
    Specified by:
      `getFatAABB` in interface `BroadPhaseStrategy`

  - ### query

    public final void query(TreeCallback callback, AABB aabb)
    Specified by:
      `query` in interface `BroadPhaseStrategy`

  - ### raycast

    public void raycast(TreeRayCastCallback callback, RayCastInput input)
    Specified by:
      `raycast` in interface `BroadPhaseStrategy`

  - ### computeHeight

    public final int computeHeight()
    Specified by:
      `computeHeight` in interface `BroadPhaseStrategy`

  - ### validate

    public void validate()

  - ### getHeight

    public int getHeight()
    Specified by:
      `getHeight` in interface `BroadPhaseStrategy`

  - ### getMaxBalance

    public int getMaxBalance()
    Specified by:
      `getMaxBalance` in interface `BroadPhaseStrategy`

  - ### getAreaRatio

    public float getAreaRatio()
    Specified by:
      `getAreaRatio` in interface `BroadPhaseStrategy`

  - ### rebuildBottomUp

    public void rebuildBottomUp()

  - ### getInsertionCount

    public int getInsertionCount()
    Specified by:
      `getInsertionCount` in interface `BroadPhaseStrategy`

  - ### drawTree

    public void drawTree(DebugDraw argDraw)
    Specified by:
      `drawTree` in interface `BroadPhaseStrategy`

  - ### drawTree

    public void drawTree(DebugDraw argDraw, DynamicTreeNode node, int spot, int height)