-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A generic boundingbox for an arbitrary vector
--   
--   A generic boundingbox for an arbitrary vector
@package boundingboxes
@version 0.2.3


-- | The type and accessors for bounding boxes
module Data.BoundingBox

-- | The type of bounding box for arbitrary vector <tt>f</tt>. The
--   functions for this type assume that <tt>f</tt> is a "zipping"
--   <a>Applicative</a>.
data Box f a
Box :: (f a) -> (f a) -> Box f a

-- | check whether the point is in the box.
isInside :: (Applicative f, Foldable f, Ord a) => f a -> Box f a -> Bool

-- | Extend each side.
inflate :: (Functor f, Num a) => a -> Box f a -> Box f a

-- | Returns True if the bounding box is valid.
isCanonical :: (Applicative f, Foldable f, Ord a) => Box f a -> Bool

-- | Calculate an union between two boundingboxes.
union :: (Applicative f, Ord a) => Box f a -> Box f a -> Box f a

-- | Calculate an intersect between two boundingboxes.
intersect :: (Applicative f, Ord a) => Box f a -> Box f a -> Box f a

-- | Enumerate the corners.
corners :: (Applicative f, Traversable f) => Box f a -> [f a]
sizePos :: (Applicative f, Num a) => f a -> Iso' (Box f a) (f a, f a)

-- | The accessor for the position on the given reference. Usually the
--   reference point
position :: (Applicative f, Num a) => f a -> Lens' (Box f a) (f a)

-- | The accessor for the size. A given reference point will be a center of
--   resizing.
size :: (Applicative f, Num a) => f a -> Lens' (Box f a) (f a)
instance GHC.Read.Read (f a) => GHC.Read.Read (Data.BoundingBox.Box f a)
instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Data.BoundingBox.Box f)
instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Data.BoundingBox.Box f)
instance GHC.Base.Functor f => GHC.Base.Functor (Data.BoundingBox.Box f)
instance GHC.Classes.Ord (f a) => GHC.Classes.Ord (Data.BoundingBox.Box f a)
instance GHC.Classes.Eq (f a) => GHC.Classes.Eq (Data.BoundingBox.Box f a)
instance GHC.Show.Show (f a) => GHC.Show.Show (Data.BoundingBox.Box f a)
instance GHC.Base.Applicative f => GHC.Base.Applicative (Data.BoundingBox.Box f)
instance GHC.Base.Monad f => GHC.Base.Monad (Data.BoundingBox.Box f)
