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

Safe HaskellNone




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.




_line :: Line d r
_subRange :: Interval p r


Arity d => Functor (SubLine d p) Source 
Arity d => Foldable (SubLine d p) Source 
Arity d => Traversable (SubLine d p) Source 
(Eq r, Eq p, Arity d) => Eq (SubLine d p r) Source 
(Show r, Show p, Arity d) => Show (SubLine d p r) Source 
(Ord r, Fractional r) => IsIntersectableWith (SubLine 2 p r) (SubLine 2 p r) Source 
(Fractional r, Ord r, HasBoundingLines o) => IsIntersectableWith (SubLine 2 a r) (Slab o a r) Source 
type NumType (SubLine d p r) = r Source 
type Dimension (SubLine d p r) = d Source 
type IntersectionOf (SubLine 2 p r) (SubLine 2 q r) = (:) * NoIntersection ((:) * (Point 2 r) ((:) * (SubLine 2 p r) ([] *))) Source 
type IntersectionOf (SubLine 2 p r) (Slab o a r) = (:) * NoIntersection ((:) * (SubLine 2 a r) ((:) * (LineSegment 2 a r) ([] *))) Source 

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