Copyright | (c) 2016 Martin Buck |
---|---|
License | see LICENSE |
Safe Haskell | None |
Language | Haskell2010 |
Containing the definition and functions for an axis aligned bounding box tree
- data HasBoundingBox a => AABBTree a
- = AABBTreeEmpty
- | AABBTreeLeaf [a] BoundingBox
- | AABBTreeBranch (AABBTree a) (AABBTree a) BoundingBox
- aaBBTreeBuild :: HasBoundingBox a => MaxDepth -> [a] -> AABBTree a
- aaBBTreeCollisions :: (HasBoundingBox a, HasBoundingBox b) => b -> AABBTree a -> [a]
- aaBBTreeToList :: HasBoundingBox a => AABBTree a -> [a]
Documentation
data HasBoundingBox a => AABBTree a Source #
A bounding box tree for fast collision detection
aaBBTreeBuild :: HasBoundingBox a => MaxDepth -> [a] -> AABBTree a Source #
Builds an AABBTree from a list of elements with bounding boxes.
aaBBTreeCollisions :: (HasBoundingBox a, HasBoundingBox b) => b -> AABBTree a -> [a] Source #
Finds all items of the tree which collide with the search item.
aaBBTreeToList :: HasBoundingBox a => AABBTree a -> [a] Source #
Puts the elements of an AABBTree into a list.