computational-geometry-0.1.0.3: Collection of algorithms in Computational Geometry.

Geometry.SetOperations.BSP

Description

Synopsis

# Documentation

data BinaryTree l n Source #

Binary Tree parametrized by leafs and nodes

Constructors

 Node (BinaryTree l n) !n (BinaryTree l n) Leaf !l

Instances

 Source # Methodsbimap :: (a -> b) -> (c -> d) -> BinaryTree a c -> BinaryTree b d #first :: (a -> b) -> BinaryTree a c -> BinaryTree b c #second :: (b -> c) -> BinaryTree a b -> BinaryTree a c # Source # Methodsfmap :: (a -> b) -> BinaryTree l a -> BinaryTree l b #(<\$) :: a -> BinaryTree l b -> BinaryTree l a # (Eq l, Eq n) => Eq (BinaryTree l n) Source # Methods(==) :: BinaryTree l n -> BinaryTree l n -> Bool #(/=) :: BinaryTree l n -> BinaryTree l n -> Bool # (Show l, Show n) => Show (BinaryTree l n) Source # MethodsshowsPrec :: Int -> BinaryTree l n -> ShowS #show :: BinaryTree l n -> String #showList :: [BinaryTree l n] -> ShowS #

data LeafColor Source #

Constructors

 Green Red

Instances

 Source # Methods Source # MethodsshowList :: [LeafColor] -> ShowS #

cmp :: BSP a -> BSP a Source #

Complementary set

pattern In :: forall a. BSP a Source #

pattern Out :: forall a. BSP a Source #

constructBSP :: Clip b v n => (Facet b v n -> c) -> [Facet b v n] -> BSP c Source #

splitWith :: (a -> (Maybe a, Maybe a)) -> [a] -> ([a], [a]) Source #

prettyBSP :: Ord f => BSP f -> IO () Source #

Pretty print BSP tree to stdout.

renderH :: (Doc -> Doc) -> Context k -> BSP k -> Doc Source #

Render BSP into a horizontal tree with a given context.

denormalizeBSP :: Ord n => BSP n -> (BSP Int, IntMap n) Source #

Denormalize BSP with integers at nodes and IntMap of values.