module
Eagle::Physics2D::Collision
Overview
Low-level collision tests on world-space shapes. The world uses them; you rarely need them directly.
Extended Modules
Defined in:
eagle/physics/collision2d.crInstance Method Summary
-
#circle_circle(a : Circle, b : Circle) : Manifold | Nil
Circle against circle.
-
#circle_polygon(c : Circle, p : Polygon) : Manifold | Nil
Circle against polygon.
-
#overlaps?(a : Shape, b : Shape) : Bool
True when two shapes overlap.
-
#polygon_polygon(a : Polygon, b : Polygon) : Manifold | Nil
Polygon against polygon, using the separating axis test with face clipping.
-
#ray_circle(origin : Vec2, dir : Vec2, max : Float32, c : Circle) : Tuple(Float32, Vec2) | Nil
Ray against circle.
-
#ray_polygon(origin : Vec2, dir : Vec2, max : Float32, p : Polygon) : Tuple(Float32, Vec2) | Nil
Ray against polygon.
-
#test(a : Shape, b : Shape) : Manifold | Nil
Tests two shapes and returns a manifold when they overlap.
Instance Method Detail
Polygon against polygon, using the separating axis test with face clipping.
Ray against circle. Returns the distance and normal, or nil.