boundingboxes-0.1.1: The type for 2D bounding box

Portabilitynon-portable
Stabilityprovisional
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellNone

Data.BoundingBox.Dim2

Description

The type and accessors for 2D bounding boxes

Synopsis

Documentation

inBoundingBox :: Ord a => V2 a -> BoundingBox a -> BoolSource

Determine whether the given point is in the BoundingBox.

intersect :: Ord a => BoundingBox a -> BoundingBox a -> Maybe (BoundingBox a)Source

Intersection between two boundingboxes.

enclose :: (Num a, Ord a) => V2 a -> BoundingBox a -> BoundingBox aSource

_TLBR :: Iso' (BoundingBox a) (V2 a, V2 a)Source

 fst----+
  |     |
  +----snd

_BLTR :: Iso' (BoundingBox a) (V2 a, V2 a)Source

  +----snd
  |     |
 fst----+

data Reference Source

The type of reference points. TL--T--TR | | L C R | | BL--B--BR

Constructors

TL 
T 
TR 
L 
C 
R 
BL 
B 
BR