collada-output 0.4 → 0.5
raw patch · 2 files changed
+14/−20 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Graphics.Formats.Collada.GenerateCollada: primitives :: String -> String -> [Point] -> [Normal] -> Mesh -> [Element]
Files
collada-output.cabal view
@@ -1,5 +1,5 @@ Name: collada-output -Version: 0.4 +Version: 0.5 Synopsis: Generate animated 3d objects in COLLADA Description: Generate a COLLADA file with textures, materials, animations, ... It can be used to visualize algorithms that produce a stream of positions, see <http://www.youtube.com/watch?v=ZpJzG28Yv8Y> category: graphics
src/Graphics/Formats/Collada/GenerateCollada.hs view
@@ -294,7 +294,9 @@ attr "name" str $ unode "geometry" $ unode "mesh" $ - concat $ map (primitives (show s) str parr narr) pris + (sources (show s) str parr narr) ++ + (lib_vertices (show s) str parr narr) ++ + ( concat $ map (primitives (show s) str parr narr) pris ) tex_ar :: [[Int]] -> [[Int]] -> [[Int]] -> String -> String -> String -> (SID,Profile) -> [Element] tex_ar ps ns ts prname s str (symbol,profile) = tex_array s str (symbol,profile) @@ -325,7 +327,7 @@ -- bSubCurve useTex (dx,dy) bs type Point = (Float,Float,Float) type Normal = (Float,Float,Float) - +{- primitives :: String -> String -> [Point] -> [Normal] -> Mesh -> [Element] primitives s str parr narr (S (LinePrimitive ps ns ts mats)) -- Spline = (sources s str (toTriple spl) na) @@ -338,30 +340,22 @@ difference_y = (maximum y) - (minimum y) x = map sel3_1 parr y = map sel3_2 parr - +-} primitives s str parr narr (LP (LinePrimitive ps ns ts mats)) - = (sources s str parr narr) - ++ (concat (map (tex_ar ps ns ts "lines" s str) mats)) - ++ (lib_vertices s str parr narr) - ++ (concat (map (material ps ns ts "lines" s str) mats)) + = (concat (map (tex_ar ps ns ts "lines" s str) mats)) ++ + (concat (map (material ps ns ts "lines" s str) mats)) primitives s str parr narr (LS (LinePrimitive ps ns ts mats)) - = (sources s str parr narr) - ++ (concat (map (tex_ar ps ns ts "linestrips" s str) mats)) - ++ (lib_vertices s str parr narr) - ++ (concat (map (material ps ns ts "linestrips" s str) mats)) + = (concat (map (tex_ar ps ns ts "linestrips" s str) mats)) ++ + (concat (map (material ps ns ts "linestrips" s str) mats)) primitives s str parr narr (P (Polygon ps ns phs mats)) - = (sources s str parr narr) - ++ (concat (map (tex_ar ps ns [] "polygon" s str) mats)) - ++ (lib_vertices s str parr narr) - ++ (concat (map (material ps ns [] "polygon" s str) mats)) + = (concat (map (tex_ar ps ns [] "polygon" s str) mats)) ++ + (concat (map (material ps ns [] "polygon" s str) mats)) primitives s str parr narr (PL (LinePrimitive ps ns ts mats)) - = (sources s str parr narr) - ++ (concat (map (tex_ar ps ns ts "polylist" s str) mats)) - ++ (lib_vertices s str parr narr) - ++ (concat (map (material ps ns ts "polylist" s str) mats)) + = (concat (map (tex_ar ps ns ts "polylist" s str) mats)) ++ + (concat (map (material ps ns ts "polylist" s str) mats)) -- TODO: Tr TriangleMesh | Trf TriFan | Trs TriStrip