Package com.bulletphysics.collision.broadphase.Dbvt

Examples of com.bulletphysics.collision.broadphase.Dbvt.Node


            minidx[1] = j;
          }
        }
      }
      Node[] n = new Node[] { leaves.getQuick(minidx[0]), leaves.getQuick(minidx[1]) };
      Node p = createnode(pdbvt, null, merge(n[0].volume, n[1].volume, new DbvtAabbMm()), null);
      p.childs[0] = n[0];
      p.childs[1] = n[1];
      n[0].parent = p;
      n[1].parent = p;
      // JAVA NOTE: check
View Full Code Here


          //sets[1].reserve(leaves.size()/2);
          for (int i=0, ni=leaves.size(); i<ni; i++) {
            sets[i & 1].add(leaves.getQuick(i));
          }
        }
        Node node = createnode(pdbvt, null, vol, null);
        node.childs[0] = topdown(pdbvt, sets[0], bu_treshold);
        node.childs[1] = topdown(pdbvt, sets[1], bu_treshold);
        node.childs[0].parent = node;
        node.childs[1].parent = node;
        return node;
View Full Code Here

    }
    return leaves.getQuick(0);
  }
 
  private static Node sort(Node n, Node[] r) {
    Node p = n.parent;
    assert (n.isinternal());
    // JAVA TODO: fix this
    if (p != null && p.hashCode() > n.hashCode()) {
      int i = indexof(n);
      int j = 1 - i;
      Node s = p.childs[j];
      Node q = p.parent;
      assert (n == p.childs[i]);
      if (q != null) {
        q.childs[indexof(p)] = n;
      }
      else {
View Full Code Here

TOP

Related Classes of com.bulletphysics.collision.broadphase.Dbvt.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.