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

Copyright(C) 2017 Maksymilian Owsianny
LicenseBSD-style (see LICENSE)
MaintainerMaksymilian.Owsianny@gmail.com
Safe HaskellNone
LanguageHaskell2010

Geometry.SetOperations.Merge

Description

Set Operations of Polytopes by BSP Merging.

Synopsis

Documentation

class Clip b v n => Universe b v n where Source #

Minimal complete definition

makeFacet

Methods

makeFacet :: Plane v n -> Facet b v n Source #

Turn plane into a Facet by clipping it by the universe box.

Instances

(Ord n, Fractional n, EqZero n) => Universe (FB2 V2 n) V2 n Source # 

Methods

makeFacet :: Plane V2 n -> Facet (FB2 V2 n) V2 n Source #

(Ord n, Fractional n, EqZero n) => Universe (FB3 V3 n) V3 n Source # 

Methods

makeFacet :: Plane V3 n -> Facet (FB3 V3 n) V3 n 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.

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

Make a BSP from a list of bounding facets.

toBoundary :: (Clip b v n, Functor v, Num n) => BSP (Facet b v n) -> [Facet b v n] Source #

Reconstruct boundary facets from the BSP.