Refactored bounding box to use 2 vectors, stubbed PhysicsManager.

This commit is contained in:
2019-02-24 15:05:54 -06:00
parent fc72f2bdc8
commit 965b8d0c80
9 changed files with 114 additions and 99 deletions

View File

@@ -12,7 +12,7 @@ class IMICFPS
if @root
@root.insert_subtree(bounding_box.dup, object)
else
@root = AABBNode.new(parent: nil, object: object, bounding_box: BoundingBox.new(0,0,0, 0,0,0))
@root = AABBNode.new(parent: nil, object: object, bounding_box: BoundingBox.new)
end
end
@@ -48,6 +48,15 @@ class IMICFPS
@b = nil
end
def make_leaf
@a = nil
@b = nil
end
def make_branch(node_a, node_b)
end
def insert_subtree(bounding_box, object)
# p "#{bounding_box} -> #{object.class}"
end