Copyright | (c) 2016 Martin Buck |
---|---|
License | see LICENSE |
Safe Haskell | None |
Language | Haskell2010 |
Containing functions for collision detection
- doCollide :: (HasBoundingBox a, HasBoundingBox b) => a -> b -> Bool
- doContain :: (HasBoundingBox a, HasBoundingBox b) => a -> b -> Bool
- isInside :: (HasBoundingBox a, HasBoundingBox b) => a -> b -> Bool
- isInsideRP :: (Positioned a, HasBoundingBox b) => a -> b -> Bool
Documentation
doCollide :: (HasBoundingBox a, HasBoundingBox b) => a -> b -> Bool Source #
Tests whether two objects collide (overlap in any way)
doContain :: (HasBoundingBox a, HasBoundingBox b) => a -> b -> Bool Source #
Tests whether either of the two objects fully contain the other
isInside :: (HasBoundingBox a, HasBoundingBox b) => a -> b -> Bool Source #
Tests whether the first is fully in the second
isInsideRP :: (Positioned a, HasBoundingBox b) => a -> b -> Bool Source #
Tests whether a position is within the bounding box