Tabnine Logo
DynamicTreeNode.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jbox2d.collision.broadphase.DynamicTreeNode
constructor

Best Java code snippets using org.jbox2d.collision.broadphase.DynamicTreeNode.<init> (Showing top 10 results out of 315)

origin: libgdx/libgdx

private final DynamicTreeNode allocateNode() {
 if (m_freeList == NULL_NODE) {
  assert (m_nodeCount == m_nodeCapacity);
  DynamicTreeNode[] old = m_nodes;
  m_nodeCapacity *= 2;
  m_nodes = new DynamicTreeNode[m_nodeCapacity];
  System.arraycopy(old, 0, m_nodes, 0, old.length);
  // Build a linked list for the free list.
  for (int i = m_nodeCapacity - 1; i >= m_nodeCount; i--) {
   m_nodes[i] = new DynamicTreeNode(i);
   m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
   m_nodes[i].height = -1;
  }
  m_freeList = m_nodeCount;
 }
 int nodeId = m_freeList;
 final DynamicTreeNode treeNode = m_nodes[nodeId];
 m_freeList = treeNode.parent != null ? treeNode.parent.id : NULL_NODE;
 treeNode.parent = null;
 treeNode.child1 = null;
 treeNode.child2 = null;
 treeNode.height = 0;
 treeNode.userData = null;
 ++m_nodeCount;
 return treeNode;
}
origin: libgdx/libgdx

public DynamicTree() {
 m_root = null;
 m_nodeCount = 0;
 m_nodeCapacity = 16;
 m_nodes = new DynamicTreeNode[16];
 // Build a linked list for the free list.
 for (int i = m_nodeCapacity - 1; i >= 0; i--) {
  m_nodes[i] = new DynamicTreeNode(i);
  m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
  m_nodes[i].height = -1;
 }
 m_freeList = 0;
 for (int i = 0; i < drawVecs.length; i++) {
  drawVecs[i] = new Vec2();
 }
}
origin: jbox2d/jbox2d

private final DynamicTreeNode allocateNode() {
 if (m_freeList == NULL_NODE) {
  assert (m_nodeCount == m_nodeCapacity);
  DynamicTreeNode[] old = m_nodes;
  m_nodeCapacity *= 2;
  m_nodes = new DynamicTreeNode[m_nodeCapacity];
  System.arraycopy(old, 0, m_nodes, 0, old.length);
  // Build a linked list for the free list.
  for (int i = m_nodeCapacity - 1; i >= m_nodeCount; i--) {
   m_nodes[i] = new DynamicTreeNode(i);
   m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
   m_nodes[i].height = -1;
  }
  m_freeList = m_nodeCount;
 }
 int nodeId = m_freeList;
 final DynamicTreeNode treeNode = m_nodes[nodeId];
 m_freeList = treeNode.parent != null ? treeNode.parent.id : NULL_NODE;
 treeNode.parent = null;
 treeNode.child1 = null;
 treeNode.child2 = null;
 treeNode.height = 0;
 treeNode.userData = null;
 ++m_nodeCount;
 return treeNode;
}
origin: jbox2d/jbox2d

public DynamicTree() {
 m_root = null;
 m_nodeCount = 0;
 m_nodeCapacity = 16;
 m_nodes = new DynamicTreeNode[16];
 // Build a linked list for the free list.
 for (int i = m_nodeCapacity - 1; i >= 0; i--) {
  m_nodes[i] = new DynamicTreeNode(i);
  m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
  m_nodes[i].height = -1;
 }
 m_freeList = 0;
 for (int i = 0; i < drawVecs.length; i++) {
  drawVecs[i] = new Vec2();
 }
}
origin: org.jbox2d/jbox2d-library

private final DynamicTreeNode allocateNode() {
 if (m_freeList == NULL_NODE) {
  assert (m_nodeCount == m_nodeCapacity);
  DynamicTreeNode[] old = m_nodes;
  m_nodeCapacity *= 2;
  m_nodes = new DynamicTreeNode[m_nodeCapacity];
  System.arraycopy(old, 0, m_nodes, 0, old.length);
  // Build a linked list for the free list.
  for (int i = m_nodeCapacity - 1; i >= m_nodeCount; i--) {
   m_nodes[i] = new DynamicTreeNode(i);
   m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
   m_nodes[i].height = -1;
  }
  m_freeList = m_nodeCount;
 }
 int nodeId = m_freeList;
 final DynamicTreeNode treeNode = m_nodes[nodeId];
 m_freeList = treeNode.parent != null ? treeNode.parent.id : NULL_NODE;
 treeNode.parent = null;
 treeNode.child1 = null;
 treeNode.child2 = null;
 treeNode.height = 0;
 treeNode.userData = null;
 ++m_nodeCount;
 return treeNode;
}
origin: com.github.almasb/fxgl-physics

