mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 23:52:35 +00:00
Refactored Model to make faces first class objects for use in AABBTree, renamed BoundingBox.intersect to intersect?
This commit is contained in:
@@ -54,7 +54,7 @@ class IMICFPS
|
||||
end
|
||||
|
||||
broadphase.each do |entity, _collisions|
|
||||
_collisions.reject! {|ent| !entity.bounding_box.intersect(ent.bounding_box)}
|
||||
_collisions.reject! {|ent| !entity.bounding_box.intersect?(ent.bounding_box)}
|
||||
# TODO: mesh aabb tree vs other mesh aabb tree check
|
||||
# TODO: triangle vs other triangle check
|
||||
_collisions.each do |ent|
|
||||
|
||||
@@ -2,6 +2,7 @@ class IMICFPS
|
||||
TextureCoordinate = Struct.new(:u, :v, :weight)
|
||||
Point = Struct.new(:x, :y)
|
||||
Color = Struct.new(:red, :green, :blue, :alpha)
|
||||
Face = Struct.new(:vertices, :uvs, :normals, :material, :smoothing)
|
||||
|
||||
module EntityManager # Get included into GameState context
|
||||
def add_entity(entity)
|
||||
|
||||
Reference in New Issue
Block a user