Codota Logo
DynamicTreeNode.<init>
Code IndexAdd Codota 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)

  • Common ways to obtain DynamicTreeNode
private void myMethod () {
DynamicTreeNode d =
  • Codota Iconnew DynamicTreeNode(id)
  • Smart code suggestions by Codota
}
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

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now