geomancy-0.2.6.0: Geometry and matrix manipulation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Geomancy.Point

Synopsis

Documentation

newtype Point v Source #

Constructors

Point v 

Instances

Instances details
Storable v => Storable (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

sizeOf :: Point v -> Int #

alignment :: Point v -> Int #

peekElemOff :: Ptr (Point v) -> Int -> IO (Point v) #

pokeElemOff :: Ptr (Point v) -> Int -> Point v -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Point v) #

pokeByteOff :: Ptr b -> Int -> Point v -> IO () #

peek :: Ptr (Point v) -> IO (Point v) #

poke :: Ptr (Point v) -> Point v -> IO () #

Generic (Point v) Source # 
Instance details

Defined in Geomancy.Point

Associated Types

type Rep (Point v) :: Type -> Type #

Methods

from :: Point v -> Rep (Point v) x #

to :: Rep (Point v) x -> Point v #

Ix v => Ix (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

range :: (Point v, Point v) -> [Point v] #

index :: (Point v, Point v) -> Point v -> Int #

unsafeIndex :: (Point v, Point v) -> Point v -> Int #

inRange :: (Point v, Point v) -> Point v -> Bool #

rangeSize :: (Point v, Point v) -> Int #

unsafeRangeSize :: (Point v, Point v) -> Int #

Num v => Num (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

(+) :: Point v -> Point v -> Point v #

(-) :: Point v -> Point v -> Point v #

(*) :: Point v -> Point v -> Point v #

negate :: Point v -> Point v #

abs :: Point v -> Point v #

signum :: Point v -> Point v #

fromInteger :: Integer -> Point v #

Fractional v => Fractional (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

(/) :: Point v -> Point v -> Point v #

recip :: Point v -> Point v #

fromRational :: Rational -> Point v #

Show v => Show (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

showsPrec :: Int -> Point v -> ShowS #

show :: Point v -> String #

showList :: [Point v] -> ShowS #

NFData v => NFData (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

rnf :: Point v -> () #

Elementwise v => Elementwise (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

epoint :: Element (Point v) -> Point v Source #

emap :: (Element (Point v) -> Element (Point v)) -> Point v -> Point v Source #

emap2 :: (Element (Point v) -> Element (Point v) -> Element (Point v)) -> Point v -> Point v -> Point v Source #

emap3 :: (Element (Point v) -> Element (Point v) -> Element (Point v) -> Element (Point v)) -> Point v -> Point v -> Point v -> Point v Source #

emap4 :: (Element (Point v) -> Element (Point v) -> Element (Point v) -> Element (Point v) -> Element (Point v)) -> Point v -> Point v -> Point v -> Point v -> Point v Source #

emap5 :: (Element (Point v) -> Element (Point v) -> Element (Point v) -> Element (Point v) -> Element (Point v) -> Element (Point v)) -> Point v -> Point v -> Point v -> Point v -> Point v -> Point v Source #

Eq v => Eq (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

(==) :: Point v -> Point v -> Bool #

(/=) :: Point v -> Point v -> Bool #

Ord v => Ord (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

compare :: Point v -> Point v -> Ordering #

(<) :: Point v -> Point v -> Bool #

(<=) :: Point v -> Point v -> Bool #

(>) :: Point v -> Point v -> Bool #

(>=) :: Point v -> Point v -> Bool #

max :: Point v -> Point v -> Point v #

min :: Point v -> Point v -> Point v #

(KnownNat (PackedSize v), Block v) => Block (Point v) Source # 
Instance details

Defined in Geomancy.Point

Associated Types

type PackedSize (Point v) :: Nat #

Methods

alignment140 :: proxy (Point v) -> Int #

sizeOf140 :: proxy (Point v) -> Int #

isStruct :: proxy (Point v) -> Bool #

read140 :: MonadIO m => Ptr a -> Diff a (Point v) -> m (Point v) #

write140 :: MonadIO m => Ptr a -> Diff a (Point v) -> Point v -> m () #

alignment430 :: proxy (Point v) -> Int #

sizeOf430 :: proxy (Point v) -> Int #

read430 :: MonadIO m => Ptr a -> Diff a (Point v) -> m (Point v) #

write430 :: MonadIO m => Ptr a -> Diff a (Point v) -> Point v -> m () #

sizeOfPacked :: proxy (Point v) -> Int #

readPacked :: MonadIO m => Ptr a -> Diff a (Point v) -> m (Point v) #

writePacked :: MonadIO m => Ptr a -> Diff a (Point v) -> Point v -> m () #

MonoFunctor v => MonoFunctor (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

omap :: (Element (Point v) -> Element (Point v)) -> Point v -> Point v #

MonoPointed v => MonoPointed (Point v) Source # 
Instance details

Defined in Geomancy.Point

Methods

opoint :: Element (Point v) -> Point v #

VectorSpace v Float => AffineSpace (Point v) v Float Source # 
Instance details

Defined in Geomancy.Point

Methods

origin :: Point v #

(.+^) :: Point v -> v -> Point v #

(.-^) :: Point v -> v -> Point v #

(.-.) :: Point v -> Point v -> v #

distance :: Point v -> Point v -> Float #

type Rep (Point v) Source # 
Instance details

Defined in Geomancy.Point

type Rep (Point v) = D1 ('MetaData "Point" "Geomancy.Point" "geomancy-0.2.6.0-Cv22q6pBHLzJuYzXF6h8mc" 'True) (C1 ('MetaCons "Point" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 v)))
type PackedSize (Point v) Source # 
Instance details

Defined in Geomancy.Point

type Element (Point v) Source # 
Instance details

Defined in Geomancy.Point

type Element (Point v) = Element v

class (Floating a, VectorSpace v a) => AffineSpace p v a | p -> v, v -> a #

Affine Space type relation.

An affine space is a set (type) p, and an associated vector space v over a field a.

Minimal complete definition

origin, (.+^), (.-.)

Instances

Instances details
VectorSpace v Float => AffineSpace (Point v) v Float Source # 
Instance details

Defined in Geomancy.Point

Methods

origin :: Point v #

(.+^) :: Point v -> v -> Point v #

(.-^) :: Point v -> v -> Point v #

(.-.) :: Point v -> Point v -> v #

distance :: Point v -> Point v -> Float #

(.+^) :: AffineSpace p v a => p -> v -> p infix 6 #

Addition of affine point and vector.

(.-^) :: AffineSpace p v a => p -> v -> p infix 6 #

Subtraction of affine point and vector.

(.-.) :: AffineSpace p v a => p -> p -> v infix 6 #

Subtraction of two points in the affine space, giving a vector.