hgeometry-0.6.0.0: Geometric Algorithms, Data structures, and Data types.

Safe HaskellNone
LanguageHaskell2010

Data.Geometry.HalfLine

Contents

Synopsis

d-dimensional Half-Lines

data HalfLine d r Source #

d-dimensional Half-Lines

Constructors

HalfLine 

Instances

Arity d => Functor (HalfLine d) Source # 

Methods

fmap :: (a -> b) -> HalfLine d a -> HalfLine d b #

(<$) :: a -> HalfLine d b -> HalfLine d a #

Arity d => Foldable (HalfLine d) Source # 

Methods

fold :: Monoid m => HalfLine d m -> m #

foldMap :: Monoid m => (a -> m) -> HalfLine d a -> m #

foldr :: (a -> b -> b) -> b -> HalfLine d a -> b #

foldr' :: (a -> b -> b) -> b -> HalfLine d a -> b #

foldl :: (b -> a -> b) -> b -> HalfLine d a -> b #

foldl' :: (b -> a -> b) -> b -> HalfLine d a -> b #

foldr1 :: (a -> a -> a) -> HalfLine d a -> a #

foldl1 :: (a -> a -> a) -> HalfLine d a -> a #

toList :: HalfLine d a -> [a] #

null :: HalfLine d a -> Bool #

length :: HalfLine d a -> Int #

elem :: Eq a => a -> HalfLine d a -> Bool #

maximum :: Ord a => HalfLine d a -> a #

minimum :: Ord a => HalfLine d a -> a #

sum :: Num a => HalfLine d a -> a #

product :: Num a => HalfLine d a -> a #

Arity d => Traversable (HalfLine d) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> HalfLine d a -> f (HalfLine d b) #

sequenceA :: Applicative f => HalfLine d (f a) -> f (HalfLine d a) #

mapM :: Monad m => (a -> m b) -> HalfLine d a -> m (HalfLine d b) #

sequence :: Monad m => HalfLine d (m a) -> m (HalfLine d a) #

(Eq r, Arity d) => Eq (HalfLine d r) Source # 

Methods

(==) :: HalfLine d r -> HalfLine d r -> Bool #

(/=) :: HalfLine d r -> HalfLine d r -> Bool #

(Show r, Arity d) => Show (HalfLine d r) Source # 

Methods

showsPrec :: Int -> HalfLine d r -> ShowS #

show :: HalfLine d r -> String #

showList :: [HalfLine d r] -> ShowS #

Generic (HalfLine d r) Source # 

Associated Types

type Rep (HalfLine d r) :: * -> * #

Methods

from :: HalfLine d r -> Rep (HalfLine d r) x #

to :: Rep (HalfLine d r) x -> HalfLine d r #

(NFData r, Arity d) => NFData (HalfLine d r) Source # 

Methods

rnf :: HalfLine d r -> () #

HasStart (HalfLine d r) Source # 

Associated Types

type StartCore (HalfLine d r) :: * Source #

type StartExtra (HalfLine d r) :: * Source #

HasSupportingLine (HalfLine d r) Source # 
(Num r, AlwaysTruePFT d) => IsTransformable (HalfLine d r) Source # 
type Rep (HalfLine d r) Source # 
type Rep (HalfLine d r) = D1 (MetaData "HalfLine" "Data.Geometry.HalfLine" "hgeometry-0.6.0.0-ODn7ZyBfwj6IkLPAAzetJ" False) (C1 (MetaCons "HalfLine" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_startPoint") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Point d r))) (S1 (MetaSel (Just Symbol "_halfLineDirection") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vector d r)))))
type NumType (HalfLine d r) Source # 
type NumType (HalfLine d r) = r
type Dimension (HalfLine d r) Source # 
type Dimension (HalfLine d r) = d
type StartCore (HalfLine d r) Source # 
type StartCore (HalfLine d r) = Point d r
type StartExtra (HalfLine d r) Source # 
type StartExtra (HalfLine d r) = ()
type IntersectionOf (HalfLine 2 r) (HalfLine 2 r) Source # 
type IntersectionOf (HalfLine 2 r) (HalfLine 2 r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (LineSegment 2 () r) ((:) * (HalfLine 2 r) ([] *))))
type IntersectionOf (HalfLine 2 r) (Line 2 r) Source # 
type IntersectionOf (HalfLine 2 r) (Line 2 r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (HalfLine 2 r) ([] *)))
type IntersectionOf (HalfLine 2 r) (LineSegment 2 p r) Source # 
type IntersectionOf (HalfLine 2 r) (LineSegment 2 p r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (LineSegment 2 () r) ([] *)))

startPoint :: forall d r. Lens' (HalfLine d r) (Point d r) Source #

halfLineDirection :: forall d r. Lens' (HalfLine d r) (Vector d r) Source #

fromSubLine :: (Num r, Arity d) => SubLine d p (UnBounded r) -> Maybe (HalfLine d r) Source #

onHalfLine :: (Ord r, Fractional r, Arity d) => Point d r -> HalfLine d r -> Bool Source #

Test if a point lies on a half-line

toHalfLine :: (Num r, Arity d) => LineSegment d p r -> HalfLine d r Source #

Transform a LineSegment into a half-line, by forgetting the second endpoint. Note that this also forgets about if the starting point was open or closed.