Mercurial > cortex
comparison org/test-creature.org @ 170:1a00b4918529
removed vision-init-fns requirement; changed names
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 04 Feb 2012 05:00:10 -0700 |
parents | 94b79c191fc7 |
children | 1943b3f581c2 |
comparison
equal
deleted
inserted
replaced
169:94b79c191fc7 | 170:1a00b4918529 |
---|---|
179 z-axis | 179 z-axis |
180 (box 0.01 0.01 1 :physical? false :color ColorRGBA/Blue) | 180 (box 0.01 0.01 1 :physical? false :color ColorRGBA/Blue) |
181 creature (blender-creature thing) | 181 creature (blender-creature thing) |
182 touch-nerves (touch creature) | 182 touch-nerves (touch creature) |
183 touch-debug-windows (map (fn [_] (debug-touch-window)) touch-nerves) | 183 touch-debug-windows (map (fn [_] (debug-touch-window)) touch-nerves) |
184 [init-vision-fns vision-data] (vision creature) | 184 vision-data (vision! creature) |
185 vision-debug (map (fn [_] (debug-vision-window)) vision-data) | 185 vision-debug (map (fn [_] (debug-vision-window)) vision-data) |
186 me (sphere 0.5 :color ColorRGBA/Blue :physical? false) | 186 me (sphere 0.5 :color ColorRGBA/Blue :physical? false) |
187 hearing-senses (hearing! creature) | 187 hearing-senses (hearing! creature) |
188 hearing-windows (map (fn [_] (debug-hearing-window 50)) | 188 hearing-windows (map (fn [_] (debug-hearing-window 50)) |
189 hearing-senses) | 189 hearing-senses) |
192 prop (proprioception creature) | 192 prop (proprioception creature) |
193 prop-debug (proprioception-debug-window) | 193 prop-debug (proprioception-debug-window) |
194 | 194 |
195 muscle-fns (enable-muscles creature) | 195 muscle-fns (enable-muscles creature) |
196 ;; dream | 196 ;; dream |
197 | 197 fix-display (runonce |
198 (fn [world] (add-camera! world (.getCamera world) no-op))) | |
198 ] | 199 ] |
199 | 200 |
200 | 201 |
201 (apply | 202 (apply |
202 world | 203 world |
228 | 229 |
229 }) | 230 }) |
230 (fn [world] | 231 (fn [world] |
231 (light-up-everything world) | 232 (light-up-everything world) |
232 (enable-debug world) | 233 (enable-debug world) |
233 (dorun (map #(% world) init-vision-fns)) | 234 ;;(dorun (map #(% world) init-vision-fns)) |
234 ;;(dorun (map #(% world) init-hearing-fns)) | 235 ;;(dorun (map #(% world) init-hearing-fns)) |
235 | 236 |
236 (add-camera! world | 237 (add-camera! world |
237 (add-eye! creature (test-eye)) | 238 (add-eye! creature (test-eye)) |
238 (comp (view-image) BufferedImage!)) | 239 (comp (view-image) BufferedImage!)) |
239 | 240 |
240 (add-camera! world (.getCamera world) no-op) | 241 |
241 ;;(set-gravity world (Vector3f. 0 0 0)) | 242 ;;(set-gravity world (Vector3f. 0 0 0)) |
242 ;;(com.aurellem.capture.Capture/captureVideo | 243 ;;(com.aurellem.capture.Capture/captureVideo |
243 ;; world (file-str "/home/r/proj/ai-videos/hand")) | 244 ;; world (file-str "/home/r/proj/ai-videos/hand")) |
244 ;;(.setTimer world (RatchetTimer. 60)) | 245 ;;(.setTimer world (RatchetTimer. 60)) |
245 (speed-up world) | 246 (speed-up world) |
254 (dorun | 255 (dorun |
255 (map #(%1 (%2 (.getRootNode world))) | 256 (map #(%1 (%2 (.getRootNode world))) |
256 touch-debug-windows touch-nerves)) | 257 touch-debug-windows touch-nerves)) |
257 | 258 |
258 (dorun | 259 (dorun |
259 (map #(%1 (%2)) | 260 (map #(%1 (%2 world)) |
260 vision-debug vision-data)) | 261 vision-debug vision-data)) |
261 (dorun | 262 (dorun |
262 (map #(%1 (%2 world)) hearing-windows hearing-senses)) | 263 (map #(%1 (%2 world)) hearing-windows hearing-senses)) |
263 | 264 |
264 | 265 |
265 ;;(println-repl (vision-data)) | 266 ;;(println-repl (vision-data)) |
266 (.setLocalTranslation me (.getLocation (.getCamera world))) | 267 (.setLocalTranslation me (.getLocation (.getCamera world))) |
267 | 268 (fix-display world) |
268 | 269 |
269 )] | 270 )] |
270 ;;(let [timer (atom 0)] | 271 ;;(let [timer (atom 0)] |
271 ;; (fn [_ _] | 272 ;; (fn [_ _] |
272 ;; (swap! timer inc) | 273 ;; (swap! timer inc) |