private final DynamicTreeNode allocateNode() {
  if (m_freeList == NULL_NODE) {
    assert (m_nodeCount == m_nodeCapacity);
    DynamicTreeNode[] old = m_nodes;
    m_nodeCapacity *= 2;
    m_nodes = new DynamicTreeNode[m_nodeCapacity];
    System.arraycopy(old, 0, m_nodes, 0, old.length);
    // Build a linked list for the free list.
    for (int i = m_nodeCapacity - 1; i >= m_nodeCount; i--) {
      m_nodes[i] = new DynamicTreeNode(i);
      m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
      m_nodes[i].height = -1;
    }
    m_freeList = m_nodeCount;
  }
  int nodeId = m_freeList;
  final DynamicTreeNode treeNode = m_nodes[nodeId];
  m_freeList = treeNode.parent != null ? treeNode.parent.id : NULL_NODE;
  treeNode.parent = null;
  treeNode.child1 = null;
  treeNode.child2 = null;
  treeNode.height = 0;
  treeNode.userData = null;
  ++m_nodeCount;
  return treeNode;
}
origin: andmizi/MobikeTags

private final DynamicTreeNode allocateNode() {
 if (m_freeList == NULL_NODE) {
  assert (m_nodeCount == m_nodeCapacity);
  DynamicTreeNode[] old = m_nodes;
  m_nodeCapacity *= 2;
  m_nodes = new DynamicTreeNode[m_nodeCapacity];
  System.arraycopy(old, 0, m_nodes, 0, old.length);
  // Build a linked list for the free list.
  for (int i = m_nodeCapacity - 1; i >= m_nodeCount; i--) {
   m_nodes[i] = new DynamicTreeNode(i);
   m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
   m_nodes[i].height = -1;
  }
  m_freeList = m_nodeCount;
 }
 int nodeId = m_freeList;
 final DynamicTreeNode treeNode = m_nodes[nodeId];
 m_freeList = treeNode.parent != null ? treeNode.parent.id : NULL_NODE;
 treeNode.parent = null;
 treeNode.child1 = null;
 treeNode.child2 = null;
 treeNode.height = 0;
 treeNode.userData = null;
 ++m_nodeCount;
 return treeNode;
}
origin: andmizi/MobikeTags

public DynamicTree() {
 m_root = null;
 m_nodeCount = 0;
 m_nodeCapacity = 16;
 m_nodes = new DynamicTreeNode[16];
 // Build a linked list for the free list.
 for (int i = m_nodeCapacity - 1; i >= 0; i--) {
  m_nodes[i] = new DynamicTreeNode(i);
  m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
  m_nodes[i].height = -1;
 }
 m_freeList = 0;
 for (int i = 0; i < drawVecs.length; i++) {
  drawVecs[i] = new Vec2();
 }
}
origin: com.github.almasb/fxgl-physics

public DynamicTree() {
  m_root = null;
  m_nodeCount = 0;
  m_nodeCapacity = 16;
  m_nodes = new DynamicTreeNode[16];
  // Build a linked list for the free list.
  for (int i = m_nodeCapacity - 1; i >= 0; i--) {
    m_nodes[i] = new DynamicTreeNode(i);
    m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
    m_nodes[i].height = -1;
  }
  m_freeList = 0;
  for (int i = 0; i < drawVecs.length; i++) {
    drawVecs[i] = new Vec2();
  }
}
origin: org.jbox2d/jbox2d-library

public DynamicTree() {
 m_root = null;
 m_nodeCount = 0;
 m_nodeCapacity = 16;
 m_nodes = new DynamicTreeNode[16];
 // Build a linked list for the free list.
 for (int i = m_nodeCapacity - 1; i >= 0; i--) {
  m_nodes[i] = new DynamicTreeNode(i);
  m_nodes[i].parent = (i == m_nodeCapacity - 1) ? null : m_nodes[i + 1];
  m_nodes[i].height = -1;
 }
 m_freeList = 0;
 m_insertionCount = 0;
 for (int i = 0; i < drawVecs.length; i++) {
  drawVecs[i] = new Vec2();
 }
}
org.jbox2d.collision.broadphaseDynamicTreeNode<init>

Javadoc

Should never be constructed outside the engine

Popular methods of DynamicTreeNode

  • isLeaf

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now