Various tweaks

This commit is contained in:
2019-02-26 18:43:42 -06:00
parent 8ccd1506f3
commit 2e69647ae3
9 changed files with 85 additions and 46 deletions

View File

@@ -2,9 +2,9 @@ class IMICFPS
class BoundingBox
attr_accessor :min, :max
def initialize
@min = Vector.new
@max = Vector.new
def initialize(minx = 0, miny = 0, minz = 0, maxx = 0, maxy = 0, maxz = 0)
@min = Vector.new(minx, miny, minz)
@max = Vector.new(maxx, maxy, maxz)
end
def ==(other)
@@ -116,5 +116,9 @@ class IMICFPS
def sum
@min.sum + @max.sum
end
def clone
BoundingBox.new(@min.x, @min.y, @min.z, @max.x, @max.y, @max.z)
end
end
end