Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. subdivide() {
  2. var quarterLength = this.boundaryAABB.halfLength / 2;
  3. this.nw = new QuadTree(new AABB(this.boundaryAABB.x - quarterLength,
  4. this.boundaryAABB.y - quarterLength,quarterLength));
  5. this.ne = new QuadTree(new AABB(this.boundaryAABB.x + quarterLength,
  6. this.boundaryAABB.y - quarterLength,quarterLength));
  7. this.sw = new QuadTree(new AABB(this.boundaryAABB.x - quarterLength,
  8. this.boundaryAABB.y + quarterLength,quarterLength));
  9. this.se = new QuadTree(new AABB(this.boundaryAABB.x + quarterLength,
  10. this.boundaryAABB.y + quarterLength,quarterLength));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement