-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Mecha is a solid modeling language geared for machine design. -- -- Mecha is a constructive solid modeling language based on -- functional-representation primitives. @package mecha @version 0.0.3 module Language.Mecha.Types type Vector = (Double, Double, Double) type Vertex = Vector type Normal = Vector type Color = Vector class Moveable a move :: (Moveable a) => Vector -> a -> a rotateX :: (Moveable a) => Double -> a -> a rotateY :: (Moveable a) => Double -> a -> a rotateZ :: (Moveable a) => Double -> a -> a class Scaleable a scale :: (Scaleable a) => Vector -> a -> a class Colorable a color :: (Colorable a) => Color -> a -> a class Setable a union :: (Setable a) => a -> a -> a intersection :: (Setable a) => a -> a -> a difference :: (Setable a) => a -> a -> a moveX :: (Moveable a) => Double -> a -> a moveY :: (Moveable a) => Double -> a -> a moveZ :: (Moveable a) => Double -> a -> a scaleAll :: (Scaleable a) => Double -> a -> a unions :: (Setable a) => [a] -> a debug :: (Show a) => String -> a -> b -> b module Language.Mecha.Solid data Solid -- | A sphere with radius 1 centered at origin. sphere :: Solid -- | A sphere with edge length 2 centered at origin. cube :: Solid -- | A cylinder with radius 1 and height 2 centered at origin. cylinder :: Solid instance Show Transform instance Show Solid instance Colorable Solid instance Setable Solid instance Scaleable Solid instance Moveable Solid module Language.Mecha.Assembly -- | The Asm holds all the parts and sub-assemblies. data Asm -- | Place a part (Solid) in an assembly. part :: Solid -> Asm -- | Assemble multiple sub-assemblies together. assemble :: [Asm] -> Asm -- | Generate a POVRay file given a file name, camera location, target -- location, and assembly. view :: FilePath -> Vector -> Vector -> Asm -> IO () instance Moveable Asm instance Colorable Asm -- | Mecha Examples module Language.Mecha.Examples -- | A simple design example. example :: IO () -- | Mecha is a Solid Modeling Language module Language.Mecha