hgeometry-0.10.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 # 
Instance details

Defined in Data.Geometry.HalfLine

Methods

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

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

Arity d => Foldable (HalfLine d) Source # 
Instance details

Defined in Data.Geometry.HalfLine

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 # 
Instance details

Defined in Data.Geometry.HalfLine

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 # 
Instance details

Defined in Data.Geometry.HalfLine

Methods

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

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

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

Defined in Data.Geometry.HalfLine

Methods

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

show :: HalfLine d r -> String #

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

Generic (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

Associated Types

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

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 # 
Instance details

Defined in Data.Geometry.HalfLine

Methods

rnf :: HalfLine d r -> () #

HasStart (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

Associated Types

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

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

(Fractional r, Arity d, Arity (d + 1)) => IsTransformable (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

HasSupportingLine (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type Rep (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type Rep (HalfLine d r) = D1 (MetaData "HalfLine" "Data.Geometry.HalfLine" "hgeometry-0.10.0.0-58coE6gW4i4HcLJr7kmg1f" False) (C1 (MetaCons "HalfLine" PrefixI True) (S1 (MetaSel (Just "_startPoint") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Point d r)) :*: S1 (MetaSel (Just "_halfLineDirection") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vector d r))))
type NumType (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type NumType (HalfLine d r) = r
type Dimension (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type Dimension (HalfLine d r) = d
type StartCore (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type StartCore (HalfLine d r) = Point d r
type StartExtra (HalfLine d r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type StartExtra (HalfLine d r) = ()
type IntersectionOf (HalfLine 2 r) (HalfLine 2 r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type IntersectionOf (HalfLine 2 r) (HalfLine 2 r) = NoIntersection ': (Point 2 r ': (LineSegment 2 () r ': (HalfLine 2 r ': ([] :: [Type]))))
type IntersectionOf (HalfLine 2 r) (Line 2 r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type IntersectionOf (HalfLine 2 r) (Line 2 r) = NoIntersection ': (Point 2 r ': (HalfLine 2 r ': ([] :: [Type])))
type IntersectionOf (HalfLine 2 r) (LineSegment 2 p r) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type IntersectionOf (HalfLine 2 r) (LineSegment 2 p r) = NoIntersection ': (Point 2 r ': (LineSegment 2 () r ': ([] :: [Type])))

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

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

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

fromSubLine :: (Num r, Arity d) => SubLine d p (UnBounded r) 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.