Copyright | (C) 2017 Maksymilian Owsianny |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Maksymilian.Owsianny@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Set Operations of Polytopes by BSP Merging.
- type BSP = BinaryTree LeafColor
- type BSP3D = BSP Facet3D
- type BSP2D = BSP Facet2D
- class Clip b v n => Universe b v n where
- universePlanes :: (Applicative v, Traversable v, Num n) => [Plane v n]
- universeBox :: (Universe b v n, Applicative v, Traversable v, Num n) => [Facet b v n]
- splitRegion :: (Universe b v n, Functor v, Num n) => Plane v n -> [Facet b v n] -> ([Facet b v n], [Facet b v n])
- mergeBSPs :: (Universe b v n, Applicative v, Traversable v, Num n, Ord n, EqZero n) => SetOperation -> BSP (Facet b v n) -> BSP (Facet b v n) -> BSP (Facet b v n)
- trim :: Clip b v n => BSP (Facet b v n) -> BSP (Facet b v n)
- makeBSP :: Clip b v n => [Facet b v n] -> BSP (Facet b v n)
- toBoundary :: (Clip b v n, Functor v, Num n) => BSP (Facet b v n) -> [Facet b v n]
Documentation
type BSP = BinaryTree LeafColor Source #
universePlanes :: (Applicative v, Traversable v, Num n) => [Plane v n] Source #
Planes bounding the UniverseBox.
universeBox :: (Universe b v n, Applicative v, Traversable v, Num n) => [Facet b v n] Source #
List of facets bounding the Universe.
splitRegion :: (Universe b v n, Functor v, Num n) => Plane v n -> [Facet b v n] -> ([Facet b v n], [Facet b v n]) Source #
Split a region within a Universe bounded by a list of Facets.
mergeBSPs :: (Universe b v n, Applicative v, Traversable v, Num n, Ord n, EqZero n) => SetOperation -> BSP (Facet b v n) -> BSP (Facet b v n) -> BSP (Facet b v n) Source #
Perform a given SetOperation of two BSPs by merging
trim :: Clip b v n => BSP (Facet b v n) -> BSP (Facet b v n) Source #
Optimize a resulting BSP after merging by removing superficial splitting planes.