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

Data.Geometry.HalfLine

Contents

Synopsis

# d-dimensional Half-Lines

data HalfLine d r Source

d-dimensional Half-Lines

Constructors

 HalfLine Fields_startPoint :: Point d r _halfLineDirection :: Vector d r

Instances

 Arity d => Functor (HalfLine d) Source Arity d => Foldable (HalfLine d) Source Arity d => Traversable (HalfLine d) Source (Eq r, Arity d) => Eq (HalfLine d r) Source (Show r, Arity d) => Show (HalfLine d r) Source (Num r, AlwaysTruePFT d) => IsTransformable (HalfLine d r) Source HasStart (HalfLine d r) Source Source type NumType (HalfLine d r) = r Source type Dimension (HalfLine d r) = d Source type StartCore (HalfLine d r) = Point d r Source type StartExtra (HalfLine d r) = () Source type IntersectionOf (HalfLine 2 r) (HalfLine 2 r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (LineSegment 2 () r) ((:) * (HalfLine 2 r) ([] *)))) Source type IntersectionOf (HalfLine 2 r) (Line 2 r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (HalfLine 2 r) ([] *))) Source type IntersectionOf (HalfLine 2 r) (LineSegment 2 p r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (LineSegment 2 () r) ([] *))) Source

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.