hgeometry-kernel
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2024

HGeometry.LineSegment

Description

Line segment data type and some basic functions on line segments

Synopsis

Documentation

data LineSegment (endPoint :: Type -> Type) point where Source #

Data type representing intervals

Bundled Patterns

pattern LineSegment :: endPoint point -> endPoint point -> LineSegment endPoint point

Construct a line Segment

pattern ClosedLineSegment :: point -> point -> ClosedLineSegment point

Construct a closed interval

pattern OpenLineSegment :: point -> point -> OpenLineSegment point

Construct an open ended interval

Instances

Instances details
Foldable1 endPoint => Foldable1 (LineSegment endPoint) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

fold1 :: Semigroup m => LineSegment endPoint m -> m Source #

foldMap1 :: Semigroup m => (a -> m) -> LineSegment endPoint a -> m Source #

foldMap1' :: Semigroup m => (a -> m) -> LineSegment endPoint a -> m Source #

toNonEmpty :: LineSegment endPoint a -> NonEmpty a Source #

maximum :: Ord a => LineSegment endPoint a -> a Source #

minimum :: Ord a => LineSegment endPoint a -> a Source #

head :: LineSegment endPoint a -> a Source #

last :: LineSegment endPoint a -> a Source #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> LineSegment endPoint a -> b Source #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> LineSegment endPoint a -> b Source #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> LineSegment endPoint a -> b Source #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> LineSegment endPoint a -> b Source #

Functor endPoint => Functor (LineSegment endPoint) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

fmap :: (a -> b) -> LineSegment endPoint a -> LineSegment endPoint b Source #

(<$) :: a -> LineSegment endPoint b -> LineSegment endPoint a Source #

Foldable endPoint => Foldable (LineSegment endPoint) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

fold :: Monoid m => LineSegment endPoint m -> m Source #

foldMap :: Monoid m => (a -> m) -> LineSegment endPoint a -> m Source #

foldMap' :: Monoid m => (a -> m) -> LineSegment endPoint a -> m Source #

foldr :: (a -> b -> b) -> b -> LineSegment endPoint a -> b Source #

foldr' :: (a -> b -> b) -> b -> LineSegment endPoint a -> b Source #

foldl :: (b -> a -> b) -> b -> LineSegment endPoint a -> b Source #

foldl' :: (b -> a -> b) -> b -> LineSegment endPoint a -> b Source #

foldr1 :: (a -> a -> a) -> LineSegment endPoint a -> a Source #

foldl1 :: (a -> a -> a) -> LineSegment endPoint a -> a Source #

toList :: LineSegment endPoint a -> [a] Source #

null :: LineSegment endPoint a -> Bool Source #

length :: LineSegment endPoint a -> Int Source #

elem :: Eq a => a -> LineSegment endPoint a -> Bool Source #

maximum :: Ord a => LineSegment endPoint a -> a Source #

minimum :: Ord a => LineSegment endPoint a -> a Source #

sum :: Num a => LineSegment endPoint a -> a Source #

product :: Num a => LineSegment endPoint a -> a Source #

Traversable endPoint => Traversable (LineSegment endPoint) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

traverse :: Applicative f => (a -> f b) -> LineSegment endPoint a -> f (LineSegment endPoint b) Source #

sequenceA :: Applicative f => LineSegment endPoint (f a) -> f (LineSegment endPoint a) Source #

mapM :: Monad m => (a -> m b) -> LineSegment endPoint a -> m (LineSegment endPoint b) Source #

sequence :: Monad m => LineSegment endPoint (m a) -> m (LineSegment endPoint a) Source #

Read point => Read (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Show point => Show (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

(Fractional r, Ord r, HasSquaredEuclideanDistance point, Point_ point d r) => HasSquaredEuclideanDistance (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

squaredEuclideanDistTo :: forall r0 (d0 :: Nat) point0. (r0 ~ NumType (ClosedLineSegment point), d0 ~ Dimension (ClosedLineSegment point), Num r0, Point_ point0 d0 r0) => point0 -> ClosedLineSegment point -> r0 Source #

pointClosestTo :: forall r0 (d0 :: Nat) point0. (r0 ~ NumType (ClosedLineSegment point), d0 ~ Dimension (ClosedLineSegment point), Num r0, Point_ point0 d0 r0) => point0 -> ClosedLineSegment point -> Point d0 r0 Source #

pointClosestToWithDistance :: forall r0 (d0 :: Nat) point0. (r0 ~ NumType (ClosedLineSegment point), d0 ~ Dimension (ClosedLineSegment point), Num r0, Point_ point0 d0 r0) => point0 -> ClosedLineSegment point -> (Point d0 r0, r0) Source #

Traversable1 endPoint => Traversable1 (LineSegment endPoint) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

traverse1 :: Apply f => (a -> f b) -> LineSegment endPoint a -> f (LineSegment endPoint b) Source #

sequence1 :: Apply f => LineSegment endPoint (f b) -> f (LineSegment endPoint b) Source #

Point_ point (Dimension point) (NumType point) => ClosedLineSegment_ (ClosedLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

(Point_ point d r, Fractional r) => HasOnSegment (ClosedLineSegment point) d Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 d r0, r0 ~ NumType (ClosedLineSegment point), d ~ Dimension (ClosedLineSegment point)) => point0 -> ClosedLineSegment point -> Bool Source #

(Point_ point 2 r, Num r) => HasOnSegment (ClosedLineSegment point) 2 Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 2 r0, r0 ~ NumType (ClosedLineSegment point), 2 ~ Dimension (ClosedLineSegment point)) => point0 -> ClosedLineSegment point -> Bool Source #

(Point_ point d r, Fractional r) => HasOnSegment (OpenLineSegment point) d Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 d r0, r0 ~ NumType (OpenLineSegment point), d ~ Dimension (OpenLineSegment point)) => point0 -> OpenLineSegment point -> Bool Source #

(Point_ point 2 r, Num r) => HasOnSegment (OpenLineSegment point) 2 Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 2 r0, r0 ~ NumType (OpenLineSegment point), 2 ~ Dimension (OpenLineSegment point)) => point0 -> OpenLineSegment point -> Bool Source #

