Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SubLine d p r = SubLine {}
- subRange :: forall d p r p. Lens (SubLine d p r) (SubLine d p r) (Interval p r) (Interval p r)
- line :: forall d p r d. Lens (SubLine d p r) (SubLine d p r) (Line d r) (Line d r)
- pointAt :: (Num r, Arity d) => r -> Line d r -> Point d r
- fixEndPoints :: (Num r, Arity d) => SubLine d p r -> SubLine d (Point d r :+ p) r
- toOffset :: (Eq r, Fractional r, Arity d) => Point d r -> Line d r -> r
- onSubLine :: (Ord r, Fractional r, Arity d) => Point d r -> SubLine d p r -> Bool
- onSubLine2 :: (Ord r, Num r) => Point 2 r -> SubLine 2 p r -> Bool
- fromLine :: Arity d => Line d r -> SubLine d () (UnBounded r)
Documentation
Part of a line. The interval is ranged based on the vector of the line l, and s.t.t zero is the anchorPoint of l.
Instances
subRange :: forall d p r p. Lens (SubLine d p r) (SubLine d p r) (Interval p r) (Interval p 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
onSubLine :: (Ord r, Fractional r, Arity d) => Point d r -> SubLine d p r -> Bool Source #
given point p, and a Subline l r such that p lies on line l, test if it lies on the subline, i.e. in the interval r