Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
HGeometry.Plane.LowerEnvelope.Connected
Description
A Representation of the Lower envelope of planes in Adjacency-list form.
Synopsis
- data LowerEnvelope' plane = LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane))
- theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane)
- boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane))
- singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane
- fromVertexForm' :: forall plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r) => VertexForm plane -> LowerEnvelope' plane
- data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))
- location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)
- definers :: Lens' (BoundedVertexF f plane) (Set plane)
- location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)
- newtype UnboundedVertex plane = UnboundedVertex (Seq (LEEdge plane))
- unboundedVertexId :: VertexID
- class HasUnboundedEdges t e | t -> e where
- unboundedEdges :: Lens' t (Seq e)
- type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point)
- projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r))
- projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r)
Documentation
data LowerEnvelope' plane Source #
A connected lower envelope in adjacencylist form.
invariant: there is always at least one bounded vertex.
Constructors
LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane)) |
Instances
theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane) Source #
lens to access the unbounded vertex
boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane)) Source #
Lens to access the sequence of bounded vertices.
singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane Source #
Given a single Vertex, construct a LowerEnvelope' out of it.
fromVertexForm' :: forall plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r) => VertexForm plane -> LowerEnvelope' plane Source #
Given a Lower envelope in vertex form, construct the AdjacencyList representation out of it.
pre: The set of vertices is non-empty
\(O(n\log n)\)
data BoundedVertexF f plane Source #
Data type representing the bounded vertices of the lower envelope.
In the vertexform, the f will be Const (), i.e. we don't have adjacency information. But in case of Adjacencylist form we can implement it using a Sequence.
Instances
(Show plane, Show (NumType plane), Show (f (LEEdge plane))) => Show (BoundedVertexF f plane) Source # | |
Defined in HGeometry.Plane.LowerEnvelope.Type Methods showsPrec :: Int -> BoundedVertexF f plane -> ShowS # show :: BoundedVertexF f plane -> String # showList :: [BoundedVertexF f plane] -> ShowS # | |
(Eq plane, Eq (NumType plane), Eq (f (LEEdge plane))) => Eq (BoundedVertexF f plane) Source # | |
Defined in HGeometry.Plane.LowerEnvelope.Type Methods (==) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool # (/=) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool # |
location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r) Source #
The location of the vertex
location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r) Source #
Projected 2d location of the point
newtype UnboundedVertex plane Source #
The unbounded vertex.
Constructors
UnboundedVertex (Seq (LEEdge plane)) |
Instances
unboundedVertexId :: VertexID Source #
The vertexID of the unbounded vertex
class HasUnboundedEdges t e | t -> e where Source #
Instances
HasUnboundedEdges (LowerEnvelope' plane) (LEEdge plane) Source # | |
Defined in HGeometry.Plane.LowerEnvelope.Connected.Type Methods unboundedEdges :: Lens' (LowerEnvelope' plane) (Seq (LEEdge plane)) Source # |
type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point) Source #
Edges are either halflines or Linesegments
projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r)) Source #
Get the projected geometries (halflines and edges line segments ) representing the edges.
projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r) Source #
Computes the (projected) LineSegment or HalfLine representing a given edge.