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

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

Geometry.SetOperations.BRep

Description

Boundary representations for conversion to and from BSP/Volumes.

Synopsis

Documentation

class FromPolytopeRep p b v n where Source #

Convert from polytope to a list of Facets.

Minimal complete definition

fromPolytopeRep

Methods

fromPolytopeRep :: p v n -> [Facet b v n] Source #

Instances

(MakePlane v n, Eq (v n), Foldable v, Applicative v, R3 v, Num n, Ord n, EqZero n) => FromPolytopeRep Poly3 (FB3 v n) v n Source # 

Methods

fromPolytopeRep :: Poly3 v n -> [Facet (FB3 v n) v n] Source #

class ToPolytopeRep p b v n where Source #

Convert from list of Facets to a polytope boundary representation.

Minimal complete definition

toPolytopeRep

Methods

toPolytopeRep :: [Facet b v n] -> p v n Source #

Instances

ToPolytopeRep PolyT3 (FB3 v n) v n Source # 

Methods

toPolytopeRep :: [Facet (FB3 v n) v n] -> PolyT3 v n Source #

data Poly3 v n Source #

Indexed 3-BRep as a list of convex polygons. Continent as a way to introduce new base shapes into the constructive geometry context.

Constructors

Poly3 (Vector (Point v n)) [[Int]] 

Instances

(MakePlane v n, Eq (v n), Foldable v, Applicative v, R3 v, Num n, Ord n, EqZero n) => FromPolytopeRep Poly3 (FB3 v n) v n Source # 

Methods

fromPolytopeRep :: Poly3 v n -> [Facet (FB3 v n) v n] Source #

newtype PolyT3 v n Source #

Simple direct 3-BRep as a list of triangles. Useful as an output after performing specified set operations of the base shapes for rendering.

Constructors

PolyT3 [[Point v n]] 

Instances

ToPolytopeRep PolyT3 (FB3 v n) v n Source # 

Methods

toPolytopeRep :: [Facet (FB3 v n) v n] -> PolyT3 v n Source #