Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SubLine d p s r = SubLine {}
- subRange :: forall d p s r p s. Lens (SubLine d p s r) (SubLine d p s r) (Interval p s) (Interval p s)
- line :: forall d p s r d r. Lens (SubLine d p s r) (SubLine d p s r) (Line d r) (Line d r)
- fixEndPoints :: (Num r, Arity d) => SubLine d p r r -> SubLine d (Point d r :+ p) r r
- dropExtra :: SubLine d p s r -> SubLine d () s r
- _unBounded :: Prism' (SubLine d p (UnBounded r) r) (SubLine d p r r)
- toUnbounded :: SubLine d p r r -> SubLine d p (UnBounded r) r
- fromUnbounded :: SubLine d p (UnBounded r) r -> Maybe (SubLine d p r r)
- onSubLine :: (Ord r, Fractional r, Arity d) => Point d r -> SubLine d p r r -> Bool
- onSubLineUB :: (Ord r, Fractional r) => Point 2 r -> SubLine 2 p (UnBounded r) r -> Bool
- onSubLine2 :: (Ord r, Num r) => Point 2 r -> SubLine 2 p r r -> Bool
- onSubLine2UB :: (Ord r, Fractional r) => Point 2 r -> SubLine 2 p (UnBounded r) r -> Bool
- getEndPointsUnBounded :: (Num r, Arity d) => SubLine d p (UnBounded r) r -> Interval p (UnBounded (Point d r))
- fromLine :: Arity d => Line d r -> SubLine d () (UnBounded r) r
- testz :: SubLine 2 () Rational Rational
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 s r p s. Lens (SubLine d p s r) (SubLine d p s r) (Interval p s) (Interval p s) Source #
fixEndPoints :: (Num r, Arity d) => SubLine d p r r -> SubLine d (Point d r :+ p) r r Source #
Annotate the subRange with the actual ending points
dropExtra :: SubLine d p s r -> SubLine d () s r Source #
forget the extra information stored at the endpoints of the subline.
toUnbounded :: SubLine d p r r -> SubLine d p (UnBounded r) r Source #
Transform into an subline with a potentially unbounded interval
fromUnbounded :: SubLine d p (UnBounded r) r -> Maybe (SubLine d p r r) Source #
Try to make a potentially unbounded subline into a bounded one.
onSubLine :: (Ord r, Fractional r, Arity d) => Point d r -> SubLine d p r 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
onSubLineUB :: (Ord r, Fractional r) => Point 2 r -> SubLine 2 p (UnBounded r) 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
onSubLine2 :: (Ord r, Num r) => Point 2 r -> SubLine 2 p r 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
onSubLine2UB :: (Ord r, Fractional r) => Point 2 r -> SubLine 2 p (UnBounded r) 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