Mercurial > cortex
comparison org/util.org @ 320:52de8a36edde
removed last vestiges of clojure.contrib
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 01 Mar 2012 06:24:17 -0700 |
parents | bb3f8a4af87f |
children | 5dcd44576cbc |
comparison
equal
deleted
inserted
replaced
319:b84701e4f6ae | 320:52de8a36edde |
---|---|
102 (:import javax.swing.JFrame) | 102 (:import javax.swing.JFrame) |
103 (:import javax.swing.SwingUtilities) | 103 (:import javax.swing.SwingUtilities) |
104 (:import com.jme3.scene.plugins.blender.BlenderModelLoader) | 104 (:import com.jme3.scene.plugins.blender.BlenderModelLoader) |
105 (:import (java.util.logging Level Logger))) | 105 (:import (java.util.logging Level Logger))) |
106 | 106 |
107 (defvar println-repl | 107 (def println-repl |
108 (bound-fn [& args] (apply println args)) | |
109 "println called from the LWJGL thread will not go to the REPL, but | 108 "println called from the LWJGL thread will not go to the REPL, but |
110 instead to whatever terminal started the JVM process. This function | 109 instead to whatever terminal started the JVM process. This function |
111 will always output to the REPL") | 110 will always output to the REPL" |
111 (bound-fn [& args] (apply println args))) | |
112 | 112 |
113 (defn position-camera | 113 (defn position-camera |
114 "Change the position of the in-world camera." | 114 "Change the position of the in-world camera." |
115 [world #^Vector3f position #^Quaternion rotation] | 115 [world #^Vector3f position #^Quaternion rotation] |
116 (doto (.getCamera world) | 116 (doto (.getCamera world) |
248 shape | 248 shape |
249 physical? | 249 physical? |
250 GImpact? | 250 GImpact? |
251 ]) | 251 ]) |
252 | 252 |
253 (defvar base-shape | 253 (def base-shape |
254 (shape-description. | 254 "Basic settings for shapes." |
255 "default-shape" | 255 (shape-description. |
256 false | 256 "default-shape" |
257 ;;ColorRGBA/Blue | 257 false |
258 1.0 ;; mass | 258 ;;ColorRGBA/Blue |
259 1.0 ;; friction | 259 1.0 ;; mass |
260 ;; texture | 260 1.0 ;; friction |
261 "Textures/Terrain/BrickWall/BrickWall.jpg" | 261 ;; texture |
262 ;; material | 262 "Textures/Terrain/BrickWall/BrickWall.jpg" |
263 "Common/MatDefs/Misc/Unshaded.j3md" | 263 ;; material |
264 Vector3f/ZERO | 264 "Common/MatDefs/Misc/Unshaded.j3md" |
265 Quaternion/IDENTITY | 265 Vector3f/ZERO |
266 (Box. Vector3f/ZERO 0.5 0.5 0.5) | 266 Quaternion/IDENTITY |
267 true | 267 (Box. Vector3f/ZERO 0.5 0.5 0.5) |
268 false) | 268 true |
269 "Basic settings for shapes.") | 269 false)) |
270 | 270 |
271 (defn make-shape | 271 (defn make-shape |
272 [#^shape-description d] | 272 [#^shape-description d] |
273 (let [asset-manager (asset-manager) | 273 (let [asset-manager (asset-manager) |
274 mat (Material. asset-manager (:material d)) | 274 mat (Material. asset-manager (:material d)) |