HGE2D-0.1.9.2: 2D game engine written in Haskell

Copyright(c) 2016 Martin Buck
Licensesee LICENSE
Safe HaskellNone
LanguageHaskell2010

HGE2D.AABBTree

Description

Containing the definition and functions for an axis aligned bounding box tree

Synopsis

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.