   [geom1 geom2]
   (let [out-mesh (Mesh.)]
     (GeometryBatchFactory/mergeGeometries [geom1 geom2] out-mesh)
-    (doto (Geometry. "structured" out-mesh)
-      (.setMaterial (default-material)))))
-
-
-(defn merge-all
-
-  [geometries]
-  (let [out-mesh (Mesh.)]
-    (GeometryBatchFactory/mergeGeometries geometries out-mesh)
     (doto (Geometry. "structured" out-mesh)
       (.setMaterial (default-material)))))
 

  [filename]
  (let [imported-model ^Geometry (.loadModel asset-manager filename)]
    (doto imported-model
      (.setMaterial (default-material)))))


(defn mknode
  "It takes a list or an undefined number of geometries and put them into
   a single node. Materials are preserverd."
  [& objs]
  (let [flattened-args (flatten objs)
	new-node (Node. "node")]
    (doseq [geom flattened-args] (.attachChild new-node geom))
    new-node))


