HGamer3D-0.8.0: Toolset for the Haskell Game Programmer
HGamer3D.Data.Geometry2D
Contents
Description
Type definitions for 2D geometry
Synopsis
data Num a => Point a Source #
A point has two coordinates an x and y one
Constructors
Fields
Instances
Methods
(==) :: Point a -> Point a -> Bool #
(/=) :: Point a -> Point a -> Bool #
showsPrec :: Int -> Point a -> ShowS #
show :: Point a -> String #
showList :: [Point a] -> ShowS #
toObj :: Point Float -> Object #
fromObj :: Object -> Point Float #
toObj :: Point Int -> Object #
fromObj :: Object -> Point Int #
data Num a => Rectangle a Source #
A rectangle has an a position as x and y and widht and height
(==) :: Rectangle a -> Rectangle a -> Bool #
(/=) :: Rectangle a -> Rectangle a -> Bool #
showsPrec :: Int -> Rectangle a -> ShowS #
show :: Rectangle a -> String #
showList :: [Rectangle a] -> ShowS #
toObj :: Rectangle Float -> Object #
fromObj :: Object -> Rectangle Float #
toObj :: Rectangle Int -> Object #
fromObj :: Object -> Rectangle Int #
ctScreenRect :: ComponentType (Rectangle Int) Source #
rectFromPoints :: Num a => Point a -> Point a -> Rectangle a Source #
derive a rectangle from upper left and lower right points
pointsFromRect :: Num a => Rectangle a -> (Point a, Point a) Source #
get upper left and lower right point from a rect