Point_ point (Dimension point) (NumType point) => OpenLineSegment_ (OpenLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

(Point_ point d r, Ord r, Num r, HyperPlane_ plane d r) => HasIntersectionWith (ClosedLineSegment point) (HalfSpaceF plane) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersects :: ClosedLineSegment point -> HalfSpaceF plane -> Bool Source #

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (ClosedLineSegment point) (OpenLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ vertex 2 r, Num r, Ord r) => HasIntersectionWith (ClosedLineSegment point) (Triangle vertex) Source #

Testing for intersections between closed line segments and triangles

Instance details

Defined in HGeometry.Triangle

Methods

intersects :: ClosedLineSegment point -> Triangle vertex -> Bool Source #

(Point_ point d r, Point_ point' d r, Ord r, Fractional r, Has_ Metric_ d r, HasSquaredEuclideanDistance point', MkHyperPlaneConstraints d r) => HasIntersectionWith (ClosedLineSegment point') (Ball point) Source # 
Instance details

Defined in HGeometry.Ball.CenterAndRadius

Methods

intersects :: ClosedLineSegment point' -> Ball point -> Bool Source #

(Point_ point d r, Point_ point' d r, Ord r, Fractional r, Has_ Metric_ d r, HasSquaredEuclideanDistance point') => HasIntersectionWith (ClosedLineSegment point') (Sphere point) Source # 
Instance details

Defined in HGeometry.Ball.CenterAndRadius

Methods

intersects :: ClosedLineSegment point' -> Sphere point -> Bool Source #

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (OpenLineSegment point) (ClosedLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LineEQ r) (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LineEQ r) (OpenLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Ord r, Fractional r, HyperPlane_ plane 2 r, IsIntersectableWith (LinePV 2 r) plane, Intersection (LinePV 2 r) plane ~ Maybe (LineLineIntersectionG r line')) => IsIntersectableWith (ClosedLineSegment point) (HalfSpaceF plane) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Ord r, Num r, Point_ point 2 r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasIntersectionWith (HalfLine point) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersects :: HalfLine point -> LineSegment endPoint point -> Bool Source #

(Point_ point 2 r, Num r, Ord r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasIntersectionWith (LineEQ r) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersects :: LineEQ r -> LineSegment endPoint point -> Bool Source #

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (ClosedLineSegment point) (LineSegment AnEndPoint point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (OpenLineSegment point) (LineSegment AnEndPoint point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Ord r, Fractional r, Point_ point 2 r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), IsIntersectableWith (LinePV 2 r) (LineSegment endPoint point), Intersection (LinePV 2 r) (LineSegment endPoint point) ~ Maybe (LineLineSegmentIntersection lineSegment'), NumType lineSegment' ~ r) => IsIntersectableWith (HalfLine point) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersect :: HalfLine point -> LineSegment endPoint point -> Intersection (HalfLine point) (LineSegment endPoint point) Source #

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LineEQ r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

NFData (endPoint point) => NFData (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

rnf :: LineSegment endPoint point -> () Source #

Generic (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Associated Types

type Rep (LineSegment endPoint point) 
Instance details

Defined in HGeometry.LineSegment.Internal

type Rep (LineSegment endPoint point) = D1 ('MetaData "LineSegment" "HGeometry.LineSegment.Internal" "hgeometry-kernel-1.0.0.0-inplace" 'True) (C1 ('MetaCons "MkLineSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Interval endPoint point))))

Methods

from :: LineSegment endPoint point -> Rep (LineSegment endPoint point) x Source #

to :: Rep (LineSegment endPoint point) x -> LineSegment endPoint point Source #

Read (endPoint point) => Read (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

readsPrec :: Int -> ReadS (LineSegment endPoint point) Source #

readList :: ReadS [LineSegment endPoint point] Source #

readPrec :: ReadPrec (LineSegment endPoint point) Source #

readListPrec :: ReadPrec [LineSegment endPoint point] Source #

Show (endPoint point) => Show (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

showsPrec :: Int -> LineSegment endPoint point -> ShowS Source #

show :: LineSegment endPoint point -> String Source #

showList :: [LineSegment endPoint point] -> ShowS Source #

Eq (endPoint point) => Eq (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

(==) :: LineSegment endPoint point -> LineSegment endPoint point -> Bool Source #

(/=) :: LineSegment endPoint point -> LineSegment endPoint point -> Bool Source #

Ord (endPoint point) => Ord (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

compare :: LineSegment endPoint point -> LineSegment endPoint point -> Ordering Source #

(<) :: LineSegment endPoint point -> LineSegment endPoint point -> Bool Source #

(<=) :: LineSegment endPoint point -> LineSegment endPoint point -> Bool Source #

(>) :: LineSegment endPoint point -> LineSegment endPoint point -> Bool Source #

(>=) :: LineSegment endPoint point -> LineSegment endPoint point -> Bool Source #

max :: LineSegment endPoint point -> LineSegment endPoint point -> LineSegment endPoint point Source #

min :: LineSegment endPoint point -> LineSegment endPoint point -> LineSegment endPoint point Source #

(Traversable1 endPoint, Point_ point d r, d ~ Dimension point, r ~ NumType point, Ord r, Ord (Vector d r)) => IsBoxable (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

boundingBox :: forall (d0 :: Nat) r0. (d0 ~ Dimension (LineSegment endPoint point), r0 ~ NumType (LineSegment endPoint point), Ord r0) => LineSegment endPoint point -> Box (Point d0 r0) Source #

(Point_ point d r, Has_ Metric_ d r, EndPoint_ (endPoint point), IxValue (endPoint point) ~ point, Num r) => HasSupportingLine (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

supportingLine :: LineSegment endPoint point -> LinePV (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) Source #

(Point_ point d r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), IsTransformable point) => IsTransformable (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

transformBy :: Transformation (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) -> LineSegment endPoint point -> LineSegment endPoint point Source #

(IxValue (endPoint vertex) ~ vertex, EndPoint_ (endPoint vertex)) => HasVertices' (LineSegment endPoint vertex) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Associated Types

type Vertex (LineSegment endPoint vertex) 
Instance details

Defined in HGeometry.LineSegment.Internal

type Vertex (LineSegment endPoint vertex) = vertex
type VertexIx (LineSegment endPoint vertex) 
Instance details

Defined in HGeometry.LineSegment.Internal

type VertexIx (LineSegment endPoint vertex)

Methods

vertexAt :: VertexIx (LineSegment endPoint vertex) -> IndexedTraversal' (VertexIx (LineSegment endPoint vertex)) (LineSegment endPoint vertex) (Vertex (LineSegment endPoint vertex)) Source #

numVertices :: LineSegment endPoint vertex -> Int Source #

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasEnd (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

end :: Lens' (LineSegment endPoint point) point Source #

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasStart (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

start :: Lens' (LineSegment endPoint point) point Source #

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => IntervalLike_ (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), Point_ point (Dimension point) (NumType point)) => ConstructableLineSegment_ (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

uncheckedLineSegment :: point -> point -> LineSegment endPoint point Source #

mkLineSegment :: point -> point -> Maybe (LineSegment endPoint point) Source #

(Point_ point d r, Fractional r) => HasOnSegment (LineSegment AnEndPoint point) d Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 d r0, r0 ~ NumType (LineSegment AnEndPoint point), d ~ Dimension (LineSegment AnEndPoint point)) => point0 -> LineSegment AnEndPoint point -> Bool Source #

(Point_ point 2 r, Num r) => HasOnSegment (LineSegment AnEndPoint point) 2 Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 2 r0, r0 ~ NumType (LineSegment AnEndPoint point), 2 ~ Dimension (LineSegment AnEndPoint point)) => point0 -> LineSegment AnEndPoint point -> Bool Source #

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), Point_ point (Dimension point) (NumType point)) => LineSegment_ (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (LineSegment AnEndPoint point) (ClosedLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (LineSegment AnEndPoint point) (OpenLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Ord r, Num r, Point_ point 2 r, Point_ point' 2 r, HasIntersectionWith (LineSegment endPoint point) (ClosedLineSegment point')) => HasIntersectionWith (LineSegment endPoint point) (Boundary (Rectangle point')) Source # 
Instance details

Defined in HGeometry.Box

Methods

intersects :: LineSegment endPoint point -> Boundary (Rectangle point') -> Bool Source #

(Ord r, Num r, Point_ point 2 r, Point_ point' 2 r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), HasIntersectionWith (LineSegment endPoint point) (ClosedLineSegment point')) => HasIntersectionWith (LineSegment endPoint point) (Rectangle point') Source # 
Instance details

Defined in HGeometry.Box

Methods

intersects :: LineSegment endPoint point -> Rectangle point' -> Bool Source #

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LinePV 2 r) (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LinePV 2 r) (OpenLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersect :: LinePV 2 r -> OpenLineSegment point -> Intersection (LinePV 2 r) (OpenLineSegment point) Source #

IxValue (endPoint point) ~ point => HasEndPoint (LineSegment endPoint point) (endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

endPoint :: Lens' (LineSegment endPoint point) (endPoint point) Source #

IxValue (endPoint point) ~ point => HasStartPoint (LineSegment endPoint point) (endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

startPoint :: Lens' (LineSegment endPoint point) (endPoint point) Source #

(Point_ point 2 r, Num r, Ord r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasIntersectionWith (LinePV 2 r) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersects :: LinePV 2 r -> LineSegment endPoint point -> Bool Source #

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r, Functor endPoint, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), IxValue (endPoint point') ~ point', EndPoint_ (endPoint point'), IxValue (endPoint r) ~ r, EndPoint_ (endPoint r), HasIntersectionWith (Interval endPoint r) (Interval endPoint r)) => HasIntersectionWith (LineSegment endPoint point) (LineSegment endPoint point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersects :: LineSegment endPoint point -> LineSegment endPoint point' -> Bool Source #

(HasOnSegment (LineSegment endPoint point) d, Point_ point d r, Fractional r, Ord r) => HasIntersectionWith (Point d r) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

intersects :: Point d r -> LineSegment endPoint point -> Bool Source #

(HasOnSegment (LineSegment endPoint point) 2, Point_ point 2 r, Num r, Ord r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasIntersectionWith (Point 2 r) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

intersects :: Point 2 r -> LineSegment endPoint point -> Bool Source #

(IsIntersectableWith (LineSegment endPoint point) (LineSegment endPoint point), Intersection (LineSegment endPoint point) (LineSegment endPoint point) ~ Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point))) => IsIntersectableWith (LineSegment endPoint point :+ extra) (LineSegment endPoint point :+ extra) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersect :: (LineSegment endPoint point :+ extra) -> (LineSegment endPoint point :+ extra) -> Intersection (LineSegment endPoint point :+ extra) (LineSegment endPoint point :+ extra) Source #

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LinePV 2 r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Num r, Ord r, Functor endPoint, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), IxValue (endPoint r) ~ r, EndPoint_ (endPoint r), HasIntersectionWith (Interval endPoint r) (Interval endPoint r), IxValue (endPoint point) ~ point, IxValue (endPoint (r :+ endPoint point)) ~ (r :+ endPoint point), EndPoint_ (endPoint point), IsEndPoint (endPoint point) (endPoint (r :+ endPoint point)), IsIntersectableWith (LinePV 2 r) (LineSegment endPoint point), Intersection (LinePV 2 r) (LineSegment endPoint point) ~ Maybe (LineLineSegmentIntersection (LineSegment endPoint point)), HasOnSegment (LineSegment endPoint point) 2, IsIntersectableWith (Interval endPoint (r :+ endPoint point)) (Interval endPoint (r :+ endPoint point)), Intersection (LineSegment endPoint point) (LineSegment endPoint point) ~ Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point)), EndPoint_ (endPoint (r :+ endPoint point))) => IsIntersectableWith (LineSegment endPoint point) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersect :: LineSegment endPoint point -> LineSegment endPoint point -> Intersection (LineSegment endPoint point) (LineSegment endPoint point) Source #

(Traversable1 endPoint, EndPoint_ (endPoint v), IxValue (endPoint v) ~ v) => HasVertices (LineSegment endPoint v) (LineSegment endPoint v') Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

vertices :: IndexedTraversal1 (VertexIx (LineSegment endPoint v)) (LineSegment endPoint v) (LineSegment endPoint v') (Vertex (LineSegment endPoint v)) (Vertex (LineSegment endPoint v')) Source #

(Traversable1 endPoint, Dimension point ~ Dimension point', Point_ point (Dimension point) (NumType point), Point_ point' (Dimension point) (NumType point')) => HasPoints (LineSegment endPoint point) (LineSegment endPoint point') point point' Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (LineSegment endPoint point) ~ r, NumType (LineSegment endPoint point') ~ r', Dimension (LineSegment endPoint point) ~ d, Dimension (LineSegment endPoint point') ~ d) => Traversal1 (LineSegment endPoint point) (LineSegment endPoint point') point point' Source #

type Intersection (ClosedLineSegment point) (HalfSpaceF plane) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (ClosedLineSegment point') (Ball point) Source # 
Instance details

Defined in HGeometry.Ball.CenterAndRadius

type Intersection (ClosedLineSegment point') (Ball point) = Maybe (IntersectionOf (LinePV (Dimension point) (NumType point)) (Ball point))
type Intersection (HalfLine point) (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (HalfLine point) (LineSegment endPoint point) = Maybe (HalfLineLineSegmentIntersection (Point 2 (NumType point)) (LineSegment endPoint point))
type Intersection (LineEQ r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LineEQ r) (LineSegment (EndPoint t) point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Rep (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type Rep (LineSegment endPoint point) = D1 ('MetaData "LineSegment" "HGeometry.LineSegment.Internal" "hgeometry-kernel-1.0.0.0-inplace" 'True) (C1 ('MetaCons "MkLineSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Interval endPoint point))))
type EndPointOf (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type EndPointOf (LineSegment endPoint point) = endPoint point
type StartPointOf (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type StartPointOf (LineSegment endPoint point) = endPoint point
type Dimension (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type Dimension (LineSegment endPoint point) = Dimension point
type NumType (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type NumType (LineSegment endPoint point) = NumType point
type Vertex (LineSegment endPoint vertex) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type Vertex (LineSegment endPoint vertex) = vertex
type VertexIx (LineSegment endPoint vertex) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type VertexIx (LineSegment endPoint vertex)
type Intersection (LineSegment endPoint point :+ extra) (LineSegment endPoint point :+ extra) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LineSegment endPoint point :+ extra) (LineSegment endPoint point :+ extra) = Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point :+ extra))
type Intersection (LinePV 2 r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LinePV 2 r) (LineSegment (EndPoint t) point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LinePV 2 r) (LineSegment (EndPoint t) point)
type Intersection (LineSegment AnEndPoint point) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LineSegment (EndPoint t) point) (LineSegment (EndPoint t) point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type ClosedLineSegment point = LineSegment (EndPoint 'Closed) point Source #

A type representing Closed LineSegments

type OpenLineSegment point = LineSegment (EndPoint 'Open) point Source #

A type representing Open LineSegments

asALineSegment :: LineSegment_ segment point => segment -> LineSegment AnEndPoint point Source #

convert into an LineSegment whose endpoints are explicitly tagged.

newtype EndPoint (et :: EndPointType) r Source #

EndPoint with a type safe tag

Constructors

EndPoint r 

Bundled Patterns

pattern OpenE :: r -> EndPoint 'Open r

Constructs an Open endpoint

pattern ClosedE :: r -> EndPoint 'Closed r

Constructs a closed endpoint

Instances

Instances details
Foldable1 (EndPoint et) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

fold1 :: Semigroup m => EndPoint et m -> m Source #

foldMap1 :: Semigroup m => (a -> m) -> EndPoint et a -> m Source #

foldMap1' :: Semigroup m => (a -> m) -> EndPoint et a -> m Source #

toNonEmpty :: EndPoint et a -> NonEmpty a Source #

maximum :: Ord a => EndPoint et a -> a Source #

minimum :: Ord a => EndPoint et a -> a Source #

head :: EndPoint et a -> a Source #

last :: EndPoint et a -> a Source #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> EndPoint et a -> b Source #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> EndPoint et a -> b Source #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> EndPoint et a -> b Source #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> EndPoint et a -> b Source #

Functor (EndPoint et) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

fmap :: (a -> b) -> EndPoint et a -> EndPoint et b Source #

(<$) :: a -> EndPoint et b -> EndPoint et a Source #

Foldable (EndPoint et) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

fold :: Monoid m => EndPoint et m -> m Source #

foldMap :: Monoid m => (a -> m) -> EndPoint et a -> m Source #

foldMap' :: Monoid m => (a -> m) -> EndPoint et a -> m Source #

foldr :: (a -> b -> b) -> b -> EndPoint et a -> b Source #

foldr' :: (a -> b -> b) -> b -> EndPoint et a -> b Source #

foldl :: (b -> a -> b) -> b -> EndPoint et a -> b Source #

foldl' :: (b -> a -> b) -> b -> EndPoint et a -> b Source #

foldr1 :: (a -> a -> a) -> EndPoint et a -> a Source #

foldl1 :: (a -> a -> a) -> EndPoint et a -> a Source #

toList :: EndPoint et a -> [a] Source #

null :: EndPoint et a -> Bool Source #

length :: EndPoint et a -> Int Source #

elem :: Eq a => a -> EndPoint et a -> Bool Source #

maximum :: Ord a => EndPoint et a -> a Source #

minimum :: Ord a => EndPoint et a -> a Source #

sum :: Num a => EndPoint et a -> a Source #

product :: Num a => EndPoint et a -> a Source #

Traversable (EndPoint et) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

traverse :: Applicative f => (a -> f b) -> EndPoint et a -> f (EndPoint et b) Source #

sequenceA :: Applicative f => EndPoint et (f a) -> f (EndPoint et a) Source #

mapM :: Monad m => (a -> m b) -> EndPoint et a -> m (EndPoint et b) Source #

sequence :: Monad m => EndPoint et (m a) -> m (EndPoint et a) Source #

Read point => Read (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Show point => Show (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

(Fractional r, Ord r, HasSquaredEuclideanDistance point, Point_ point d r) => HasSquaredEuclideanDistance (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

squaredEuclideanDistTo :: forall r0 (d0 :: Nat) point0. (r0 ~ NumType (ClosedLineSegment point), d0 ~ Dimension (ClosedLineSegment point), Num r0, Point_ point0 d0 r0) => point0 -> ClosedLineSegment point -> r0 Source #

pointClosestTo :: forall r0 (d0 :: Nat) point0. (r0 ~ NumType (ClosedLineSegment point), d0 ~ Dimension (ClosedLineSegment point), Num r0, Point_ point0 d0 r0) => point0 -> ClosedLineSegment point -> Point d0 r0 Source #

pointClosestToWithDistance :: forall r0 (d0 :: Nat) point0. (r0 ~ NumType (ClosedLineSegment point), d0 ~ Dimension (ClosedLineSegment point), Num r0, Point_ point0 d0 r0) => point0 -> ClosedLineSegment point -> (Point d0 r0, r0) Source #

Traversable1 (EndPoint et) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

traverse1 :: Apply f => (a -> f b) -> EndPoint et a -> f (EndPoint et b) Source #

sequence1 :: Apply f => EndPoint et (f b) -> f (EndPoint et b) Source #

ClosedInterval_ (ClosedInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

ConstructableClosedInterval_ (ClosedInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

ConstructableOpenInterval_ (OpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

mkOpenInterval :: r -> r -> OpenInterval r Source #

OpenInterval_ (OpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Point_ point (Dimension point) (NumType point) => ClosedLineSegment_ (ClosedLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

(Point_ point d r, Fractional r) => HasOnSegment (ClosedLineSegment point) d Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 d r0, r0 ~ NumType (ClosedLineSegment point), d ~ Dimension (ClosedLineSegment point)) => point0 -> ClosedLineSegment point -> Bool Source #

(Point_ point 2 r, Num r) => HasOnSegment (ClosedLineSegment point) 2 Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 2 r0, r0 ~ NumType (ClosedLineSegment point), 2 ~ Dimension (ClosedLineSegment point)) => point0 -> ClosedLineSegment point -> Bool Source #

(Point_ point d r, Fractional r) => HasOnSegment (OpenLineSegment point) d Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 d r0, r0 ~ NumType (OpenLineSegment point), d ~ Dimension (OpenLineSegment point)) => point0 -> OpenLineSegment point -> Bool Source #

(Point_ point 2 r, Num r) => HasOnSegment (OpenLineSegment point) 2 Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 2 r0, r0 ~ NumType (OpenLineSegment point), 2 ~ Dimension (OpenLineSegment point)) => point0 -> OpenLineSegment point -> Bool Source #

Point_ point (Dimension point) (NumType point) => OpenLineSegment_ (OpenLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Ord r => HasIntersectionWith (ClosedInterval r) (HalfOpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

Ord r => HasIntersectionWith (OpenInterval r) (ClosedInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => HasIntersectionWith (OpenInterval r) (OpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

(Point_ point d r, Ord r, Num r, HyperPlane_ plane d r) => HasIntersectionWith (ClosedLineSegment point) (HalfSpaceF plane) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersects :: ClosedLineSegment point -> HalfSpaceF plane -> Bool Source #

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (ClosedLineSegment point) (OpenLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ vertex 2 r, Num r, Ord r) => HasIntersectionWith (ClosedLineSegment point) (Triangle vertex) Source #

Testing for intersections between closed line segments and triangles

Instance details

Defined in HGeometry.Triangle

Methods

intersects :: ClosedLineSegment point -> Triangle vertex -> Bool Source #

(Point_ point d r, Point_ point' d r, Ord r, Fractional r, Has_ Metric_ d r, HasSquaredEuclideanDistance point', MkHyperPlaneConstraints d r) => HasIntersectionWith (ClosedLineSegment point') (Ball point) Source # 
Instance details

Defined in HGeometry.Ball.CenterAndRadius

Methods

intersects :: ClosedLineSegment point' -> Ball point -> Bool Source #

(Point_ point d r, Point_ point' d r, Ord r, Fractional r, Has_ Metric_ d r, HasSquaredEuclideanDistance point') => HasIntersectionWith (ClosedLineSegment point') (Sphere point) Source # 
Instance details

Defined in HGeometry.Ball.CenterAndRadius

Methods

intersects :: ClosedLineSegment point' -> Sphere point -> Bool Source #

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (OpenLineSegment point) (ClosedLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Ord r => IsIntersectableWith (ClosedInterval r) (ClosedInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => IsIntersectableWith (OpenInterval r) (OpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LineEQ r) (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LineEQ r) (OpenLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Ord r, Fractional r, HyperPlane_ plane 2 r, IsIntersectableWith (LinePV 2 r) plane, Intersection (LinePV 2 r) plane ~ Maybe (LineLineIntersectionG r line')) => IsIntersectableWith (ClosedLineSegment point) (HalfSpaceF plane) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (ClosedLineSegment point) (LineSegment AnEndPoint point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (OpenLineSegment point) (LineSegment AnEndPoint point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

HasEndPoint (HalfOpenInterval r) (EndPoint 'Closed r) Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

HasStartPoint (HalfOpenInterval r) (EndPoint 'Open r) Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)) => HasIntersectionWith (ClosedInterval r) (Interval endPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

intersects :: ClosedInterval r -> Interval endPoint r -> Bool Source #

Ord r => HasIntersectionWith (OpenInterval r) (Interval AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

NFData r => NFData (EndPoint et r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

rnf :: EndPoint et r -> () Source #

Generic (EndPoint et r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Associated Types

type Rep (EndPoint et r) 
Instance details

Defined in HGeometry.Interval.EndPoint

type Rep (EndPoint et r) = D1 ('MetaData "EndPoint" "HGeometry.Interval.EndPoint" "hgeometry-kernel-1.0.0.0-inplace" 'True) (C1 ('MetaCons "EndPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 r)))

Methods

from :: EndPoint et r -> Rep (EndPoint et r) x Source #

to :: Rep (EndPoint et r) x -> EndPoint et r Source #

Read r => Read (EndPoint 'Closed r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Read r => Read (EndPoint 'Open r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Show r => Show (EndPoint 'Closed r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Show r => Show (EndPoint 'Open r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Eq r => Eq (EndPoint et r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

(==) :: EndPoint et r -> EndPoint et r -> Bool Source #

(/=) :: EndPoint et r -> EndPoint et r -> Bool Source #

Ord r => Ord (EndPoint et r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

compare :: EndPoint et r -> EndPoint et r -> Ordering Source #

(<) :: EndPoint et r -> EndPoint et r -> Bool Source #

(<=) :: EndPoint et r -> EndPoint et r -> Bool Source #

(>) :: EndPoint et r -> EndPoint et r -> Bool Source #

(>=) :: EndPoint et r -> EndPoint et r -> Bool Source #

max :: EndPoint et r -> EndPoint et r -> EndPoint et r Source #

min :: EndPoint et r -> EndPoint et r -> EndPoint et r Source #

EndPoint_ (EndPoint 'Closed r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

EndPoint_ (EndPoint 'Open r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (LineSegment AnEndPoint point) (ClosedLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (LineSegment AnEndPoint point) (OpenLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Ord r => HasIntersectionWith (Point 1 r) (ClosedInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

intersects :: Point 1 r -> ClosedInterval r -> Bool Source #

Ord r => HasIntersectionWith (Point 1 r) (OpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

intersects :: Point 1 r -> OpenInterval r -> Bool Source #

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LinePV 2 r) (ClosedLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LinePV 2 r) (OpenLineSegment point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

intersect :: LinePV 2 r -> OpenLineSegment point -> Intersection (LinePV 2 r) (OpenLineSegment point) Source #

Ord r => IsIntersectableWith (Point 1 r) (ClosedInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => IsIntersectableWith (Point 1 r) (OpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

IsEndPoint (EndPoint et r) (EndPoint et r') Source #

Class for types that have _endPoint field.

Instance details

Defined in HGeometry.Interval.EndPoint

Methods

_endPoint :: Lens (EndPoint et r) (EndPoint et r') (IxValue (EndPoint et r)) (IxValue (EndPoint et r')) Source #

Ord r => HasIntersectionWith (Interval AnEndPoint r) (ClosedInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => HasIntersectionWith (Interval AnEndPoint r) (OpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

type Intersection (ClosedLineSegment point) (HalfSpaceF plane) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (ClosedLineSegment point') (Ball point) Source # 
Instance details

Defined in HGeometry.Ball.CenterAndRadius

type Intersection (ClosedLineSegment point') (Ball point) = Maybe (IntersectionOf (LinePV (Dimension point) (NumType point)) (Ball point))
type Intersection (LineEQ r) (LineSegment (EndPoint t) point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Rep (EndPoint et r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

type Rep (EndPoint et r) = D1 ('MetaData "EndPoint" "HGeometry.Interval.EndPoint" "hgeometry-kernel-1.0.0.0-inplace" 'True) (C1 ('MetaCons "EndPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 r)))
type NumType (EndPoint et r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

type NumType (EndPoint et r) = r
type IxValue (EndPoint et r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

type IxValue (EndPoint et r) = r
type Intersection (LinePV 2 r) (LineSegment (EndPoint t) point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LinePV 2 r) (LineSegment (EndPoint t) point)
type Intersection (LineSegment (EndPoint t) point) (LineSegment (EndPoint t) point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

data AnEndPoint r Source #

Data type modelling an endpoint that can both be open and closed.

Constructors

AnEndPoint !EndPointType !r 

Bundled Patterns

pattern AnOpenE :: r -> AnEndPoint r

Constructs an Open endpoint

pattern AnClosedE :: r -> AnEndPoint r

Constructs a closed endpoint

Instances

Instances details
Foldable1 AnEndPoint Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

fold1 :: Semigroup m => AnEndPoint m -> m Source #

foldMap1 :: Semigroup m => (a -> m) -> AnEndPoint a -> m Source #

foldMap1' :: Semigroup m => (a -> m) -> AnEndPoint a -> m Source #

toNonEmpty :: AnEndPoint a -> NonEmpty a Source #

maximum :: Ord a => AnEndPoint a -> a Source #

minimum :: Ord a => AnEndPoint a -> a Source #

head :: AnEndPoint a -> a Source #

last :: AnEndPoint a -> a Source #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> AnEndPoint a -> b Source #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> AnEndPoint a -> b Source #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> AnEndPoint a -> b Source #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> AnEndPoint a -> b Source #

Functor AnEndPoint Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

fmap :: (a -> b) -> AnEndPoint a -> AnEndPoint b Source #

(<$) :: a -> AnEndPoint b -> AnEndPoint a Source #

Foldable AnEndPoint Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

fold :: Monoid m => AnEndPoint m -> m Source #

foldMap :: Monoid m => (a -> m) -> AnEndPoint a -> m Source #

foldMap' :: Monoid m => (a -> m) -> AnEndPoint a -> m Source #

foldr :: (a -> b -> b) -> b -> AnEndPoint a -> b Source #

foldr' :: (a -> b -> b) -> b -> AnEndPoint a -> b Source #

foldl :: (b -> a -> b) -> b -> AnEndPoint a -> b Source #

foldl' :: (b -> a -> b) -> b -> AnEndPoint a -> b Source #

foldr1 :: (a -> a -> a) -> AnEndPoint a -> a Source #

foldl1 :: (a -> a -> a) -> AnEndPoint a -> a Source #

toList :: AnEndPoint a -> [a] Source #

null :: AnEndPoint a -> Bool Source #

length :: AnEndPoint a -> Int Source #

elem :: Eq a => a -> AnEndPoint a -> Bool Source #

maximum :: Ord a => AnEndPoint a -> a Source #

minimum :: Ord a => AnEndPoint a -> a Source #

sum :: Num a => AnEndPoint a -> a Source #

product :: Num a => AnEndPoint a -> a Source #

Traversable AnEndPoint Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

traverse :: Applicative f => (a -> f b) -> AnEndPoint a -> f (AnEndPoint b) Source #

sequenceA :: Applicative f => AnEndPoint (f a) -> f (AnEndPoint a) Source #

mapM :: Monad m => (a -> m b) -> AnEndPoint a -> m (AnEndPoint b) Source #

sequence :: Monad m => AnEndPoint (m a) -> m (AnEndPoint a) Source #

Traversable1 AnEndPoint Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Methods

traverse1 :: Apply f => (a -> f b) -> AnEndPoint a -> f (AnEndPoint b) Source #

sequence1 :: Apply f => AnEndPoint (f b) -> f (AnEndPoint b) Source #

Generic (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Associated Types

type Rep (AnEndPoint r) 
Instance details

Defined in HGeometry.Interval.EndPoint

type Rep (AnEndPoint r) = D1 ('MetaData "AnEndPoint" "HGeometry.Interval.EndPoint" "hgeometry-kernel-1.0.0.0-inplace" 'False) (C1 ('MetaCons "AnEndPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 EndPointType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 r)))

Methods

from :: AnEndPoint r -> Rep (AnEndPoint r) x Source #

to :: Rep (AnEndPoint r) x -> AnEndPoint r Source #

Read r => Read (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Show r => Show (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Eq r => Eq (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

Ord r => Ord (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

EndPoint_ (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

IsEndPoint (AnEndPoint r) (AnEndPoint r') Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (ClosedLineSegment point) (LineSegment AnEndPoint point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (OpenLineSegment point) (LineSegment AnEndPoint point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LineEQ r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Ord r => HasIntersectionWith (OpenInterval r) (Interval AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

(Point_ point d r, Fractional r) => HasOnSegment (LineSegment AnEndPoint point) d Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 d r0, r0 ~ NumType (LineSegment AnEndPoint point), d ~ Dimension (LineSegment AnEndPoint point)) => point0 -> LineSegment AnEndPoint point -> Bool Source #

(Point_ point 2 r, Num r) => HasOnSegment (LineSegment AnEndPoint point) 2 Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

onSegment :: (Ord r0, Point_ point0 2 r0, r0 ~ NumType (LineSegment AnEndPoint point), 2 ~ Dimension (LineSegment AnEndPoint point)) => point0 -> LineSegment AnEndPoint point -> Bool Source #

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (LineSegment AnEndPoint point) (ClosedLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Point_ point' 2 r, Num r, Ord r) => HasIntersectionWith (LineSegment AnEndPoint point) (OpenLineSegment point') Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Point_ point 2 r, Fractional r, Ord r) => IsIntersectableWith (LinePV 2 r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Ord r => HasIntersectionWith (Point 1 r) (Interval AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => IsIntersectableWith (Point 1 r) (Interval AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => HasIntersectionWith (Interval AnEndPoint r) (ClosedInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => HasIntersectionWith (Interval AnEndPoint r) (OpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => HasIntersectionWith (Interval AnEndPoint r) (Interval AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Ord r => IsIntersectableWith (Interval AnEndPoint r) (Interval AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

type Rep (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

type Rep (AnEndPoint r) = D1 ('MetaData "AnEndPoint" "HGeometry.Interval.EndPoint" "hgeometry-kernel-1.0.0.0-inplace" 'False) (C1 ('MetaCons "AnEndPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 EndPointType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 r)))
type NumType (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

type NumType (AnEndPoint r) = r
type IxValue (AnEndPoint r) Source # 
Instance details

Defined in HGeometry.Interval.EndPoint

type IxValue (AnEndPoint r) = r
type Intersection (LineEQ r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LinePV 2 r) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Intersection (LineSegment AnEndPoint point) (LineSegment AnEndPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

spanIn :: forall point (d :: Nat) r (endPoint :: Type -> Type). (Point_ point d r, Ord r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => Getter point r -> LineSegment endPoint point -> Interval AnEndPoint r Source #

Computes the span of the interval in the given direction. Note that the returned interval is a proper interval, i.e. with the start smaller than the end.

>>> spanIn xCoord (ClosedLineSegment (Point2 5 (10 :: Int)) (Point2 20 0))
Interval (AnEndPoint Closed 5) (AnEndPoint Closed 20)
>>> spanIn yCoord (ClosedLineSegment (Point2 5 (10 :: Int)) (Point2 20 0))
Interval (AnEndPoint Closed 0) (AnEndPoint Closed 10)

class IsEndPoint endPoint endPoint => EndPoint_ endPoint where Source #

An endpoint storing values of some type r

Methods

endPointType :: endPoint -> EndPointType Source #

Report the type of the endpoint

mkEndPoint :: IxValue endPoint -> endPoint Source #

constructs a "default" enpoint

data LineLineSegmentIntersection lineSegment Source #

Line x LineSegment intersection

Constructors

Line_x_LineSegment_Point (Point 2 (NumType lineSegment)) 
Line_x_LineSegment_LineSegment lineSegment 

Instances

Instances details
(Show (Point 2 (NumType lineSegment)), Show lineSegment) => Show (LineLineSegmentIntersection lineSegment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Eq (Point 2 (NumType lineSegment)), Eq lineSegment) => Eq (LineLineSegmentIntersection lineSegment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

data LineSegmentLineSegmentIntersection lineSegment Source #

LineSegment x LineSegment intersection

Instances

Instances details
(Show (Point 2 (NumType lineSegment)), Show lineSegment) => Show (LineSegmentLineSegmentIntersection lineSegment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Eq (Point 2 (NumType lineSegment)), Eq lineSegment) => Eq (LineSegmentLineSegmentIntersection lineSegment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

data HalfLineLineSegmentIntersection point segment Source #

Data type representing the intersection of a HalfLine and a LineSegment

Instances

Instances details
Functor (HalfLineLineSegmentIntersection point) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Generic (HalfLineLineSegmentIntersection point segment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Associated Types

type Rep (HalfLineLineSegmentIntersection point segment) 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Rep (HalfLineLineSegmentIntersection point segment) = D1 ('MetaData "HalfLineLineSegmentIntersection" "HGeometry.LineSegment.Intersection" "hgeometry-kernel-1.0.0.0-inplace" 'False) (C1 ('MetaCons "HalfLine_x_LineSegment_Point" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 point)) :+: C1 ('MetaCons "HalfLine_x_LineSegment_LineSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 segment)))
(Read point, Read segment) => Read (HalfLineLineSegmentIntersection point segment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Show point, Show segment) => Show (HalfLineLineSegmentIntersection point segment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Eq point, Eq segment) => Eq (HalfLineLineSegmentIntersection point segment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(Ord point, Ord segment) => Ord (HalfLineLineSegmentIntersection point segment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

(HasSquaredEuclideanDistance point, HasSquaredEuclideanDistance segment, NumType point ~ NumType segment, Dimension point ~ Dimension segment) => HasSquaredEuclideanDistance (HalfLineLineSegmentIntersection point segment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

Methods

squaredEuclideanDistTo :: forall r (d :: Nat) point0. (r ~ NumType (HalfLineLineSegmentIntersection point segment), d ~ Dimension (HalfLineLineSegmentIntersection point segment), Num r, Point_ point0 d r) => point0 -> HalfLineLineSegmentIntersection point segment -> r Source #

pointClosestTo :: forall r (d :: Nat) point0. (r ~ NumType (HalfLineLineSegmentIntersection point segment), d ~ Dimension (HalfLineLineSegmentIntersection point segment), Num r, Point_ point0 d r) => point0 -> HalfLineLineSegmentIntersection point segment -> Point d r Source #

pointClosestToWithDistance :: forall r (d :: Nat) point0. (r ~ NumType (HalfLineLineSegmentIntersection point segment), d ~ Dimension (HalfLineLineSegmentIntersection point segment), Num r, Point_ point0 d r) => point0 -> HalfLineLineSegmentIntersection point segment -> (Point d r, r) Source #

type Rep (HalfLineLineSegmentIntersection point segment) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type Rep (HalfLineLineSegmentIntersection point segment) = D1 ('MetaData "HalfLineLineSegmentIntersection" "HGeometry.LineSegment.Intersection" "hgeometry-kernel-1.0.0.0-inplace" 'False) (C1 ('MetaCons "HalfLine_x_LineSegment_Point" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 point)) :+: C1 ('MetaCons "HalfLine_x_LineSegment_LineSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 segment)))
type Dimension (HalfLineLineSegmentIntersection point edge) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

type NumType (HalfLineLineSegmentIntersection point edge) Source # 
Instance details

Defined in HGeometry.LineSegment.Intersection

data ClosedSegmentHalfSpaceIntersection extra point Source #

Models the intersection of a closed linesegment and halfspace if the segment intersects the bounding hyperplane, the intersection point is of type extra.

Constructors

ClosedLineSegment_x_HalfSpace_Point point 
ClosedLineSegment_x_HalfSpace_SubSegment (ClosedLineSegment (OriginalOrExtra point extra))

the subsegment is always oriented from the intersection point towards the original point note that this may reverse the original input segment.

ClosedLineSegment_x_HalfSpace_CompleteSegment (ClosedLineSegment point)