Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Rect a = Rect {}
- rect :: Iso' (V4 a) (Rect a)
- corners :: Rect a -> [V2 a]
- midRect :: BoundedField a => Rect a -> V2 a
- elementRect :: Ord a => V2 a -> Rect a -> Bool
- singletonRect :: V2 a -> Rect a
- singularRect :: Eq a => Rect a -> Bool
- intersectionRect :: Ord a => Rect a -> Rect a -> Rect a
- containsRect :: Ord a => Rect a -> Rect a -> Bool
- rangeR2 :: (Traversable f, Ord a, BoundedField a, R2 r) => f (r a) -> Rect a
- rangeR2s :: (BoundedField a, Traversable g, Traversable f, R2 r, Ord a) => g (f (r a)) -> Rect a
- projectR2 :: (R2 r, Field a, Functor f) => Rect a -> Rect a -> f (r a) -> f (r a)
- projectRect :: Field a => Rect a -> Rect a -> Rect a -> Rect a
- gridP :: (Field a, FromInteger a) => LinearPos -> Rect a -> V2 Int -> [V2 a]
- grid :: (BoundedField a, FromInteger a) => Rect a -> V2 Int -> [Rect a]
Documentation
a two-dimensional plane, bounded by ranges.
rect :: Iso' (V4 a) (Rect a) Source #
an alternative specification; as a 4-dim vector `V4 x y z w` where: - (x,y) is the lower left corner of a rectangle, and - (z,w) is the upper right corner of a rectangle
elementRect :: Ord a => V2 a -> Rect a -> Bool Source #
determine whether a point is within the range
singletonRect :: V2 a -> Rect a Source #
rangeR2 :: (Traversable f, Ord a, BoundedField a, R2 r) => f (r a) -> Rect a Source #
the range Rect of a container of R2s
rangeR2s :: (BoundedField a, Traversable g, Traversable f, R2 r, Ord a) => g (f (r a)) -> Rect a Source #
range specialized to double traversables
projectR2 :: (R2 r, Field a, Functor f) => Rect a -> Rect a -> f (r a) -> f (r a) Source #
project a container of r2 points from an old Rect to a new one
projectRect :: Field a => Rect a -> Rect a -> Rect a -> Rect a Source #
project a Rect from an old Rect range to a new one
gridP :: (Field a, FromInteger a) => LinearPos -> Rect a -> V2 Int -> [V2 a] Source #
grid points on a rectange, divided up by a V2 Int
grid :: (BoundedField a, FromInteger a) => Rect a -> V2 Int -> [Rect a] Source #
a rectangle divided up by a V2 Int, making a list of smaller rectangles