-- 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.2 module Language.Mecha.OpenGL vertex3 :: (Real a, Floating a, Real a1, Floating a1, Real a2, Floating a2) => a -> a1 -> a2 -> IO () normal3 :: (Real a, Floating a, Real a1, Floating a1, Real a2, Floating a2) => a -> a1 -> a2 -> IO () color3 :: (Real a, Floating a, Real a1, Floating a1, Real a2, Floating a2) => a -> a1 -> a2 -> IO () scale3 :: (Real a, Floating a, Real a1, Floating a1, Real a2, Floating a2) => a -> a1 -> a2 -> IO () translate3 :: (Real a, Floating a, Real a1, Floating a1, Real a2, Floating a2) => a -> a1 -> a2 -> IO () rotate3 :: (Real a, Floating a, Real a1, Floating a1, Real a2, Floating a2, Real a3, Floating a3) => a -> a1 -> a2 -> a3 -> IO () module Language.Mecha.Viewer viewer :: Model -> IO () instance Show State 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 rotate :: (Moveable a) => Vector -> 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 rotateX :: (Moveable a) => Double -> a -> a rotateY :: (Moveable a) => Double -> a -> a rotateZ :: (Moveable a) => Double -> a -> a scaleXYZ :: (Scaleable a) => Double -> a -> a unions :: (Setable a) => [a] -> a debug :: (Show a) => String -> a -> b -> b module Language.Mecha.Solid -- | A solid is a predicate that is true if the point is inside the solid. data Solid Solid :: (Vector -> Bool) -> Solid instance Setable Solid instance Scaleable Solid instance Moveable Solid module Language.Mecha.Mesh -- | Creates a triangle mesh from a solid. mesh :: Double -> Double -> Int -> Solid -> [(Vector, Vector)] instance Show Edge instance Show Op module Language.Mecha.Primitives -- | 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 module Language.Mecha.Assembly -- | The Asm holds all the parts and sub-assemblies. data Asm -- | Place a part (Solid) in an assembly. place :: Double -> Double -> Int -> Solid -> Asm -- | Assemble multiple sub-assemblies together. assemble :: [Asm] -> Asm -- | View an assembly given radius, precision, and vertex refinement level. view :: 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