diff 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
line wrap: on
line diff
     1.1 --- a/org/test-creature.org	Sat Feb 04 04:23:32 2012 -0700
     1.2 +++ b/org/test-creature.org	Sat Feb 04 05:00:10 2012 -0700
     1.3 @@ -181,7 +181,7 @@
     1.4          creature (blender-creature thing)
     1.5          touch-nerves (touch creature)
     1.6          touch-debug-windows (map (fn [_] (debug-touch-window)) touch-nerves)
     1.7 -        [init-vision-fns vision-data] (vision creature)
     1.8 +        vision-data (vision! creature)
     1.9          vision-debug (map (fn [_] (debug-vision-window)) vision-data)
    1.10          me (sphere 0.5 :color ColorRGBA/Blue :physical? false)
    1.11          hearing-senses (hearing! creature)
    1.12 @@ -194,7 +194,8 @@
    1.13  
    1.14          muscle-fns (enable-muscles creature)
    1.15          ;; dream
    1.16 -
    1.17 +        fix-display (runonce
    1.18 +                     (fn [world] (add-camera! world (.getCamera world) no-op)))
    1.19          ]
    1.20      
    1.21      
    1.22 @@ -230,14 +231,14 @@
    1.23          (fn [world]
    1.24            (light-up-everything world)
    1.25            (enable-debug world)
    1.26 -          (dorun (map #(% world) init-vision-fns))
    1.27 +          ;;(dorun (map #(% world) init-vision-fns))
    1.28            ;;(dorun (map #(% world) init-hearing-fns))
    1.29            
    1.30            (add-camera! world
    1.31                     (add-eye! creature (test-eye))
    1.32                     (comp (view-image) BufferedImage!))
    1.33            
    1.34 -          (add-camera! world (.getCamera world) no-op)
    1.35 +          
    1.36            ;;(set-gravity world (Vector3f. 0 0 0))
    1.37            ;;(com.aurellem.capture.Capture/captureVideo
    1.38            ;; world (file-str "/home/r/proj/ai-videos/hand"))
    1.39 @@ -256,7 +257,7 @@
    1.40                  touch-debug-windows touch-nerves))
    1.41            
    1.42            (dorun
    1.43 -           (map #(%1 (%2))
    1.44 +           (map #(%1 (%2 world))
    1.45                  vision-debug vision-data))
    1.46            (dorun
    1.47             (map #(%1 (%2 world)) hearing-windows hearing-senses))
    1.48 @@ -264,7 +265,7 @@
    1.49            
    1.50            ;;(println-repl (vision-data))
    1.51            (.setLocalTranslation me (.getLocation (.getCamera world)))
    1.52 -          
    1.53 +          (fix-display world)
    1.54            
    1.55            )]
    1.56     ;;(let [timer (atom 0)]