Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- subdivide() {
- var quarterLength = this.boundaryAABB.halfLength / 2;
- this.nw = new QuadTree(new AABB(this.boundaryAABB.x - quarterLength,
- this.boundaryAABB.y - quarterLength,quarterLength));
- this.ne = new QuadTree(new AABB(this.boundaryAABB.x + quarterLength,
- this.boundaryAABB.y - quarterLength,quarterLength));
- this.sw = new QuadTree(new AABB(this.boundaryAABB.x - quarterLength,
- this.boundaryAABB.y + quarterLength,quarterLength));
- this.se = new QuadTree(new AABB(this.boundaryAABB.x + quarterLength,
- this.boundaryAABB.y + quarterLength,quarterLength));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement