-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | data exchange between graphic applications -- -- Collada is the standard graphics format for data exchange between 3d -- Tools. As well as the file format also its represenation as an -- algebraic data type could be used to make libraries more composable. -- Please propose changes. @package collada-types @version 0.1 module Graphics.Formats.Collada.ColladaTypes type Scene = Tree SceneNode data SceneNode SceneNode :: ID -> NodeType -> [String] -> [(SID, Transform)] -> [Camera] -> [Controller] -> [Geometry] -> [Light] -> SceneNode nodeId :: SceneNode -> ID nodeType :: SceneNode -> NodeType nodeLayers :: SceneNode -> [String] nodeTransformations :: SceneNode -> [(SID, Transform)] nodeCameras :: SceneNode -> [Camera] nodeController :: SceneNode -> [Controller] nodeGeometries :: SceneNode -> [Geometry] nodeLights :: SceneNode -> [Light] EmptyRoot :: SceneNode data NodeType JOINT :: NodeType NODE :: NodeType NOTYPE :: NodeType data Transform LookAt :: Vec3 -> Vec3 -> Vec3 -> Transform lookAtEye :: Transform -> Vec3 lookAtInterest :: Transform -> Vec3 lookAtUp :: Transform -> Vec3 Matrix :: Mat44 -> Transform Rotate :: Vec3 -> Float -> Vec3 -> Float -> Vec3 -> Float -> Transform Scale :: Vec3 -> Transform Skew :: Float -> Vec3 -> Vec3 -> Transform skewAngle :: Transform -> Float skewRotation :: Transform -> Vec3 skewTranslation :: Transform -> Vec3 Translate :: Vec3 -> Transform data Camera Perspective :: ID -> ViewSize -> Z -> Camera perspectiveID :: Camera -> ID perspectiveFov :: Camera -> ViewSize perspectiveZ :: Camera -> Z Orthographic :: ID -> ViewSize -> Z -> Camera orthographicID :: Camera -> ID orthographicViewSize :: Camera -> ViewSize orthographicZ :: Camera -> Z data ViewSize ViewSizeX :: Float -> ViewSize ViewSizeY :: Float -> ViewSize ViewSizeXY :: (Float, Float) -> ViewSize data Z Z :: Float -> Float -> Z zNear :: Z -> Float zFar :: Z -> Float data Light Ambient :: ID -> Color -> Light ambientID :: Light -> ID ambientColor :: Light -> Color Directional :: ID -> Color -> Light directionalID :: Light -> ID directionalColor :: Light -> Color Point :: ID -> Color -> Attenuation -> Light pointID :: Light -> ID pointColor :: Light -> Color pointAttenuation :: Light -> Attenuation Spot :: ID -> Color -> Attenuation -> Float -> Float -> Light spotID :: Light -> ID spotColor :: Light -> Color spotAttenuation :: Light -> Attenuation spotFallOffAngle :: Light -> Float spotFallOffExponent :: Light -> Float data Attenuation Attenuation :: Float -> Float -> Float -> Attenuation attenuationConstant :: Attenuation -> Float attenuationLinear :: Attenuation -> Float attenuationQuadratic :: Attenuation -> Float data Controller Controller :: ID -> [Skin] -> [Morph] -> Controller contrId :: Controller -> ID skin :: Controller -> [Skin] morph :: Controller -> [Morph] data Geometry Geometry :: ID -> [Mesh] -> Vertices -> Geometry meshID :: Geometry -> ID mesh :: Geometry -> [Mesh] vertices :: Geometry -> Vertices data Mesh -- | Lines LP :: LinePrimitive -> Mesh -- | LineStrips LS :: LinePrimitive -> Mesh -- | Polygon: Contains polygon primitives which may contain holes. P :: Polygon -> Mesh -- | PolyList: Contains polygon primitives that cannot contain holes. PL :: LinePrimitive -> Mesh -- | Triangles Tr :: LinePrimitive -> Mesh -- | TriFans Trf :: LinePrimitive -> Mesh -- | TriStrips Trs :: LinePrimitive -> Mesh -- | Splines S :: LinePrimitive -> Mesh data Vertices Vertices :: ID -> [(Float, Float, Float)] -> [(Float, Float, Float)] -> Vertices name :: Vertices -> ID verts :: Vertices -> [(Float, Float, Float)] normals :: Vertices -> [(Float, Float, Float)] data LinePrimitive LinePrimitive :: [[Int]] -> [[Int]] -> [[Int]] -> [Material] -> LinePrimitive lineP :: LinePrimitive -> [[Int]] lineN :: LinePrimitive -> [[Int]] lineT :: LinePrimitive -> [[Int]] ms :: LinePrimitive -> [Material] data Polygon Polygon :: [[Int]] -> [[Int]] -> ([Int], [Int]) -> [Material] -> Polygon poylgonP :: Polygon -> [[Int]] poylgonN :: Polygon -> [[Int]] polygonPh :: Polygon -> ([Int], [Int]) polygonMs :: Polygon -> [Material] data AnimChannel AnimChannel :: (ID, [Float], Accessor) -> (ID, [Float], Accessor) -> [Interpolation] -> [(TargetID, AccessorName)] -> AnimChannel input :: AnimChannel -> (ID, [Float], Accessor) output :: AnimChannel -> (ID, [Float], Accessor) interp :: AnimChannel -> [Interpolation] targets :: AnimChannel -> [(TargetID, AccessorName)] EmptyAnim :: AnimChannel type ID = String type SID = String data Semantic data Profile BRIDGE :: Asset -> Extra -> Profile CG :: Asset -> Code -> Include -> NewParam -> TechniqueCG -> Extra -> Profile COMMON :: Asset -> NewParam -> TechniqueCommon -> String -> Profile GLES :: Asset -> NewParam -> TechniqueCG -> Extra -> Profile GLES2 :: Asset -> Code -> Include -> NewParam -> TechniqueCG -> Extra -> Profile GLSL :: Asset -> Code -> Include -> NewParam -> TechniqueCG -> Extra -> Profile data NewParam Annotat :: NewParam Semantic :: NewParam Modifier :: NewParam NoParam :: NewParam data TechniqueCommon Constant :: TechniqueCommon LambertCol :: [Fx_common_color_type] -> TechniqueCommon LambertTex :: [Fx_common_texture_type] -> [[Float]] -> TechniqueCommon PhongCol :: [Fx_common_color_type] -> TechniqueCommon PhongTex :: [Fx_common_texture_type] -> [[Float]] -> TechniqueCommon Blinn :: TechniqueCommon type Material = (SID, Effect) type Effect = Profile data C Color :: (Float, Float, Float, Float) -> C data Color RGB :: Float -> Float -> Float -> Color type Animation = Tree (SID, AnimChannel) data Fx_common_color_type CEmission :: C -> Fx_common_color_type CAmbient :: C -> Fx_common_color_type CDiffuse :: C -> Fx_common_color_type CSpecular :: C -> Fx_common_color_type CShininess :: Float -> Fx_common_color_type CReflective :: C -> Fx_common_color_type CReflectivity :: Float -> Fx_common_color_type CTransparent :: C -> Fx_common_color_type CTransparency :: Float -> Fx_common_color_type CIndex_of_refraction :: Float -> Fx_common_color_type data Fx_common_texture_type TEmission :: Texture -> Fx_common_texture_type TAmbient :: Texture -> Fx_common_texture_type TDiffuse :: Texture -> Fx_common_texture_type TSpecular :: Texture -> Fx_common_texture_type TShininess :: Float -> Fx_common_texture_type TReflective :: Texture -> Fx_common_texture_type TReflectivity :: Float -> Fx_common_texture_type TTransparent :: Texture -> Fx_common_texture_type TTransparency :: Float -> Fx_common_texture_type TIndex_of_refraction :: Float -> Fx_common_texture_type data Texture Texture :: ID -> String -> Texture imageSID :: Texture -> ID path :: Texture -> String data Interpolation Step :: Interpolation Linear :: Interpolation Bezier :: [Float] -> [Float] -> Interpolation instance Show NodeType instance Eq NodeType instance Show Transform instance Eq Transform instance Show ViewSize instance Eq ViewSize instance Show Z instance Eq Z instance Show Attenuation instance Eq Attenuation instance Show MorphMethod instance Eq MorphMethod instance Show Joint instance Eq Joint instance Show Skin instance Eq Skin instance Show Semantic instance Eq Semantic instance Show Input instance Eq Input instance Show Morph instance Eq Morph instance Show Interpolation instance Eq Interpolation instance Show NewParam instance Eq NewParam instance Show TechniqueCG instance Eq TechniqueCG instance Show Extra instance Eq Extra instance Show Technique instance Eq Technique instance Show C instance Eq C instance Show Fx_common_color_type instance Eq Fx_common_color_type instance Show Texture instance Eq Texture instance Show Fx_common_texture_type instance Eq Fx_common_texture_type instance Show TechniqueCommon instance Eq TechniqueCommon instance Show Profile instance Eq Profile instance Show AnimChannel instance Eq AnimChannel instance Show Vertices instance Eq Vertices instance Show Controller instance Eq Controller instance Show Camera instance Eq Camera instance Show Polygon instance Eq Polygon instance Show LinePrimitive instance Eq LinePrimitive instance Show Mesh instance Eq Mesh instance Show Geometry instance Eq Color instance Show Color instance Show Light instance Eq Light instance Show SceneNode instance Eq SceneNode instance Eq Geometry module Graphics.Formats.Collada.GenerateObjects -- | Example scene with a camera, lights and a cube aScene :: Scene aCube :: SceneNode obj :: String -> [Geometry] -> SceneNode -- | Example animation of the cube animation :: [Animation] -- | A blue/textured cube cube :: Geometry polys :: [(Float, Float, Float)] -> [(Float, Float, Float)] -> [[Int]] -> [[Int]] -> [Geometry] lines :: [(Float, Float, Float)] -> [(Float, Float, Float)] -> [[Int]] -> [[Int]] -> [Geometry] trifans :: [(Float, Float, Float)] -> [(Float, Float, Float)] -> [[Int]] -> [[Int]] -> [Geometry] tristrips :: [(Float, Float, Float)] -> [(Float, Float, Float)] -> [[Int]] -> [[Int]] -> [Geometry] lightedScene :: [Geometry] -> Scene ge :: Geometry -> SceneNode scene2 :: Scene -- | Animation of several cubes animation2 :: [Animation] emptyAnimation :: [[Animation]] emptyAnim :: [Animation] -- | generate an animation that points to the cubes new_channels :: AnimChannel -> [SceneNode] -> AnimChannel -- | a helper function for xyz_grid tran :: SceneNode -> (Float, Float, Float) -> String -> SceneNode test_objs :: [SceneNode] -- | Generate a 3 dimensional grid where an object (stored in a SceneNode) -- is repeated in along the grid xyz_grid :: Int -> Int -> Int -> Float -> SceneNode -> [SceneNode] en :: [(Word8, Word8, Word8)] rename :: SceneNode -> String -> SceneNode streamScene :: [SceneNode] -> Scene streamAnimation :: [(Float, Float, Float)] -> [SceneNode] -> [Animation] module Graphics.Formats.Collada.Transformations type V = (Float, Float, Float) -- | extrude a 2d polygon to 3d, the same points are added again with -- extrusion direction v extrude :: V -> Geometry -> Geometry -- | return a list containing lists of every element with its neighbour -- i.e. [e1,e2,e3] -> [ [e1,e2], [e2,e3], [e3, e1] ] cycleNeighbours :: [a] -> [[a]] cycleN :: a -> [a] -> [[a]]