-- 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.4 module Language.Mecha.Types type Vector = (Double, Double, Double) type Vertex = Vector type Normal = Vector type Color = (Double, Double, Double, Double) 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 scaleX :: (Scaleable a) => Double -> a -> a scaleY :: (Scaleable a) => Double -> a -> a scaleZ :: (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 diameter centered at origin. sphere :: Double -> Solid -- | A cone with base at the origin, given base diameter, top diameter, and -- height. cone :: Double -> Double -> Double -> Solid -- | A hollow cylinder with base at the origin, given outer diameter, inner -- diamter, and height. -- -- A box with ranges or X, Y, and Z positions. box :: (Double, Double) -> (Double, Double) -> (Double, Double) -> Solid -- | A cube with edge length centered at origin. cube :: Double -> Solid -- | A cylinder with base at the origin, given diameter and height. cylinder :: Double -> Double -> Solid instance Eq Transform instance Eq 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 -- | A Scene is a light position, camera configuration, and an assembly. type Scene = (Camera, Asm) -- | Defines a camera configuration. data Camera -- | Orthographgic projection at the origin with a radius. Orthographic :: Camera -- | Perspective projection given a camera location and a target. Perspective :: Camera -- | Renders 3 orthographic views and 1 perspective view and creates a -- little html page or the images. Assembly should be within 1 of origin. view :: FilePath -> Int -> Int -> Asm -> IO () -- | Renders a MPEG movie with POVRay and ffmpeg given a file name (w/o -- file extension), heigth, width, frames-per-second, and a list of -- scenes. animate :: FilePath -> Int -> Int -> Int -> [Scene] -> IO () instance Eq Camera instance Eq Asm instance Scaleable Asm 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