-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Data exchange between graphics applications -- -- Collada is the standard graphics format for data exchange between 3d -- tools. Not only the file format but also its representation as an -- algebraic data type could be used to make libraries more composable. @package collada-types @version 0.4 module Graphics.Formats.Collada.Vector2D3D -- | An angle is a number between -pi and pi. type Angle = Float -- | 2D vector: a pair of coordinates. data V2 V :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> V2 data V3 V3 :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> V3 data V4 V4 :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> V4 -- | 2D affine transformation. No shearing allowed, only translation, -- rotation, and scaling. Transformations can be chained with -- mappend, and mempty is the identity transformation. data T2 -- | Unit vector with the given direction. unit :: Angle -> V2 -- | Multiplication with a scalar. (*.) :: V2 -> Float -> V2 -- | Dot product. dot :: V2 -> V2 -> Float infixl 7 `dot` -- | Dot product. dot3 :: V3 -> V3 -> Float -- | Perp-dot product (2D cross product). cross :: V2 -> V2 -> Float infixl 7 `cross` -- | 3D cross product. cross3 :: V3 -> V3 -> V3 -- | Vector rotated 90 degrees leftwards. perpL :: V2 -> V2 -- | Vector rotated 90 degrees rightwards. perpR :: V2 -> V2 -- | Multiplication with a scalar. mul :: V3 -> Float -> V3 -- | Division by a scalar. divide :: V3 -> Float -> V3 -- | Relative direction of two vectors: turn v1 v2 equals -- GT if v2 takes a left turn with respect to -- v1, LT if it is a right turn, and EQ if -- they are parallel. turn :: V2 -> V2 -> Ordering infixl 5 `turn` -- |
-- turnL v1 v2 == (turn v1 v2 == GT) --turnL :: V2 -> V2 -> Bool infixl 5 `turnL` -- |
-- turnNL v1 v2 == (turn v1 v2 /= GT) --turnNL :: V2 -> V2 -> Bool infixl 5 `turnNL` -- |
-- turnR v1 v2 == (turn v1 v2 == LT) --turnR :: V2 -> V2 -> Bool infixl 5 `turnR` -- |
-- turnNR v1 v2 == (turn v1 v2 /= LT) --turnNR :: V2 -> V2 -> Bool infixl 5 `turnNR` -- |
-- parv v1 v2 == (turn v1 v2 == EQ) --parv :: V2 -> V2 -> Bool infixl 5 `parv` -- | Vector length squared. square :: V2 -> Float -- | Vector length. mag :: V2 -> Float -- | Vector normalisation. norm :: V2 -> V2 -- | The angle of a vector with respect to the X axis. dir :: V2 -> Angle -- | 3d Vector length. v_len :: V3 -> Float -- | Set Vector length. set_len :: V3 -> Float -> V3 -- | Inverse transformation inverse :: T2 -> T2 -- | An associative operation. (<>) :: Semigroup a => a -> a -> a infixr 6 <> -- | Transformation representing a translation. translate :: V2 -> T2 -- | Transformation representing a rotation. rotate :: Angle -> T2 -- | Transformation representing a scaling. scale :: Float -> T2 -- | The translation factor of a transformation. translationOf :: T2 -> V2 -- | The rotation factor of a transformation. rotationOf :: T2 -> Angle -- | The scaling factor of a transformation. scaleOf :: T2 -> Float -- | Replacing the translation factor of a transformation. withTranslation :: T2 -> V2 -> T2 -- | Replacing the rotation factor of a transformation. withRotation :: T2 -> Angle -> T2 -- | Replacing the scaling factor of a transformation. withScale :: T2 -> Float -> T2 instance GHC.Show.Show Graphics.Formats.Collada.Vector2D3D.T2 instance GHC.Classes.Ord Graphics.Formats.Collada.Vector2D3D.V4 instance GHC.Classes.Eq Graphics.Formats.Collada.Vector2D3D.V4 instance GHC.Show.Show Graphics.Formats.Collada.Vector2D3D.V4 instance GHC.Classes.Ord Graphics.Formats.Collada.Vector2D3D.V3 instance GHC.Classes.Eq Graphics.Formats.Collada.Vector2D3D.V3 instance GHC.Show.Show Graphics.Formats.Collada.Vector2D3D.V3 instance GHC.Classes.Ord Graphics.Formats.Collada.Vector2D3D.V2 instance GHC.Classes.Eq Graphics.Formats.Collada.Vector2D3D.V2 instance GHC.Show.Show Graphics.Formats.Collada.Vector2D3D.V2 instance GHC.Base.Semigroup Graphics.Formats.Collada.Vector2D3D.T2 instance GHC.Base.Monoid Graphics.Formats.Collada.Vector2D3D.T2 instance GHC.Num.Num Graphics.Formats.Collada.Vector2D3D.V3 instance GHC.Num.Num Graphics.Formats.Collada.Vector2D3D.V2 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 :: V3 -> V3 -> V3 -> Transform [lookAtEye] :: Transform -> V3 [lookAtInterest] :: Transform -> V3 [lookAtUp] :: Transform -> V3 Matrix :: Mat44 -> Transform Rotate :: V3 -> Float -> V3 -> Float -> V3 -> Float -> Transform Scale :: V3 -> Transform Skew :: Float -> V3 -> V3 -> Transform [skewAngle] :: Transform -> Float [skewRotation] :: Transform -> V3 [skewTranslation] :: Transform -> V3 Translate :: V3 -> 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 -> Vector V3 -> Vector V3 -> Vertices [name] :: Vertices -> ID [verts] :: Vertices -> Vector V3 [normals] :: Vertices -> Vector V3 data LinePrimitive LinePrimitive :: Vector (Vector Int) -> Vector (Vector Int) -> Vector (Vector Int) -> [Material] -> LinePrimitive [lineP] :: LinePrimitive -> Vector (Vector Int) [lineN] :: LinePrimitive -> Vector (Vector Int) [lineT] :: LinePrimitive -> Vector (Vector Int) [ms] :: LinePrimitive -> [Material] data Polygon Polygon :: Vector (Vector Int) -> Vector (Vector Int) -> (Vector Int, Vector Int) -> [Material] -> Polygon [poylgonP] :: Polygon -> Vector (Vector Int) [poylgonN] :: Polygon -> Vector (Vector Int) [polygonPh] :: Polygon -> (Vector Int, Vector 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 :: V4 -> 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 -> Maybe TextureObject -> Texture [imageSID] :: Texture -> ID [path] :: Texture -> String [texObj] :: Texture -> Maybe TextureObject data Interpolation Step :: Interpolation Linear :: Interpolation Bezier :: [Float] -> [Float] -> Interpolation instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.SceneNode instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.SceneNode instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Light instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Light instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Color instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Color instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Geometry instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Mesh instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Mesh instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.LinePrimitive instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.LinePrimitive instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Polygon instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Polygon instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Camera instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Camera instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Controller instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Controller instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Vertices instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Vertices instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.AnimChannel instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.AnimChannel instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Profile instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Profile instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.TechniqueCommon instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.TechniqueCommon instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Fx_common_texture_type instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Fx_common_texture_type instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Texture instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Texture instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Fx_common_color_type instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Fx_common_color_type instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.C instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.C instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Technique instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Technique instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Extra instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Extra instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.TechniqueCG instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.TechniqueCG instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.NewParam instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.NewParam instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Interpolation instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Interpolation instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Morph instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Morph instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Input instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Input instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Semantic instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Semantic instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Skin instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Skin instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Joint instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Joint instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.MorphMethod instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.MorphMethod instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Attenuation instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Attenuation instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Z instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Z instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.ViewSize instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.ViewSize instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Transform instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.Transform instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.NodeType instance GHC.Show.Show Graphics.Formats.Collada.ColladaTypes.NodeType instance GHC.Classes.Eq Graphics.Formats.Collada.ColladaTypes.Geometry module Graphics.Formats.Collada.GenerateObjects n :: () => a -> Tree a makeScene :: ID -> [SceneNode] -> Tree SceneNode -- | An animated cube animatedCube :: (Scene, [Animation]) -- | Example scene with a cube aScene :: Scene lightedGeometry :: [Geometry] -> Scene lightedSceneNode :: SceneNode -> Scene lightedScene :: Scene -> Scene -- | Every scene needs a camera and light cameraAndLight :: [SceneNode] rot :: Float -> Float -> Float -> Transform tranrot :: [([Char], Transform)] aCamera :: SceneNode pointLight :: ID -> Float -> Float -> Float -> SceneNode ambientLight :: SceneNode aCube :: SceneNode obj :: String -> [Geometry] -> V3 -> SceneNode -- | Example animation of the cube animation :: [Animation] anim_channel :: AnimChannel fl :: () => [a] -> Vector a -- | A blue/textured cube cube :: Geometry blue :: ([Char], Profile) diffuse :: () => V4 -> [Char] -> (a, Profile) -> ([Char], Profile) replaceDiff :: V4 -> Fx_common_color_type -> Fx_common_color_type ambient :: () => V4 -> [Char] -> (a, Profile) -> ([Char], Profile) replaceAmb :: V4 -> Fx_common_color_type -> Fx_common_color_type getDiffuseColor :: Fx_common_color_type -> Maybe V4 getAmbientColor :: Fx_common_color_type -> Maybe V4 logo :: ([Char], Profile) tex :: Texture polys :: Vector V3 -> Vector V3 -> Vector (Vector Int) -> Vector (Vector Int) -> [Geometry] lines :: Vector V3 -> Vector V3 -> Vector (Vector Int) -> Vector (Vector Int) -> [Geometry] trifans :: Vector V3 -> Vector V3 -> Vector (Vector Int) -> Vector (Vector Int) -> [Geometry] tristrips :: Vector V3 -> Vector V3 -> Vector (Vector Int) -> Vector (Vector Int) -> [Geometry] ge :: Geometry -> SceneNode animatedCubes :: (Scene, [Animation]) animatedCubes2 :: [(Scene, [Animation])] 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 obj_name :: SceneNode -> ID -- | a helper function for xyz_grid tran :: SceneNode -> V3 -> 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] enum_obj :: Show a => SceneNode -> [a] -> [[Char]] x_line :: (Eq t1, Num t1) => t1 -> (t2 -> t2) -> t2 -> [t2] positions :: [(Float, Float, Float)] en :: [(Float, Float, Float)] base_objects :: [SceneNode] rename :: SceneNode -> String -> SceneNode getName :: SceneNode -> ID get_name :: Geometry -> ID animatedStream :: (Scene, [Animation]) streamScene :: [SceneNode] -> Scene streamAnimation :: [(Float, Float, Float)] -> [SceneNode] -> [Animation] tr_channel :: Int -> [Char] -> [Char] -> Int -> [Float] -> AccessorType -> ([Char], AnimChannel) module Graphics.Formats.Collada.Transformations translate :: V3 -> Geometry -> Geometry -- | extrude a 2d polygon to 3d, the same points are added again with -- extrusion direction v extrude :: V3 -> Geometry -> Geometry extr_outline :: Vector Int -> Vector (Vector Int) normalsFrom :: V3 -> Vector V3 -> V3 -- | return a list containing lists of every element with its neighbour -- i.e. [e1,e2,e3] -> [ [e1,e2], [e2,e3], [e3, e1] ] cycleNeighbours :: Vector a -> Vector (Vector a) cycleN :: a -> Vector a -> Vector (Vector a) atop :: Geometry -> Geometry -> Geometry changeDiffuseColor :: String -> V4 -> Geometry -> Geometry changeAmbientColor :: String -> V4 -> Geometry -> Geometry