| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
HGeometry.HalfPlane.CommonIntersection
Synopsis
- data CommonIntersection halfPlane r
- = EmptyIntersection
- | SingletonPoint (Point 2 r) (Vector 3 halfPlane)
- | InSubLine (VerticalOrLineEQ r) (Vector 2 halfPlane) (SubLine halfPlane r)
- | Slab halfPlane halfPlane
- | BoundedRegion (ConvexPolygon (Point 2 r :+ halfPlane))
- | UnboundedRegion (Chain Seq halfPlane r)
- data SubLine halfPlane r
- = EntireLine
- | InHalfLine (HalfLine (Point 2 r)) halfPlane
- | InSegment (ClosedLineSegment (Point 2 r)) halfPlane halfPlane
- newtype Chain (f :: Type -> Type) halfPlane r = Chain (Alternating f (Point 2 r) halfPlane)
- commonIntersection :: (Foldable1 f, Functor f, HalfPlane_ halfPlane r, Fractional r, Ord r, HyperPlane_ (BoundingHyperPlane halfPlane 2 r) 2 r, Show halfPlane, Show r) => f halfPlane -> CommonIntersection halfPlane r
Documentation
data CommonIntersection halfPlane r Source #
Common intersection of a bunch of halfplanes
Constructors
| EmptyIntersection | |
| SingletonPoint (Point 2 r) (Vector 3 halfPlane) | Common intersection is a singleton point, defined by the three given halfplanes |
| InSubLine (VerticalOrLineEQ r) (Vector 2 halfPlane) (SubLine halfPlane r) | The two halfPlanes that define the line, and the other halfplanes furthe restricitng the line. |
| Slab halfPlane halfPlane | two parallel halfPlanes l and u that form a slab; |
| BoundedRegion (ConvexPolygon (Point 2 r :+ halfPlane)) | |
| UnboundedRegion (Chain Seq halfPlane r) | each vertex stores the interior halfplane of the CCW-edge it is incident to. |
Instances
| (Show r, Show halfPlane) => Show (CommonIntersection halfPlane r) Source # | |
Defined in HGeometry.HalfPlane.CommonIntersection Methods showsPrec :: Int -> CommonIntersection halfPlane r -> ShowS # show :: CommonIntersection halfPlane r -> String # showList :: [CommonIntersection halfPlane r] -> ShowS # | |
| (Eq r, Eq halfPlane) => Eq (CommonIntersection halfPlane r) Source # | |
Defined in HGeometry.HalfPlane.CommonIntersection Methods (==) :: CommonIntersection halfPlane r -> CommonIntersection halfPlane r -> Bool # (/=) :: CommonIntersection halfPlane r -> CommonIntersection halfPlane r -> Bool # | |
data SubLine halfPlane r Source #
Part of the line
Constructors
| EntireLine | |
| InHalfLine (HalfLine (Point 2 r)) halfPlane | the third halfPlane |
| InSegment (ClosedLineSegment (Point 2 r)) halfPlane halfPlane | the remaining two halfplanes |
newtype Chain (f :: Type -> Type) halfPlane r Source #
A polygonal chain bounding an unbounded convex region, in CCW order.
Constructors
| Chain (Alternating f (Point 2 r) halfPlane) |
Instances
| Functor f => Bifunctor (Chain f) Source # | |
| Functor f => Functor (Chain f r) Source # | |
| (Show halfPlane, Show (f (Point 2 r, halfPlane))) => Show (Chain f halfPlane r) Source # | |
| (Eq halfPlane, Eq (f (Point 2 r, halfPlane))) => Eq (Chain f halfPlane r) Source # | |
| (Ord halfPlane, Ord (f (Point 2 r, halfPlane))) => Ord (Chain f halfPlane r) Source # | |
Defined in HGeometry.HalfPlane.CommonIntersection.Chain Methods compare :: Chain f halfPlane r -> Chain f halfPlane r -> Ordering # (<) :: Chain f halfPlane r -> Chain f halfPlane r -> Bool # (<=) :: Chain f halfPlane r -> Chain f halfPlane r -> Bool # (>) :: Chain f halfPlane r -> Chain f halfPlane r -> Bool # (>=) :: Chain f halfPlane r -> Chain f halfPlane r -> Bool # max :: Chain f halfPlane r -> Chain f halfPlane r -> Chain f halfPlane r # min :: Chain f halfPlane r -> Chain f halfPlane r -> Chain f halfPlane r # | |
commonIntersection :: (Foldable1 f, Functor f, HalfPlane_ halfPlane r, Fractional r, Ord r, HyperPlane_ (BoundingHyperPlane halfPlane 2 r) 2 r, Show halfPlane, Show r) => f halfPlane -> CommonIntersection halfPlane r Source #
Computes the common intersection of a \(n\) halfplanes.
running time: \(O(n\log n)\)