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

Safe HaskellNone
LanguageHaskell2010

Data.Geometry.SubLine

Synopsis

Documentation

data SubLine d p r Source #

Part of a line. The interval is ranged based on the unit-vector of the line l, and s.t.t zero is the anchorPoint of l.

Constructors

SubLine 

Fields

Instances

Arity d => Functor (SubLine d p) Source # 

Methods

fmap :: (a -> b) -> SubLine d p a -> SubLine d p b #

(<$) :: a -> SubLine d p b -> SubLine d p a #

Arity d => Foldable (SubLine d p) Source # 

Methods

fold :: Monoid m => SubLine d p m -> m #

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

foldr :: (a -> b -> b) -> b -> SubLine d p a -> b #

foldr' :: (a -> b -> b) -> b -> SubLine d p a -> b #

foldl :: (b -> a -> b) -> b -> SubLine d p a -> b #

foldl' :: (b -> a -> b) -> b -> SubLine d p a -> b #

foldr1 :: (a -> a -> a) -> SubLine d p a -> a #

foldl1 :: (a -> a -> a) -> SubLine d p a -> a #

toList :: SubLine d p a -> [a] #

null :: SubLine d p a -> Bool #

length :: SubLine d p a -> Int #

elem :: Eq a => a -> SubLine d p a -> Bool #

maximum :: Ord a => SubLine d p a -> a #

minimum :: Ord a => SubLine d p a -> a #

sum :: Num a => SubLine d p a -> a #

product :: Num a => SubLine d p a -> a #

Arity d => Traversable (SubLine d p) Source # 

Methods

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

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

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

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

(Eq r, Eq p, Arity d) => Eq (SubLine d p r) Source # 

Methods

(==) :: SubLine d p r -> SubLine d p r -> Bool #

(/=) :: SubLine d p r -> SubLine d p r -> Bool #

(Show r, Show p, Arity d) => Show (SubLine d p r) Source # 

Methods

showsPrec :: Int -> SubLine d p r -> ShowS #

show :: SubLine d p r -> String #

showList :: [SubLine d p r] -> ShowS #

(Ord r, Fractional r) => IsIntersectableWith (SubLine 2 p r) (SubLine 2 p r) Source # 

Methods

intersect :: SubLine 2 p r -> SubLine 2 p r -> Intersection (SubLine 2 p r) (SubLine 2 p r) Source #

intersects :: SubLine 2 p r -> SubLine 2 p r -> Bool Source #

nonEmptyIntersection :: proxy (SubLine 2 p r) -> proxy (SubLine 2 p r) -> Intersection (SubLine 2 p r) (SubLine 2 p r) -> Bool Source #

(Fractional r, Ord r, HasBoundingLines o) => IsIntersectableWith (SubLine 2 a r) (Slab o a r) Source # 

Methods

intersect :: SubLine 2 a r -> Slab o a r -> Intersection (SubLine 2 a r) (Slab o a r) Source #

intersects :: SubLine 2 a r -> Slab o a r -> Bool Source #

nonEmptyIntersection :: proxy (SubLine 2 a r) -> proxy (Slab o a r) -> Intersection (SubLine 2 a r) (Slab o a r) -> Bool Source #

type NumType (SubLine d p r) Source # 
type NumType (SubLine d p r) = r
type Dimension (SubLine d p r) Source # 
type Dimension (SubLine d p r) = d
type IntersectionOf (SubLine 2 p r) (SubLine 2 q r) Source # 
type IntersectionOf (SubLine 2 p r) (SubLine 2 q r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (SubLine 2 p r) ([] *)))
type IntersectionOf (SubLine 2 p r) (Slab o a r) Source # 
type IntersectionOf (SubLine 2 p r) (Slab o a r) = (:) * NoIntersection ((:) * (SubLine 2 () r) ([] *))

subRange :: forall d p r p. Lens (SubLine d p r) (SubLine d p r) (Interval p r) (Interval p r) Source #

line :: forall d p r d. Lens (SubLine d p r) (SubLine d p r) (Line d r) (Line d r) Source #

pointAt :: (Num r, Arity d) => r -> Line d r -> Point d r Source #

Get the point at the given position along line, where 0 corresponds to the anchorPoint of the line, and 1 to the point anchorPoint .+^ directionVector

fixEndPoints :: (Num r, Arity d) => SubLine d p r -> SubLine d (Point d r :+ p) r Source #

Annotate the subRange with the actual ending points

toOffset :: (Eq r, Fractional r, Arity d) => Point d r -> Line d r -> r Source #

given point p on line (Line q v), Get the scalar lambda s.t. p = q + lambda v

fromLine :: Arity d => Line d r -> SubLine d () (UnBounded r) Source #