comparison org/skin.org @ 19:5a371057078f

removed old cruft
author Robert McIntyre <rlm@mit.edu>
date Sun, 23 Oct 2011 12:09:29 -0700
parents 221052dac374
children 67d508a1e34d
comparison
equal deleted inserted replaced
18:221052dac374 19:5a371057078f
144 (doall 144 (doall
145 (for [ray normals] 145 (for [ray normals]
146 (do 146 (do
147 (let [results (CollisionResults.)] 147 (let [results (CollisionResults.)]
148 (.collideWith node ray results) 148 (.collideWith node ray results)
149 (let [answer (set (filter #(not (= geom %)) 149 (let [touch-objects (set (filter #(not (= geom %))
150 (map #(.getGeometry %) results))) 150 (map #(.getGeometry %) results)))]
151 ;;color (contact-color answer) 151 ;;(dorun (map #(println-repl (.getName %)) touch-objects))
152 ] 152 (count touch-objects))))))))
153
154 ;;(dorun (map #(println-repl (.getName %)) answer))
155 (count answer) )))))))
156 153
157 (defn enable-debug [world] 154 (defn enable-debug [world]
158 (.enableDebug 155 (.enableDebug
159 (.getPhysicsSpace 156 (.getPhysicsSpace
160 (.getState 157 (.getState
219 (let [b 216 (let [b
220 ;;(transparent-box) 217 ;;(transparent-box)
221 (transparent-sphere) 218 (transparent-sphere)
222 ;;(sphere) 219 ;;(sphere)
223 f (transparent-floor) 220 f (transparent-floor)
224 ;;controls
225 ;;(make-touch-sphere b)
226 ;;(make-touch b)
227 debug-node (Node.) 221 debug-node (Node.)
228 node (doto (Node.) (.attachChild b) (.attachChild f)) 222 node (doto (Node.) (.attachChild b) (.attachChild f))
229 root-node (doto (Node.) (.attachChild node) 223 root-node (doto (Node.) (.attachChild node)
230 (.attachChild debug-node)) 224 (.attachChild debug-node))
231 ] 225 ]
242 ;;(enable-debug world) 236 ;;(enable-debug world)
243 ;; (set-accuracy world (/ 1 60)) 237 ;; (set-accuracy world (/ 1 60))
244 ) 238 )
245 239
246 (fn [& _] 240 (fn [& _]
247 (let [sensitivity 5 241 (let [sensitivity 0.2
248 touch-data (touch-percieve sensitivity b node)] 242 touch-data (touch-percieve sensitivity b node)]
249 ;;(println-repl touch-data)
250 (manage-ray-debug-node debug-node b touch-data sensitivity) 243 (manage-ray-debug-node debug-node b touch-data sensitivity)
251 ) 244 )
252 (Thread/sleep 10) 245 (Thread/sleep 10)
253 ;;(touch-print controls)
254 ;;(color-touch controls)
255 )))) 246 ))))
256 247
257 #+end_src 248 #+end_src
258 249
259 #+results: skin-main 250 #+results: skin-main