Mercurial > cortex
comparison org/skin.org @ 40:bc93abad23ee
moved usefull functions to util
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 03 Nov 2011 10:10:55 -0700 |
parents | 2ce7400825c2 |
children | cce471a4108a |
comparison
equal
deleted
inserted
replaced
39:2ce7400825c2 | 40:bc93abad23ee |
---|---|
110 (ns test.touch | 110 (ns test.touch |
111 (:use (cortex world util touch))) | 111 (:use (cortex world util touch))) |
112 | 112 |
113 (cortex.import/mega-import-jme3) | 113 (cortex.import/mega-import-jme3) |
114 | 114 |
115 (import java.util.logging.Level) | |
116 (import java.util.logging.Logger) | |
117 (use 'hello.brick-wall) | 115 (use 'hello.brick-wall) |
118 | 116 |
119 | 117 |
120 (defn ray-origin-debug | 118 (defn ray-origin-debug |
121 [ray color] | 119 [ray color] |
180 (init-node debug-node rays)) | 178 (init-node debug-node rays)) |
181 (dorun | 179 (dorun |
182 (for [n (range (count touch-data))] | 180 (for [n (range (count touch-data))] |
183 (update-ray-debug | 181 (update-ray-debug |
184 (.getChild debug-node n) (nth rays n) (nth touch-data n)))))) | 182 (.getChild debug-node n) (nth rays n) (nth touch-data n)))))) |
185 | |
186 | |
187 | |
188 (defn no-logging [] | |
189 (.setLevel (Logger/getLogger "com.jme3") Level/OFF)) | |
190 | |
191 (defn set-accuracy [world new-accuracy] | |
192 (let [physics-manager (.getState (.getStateManager world) BulletAppState)] | |
193 (.setAccuracy (.getPhysicsSpace physics-manager) (float new-accuracy)))) | |
194 | 183 |
195 (defn transparent-sphere [] | 184 (defn transparent-sphere [] |
196 (doto | 185 (doto |
197 (make-shape | 186 (make-shape |
198 (merge base-shape | 187 (merge base-shape |