# HG changeset patch # User Robert McIntyre # Date 1320334721 25200 # Node ID 5eb5c6f0590b3cbd78887c9adde9a9e081c2ecc8 # Parent 183744c179e6f8c375587397616420b00d26a1f2 added reference to capture-video diff -r 183744c179e6 -r 5eb5c6f0590b org/eyes.org --- a/org/eyes.org Thu Nov 03 08:28:26 2011 -0700 +++ b/org/eyes.org Thu Nov 03 08:38:41 2011 -0700 @@ -111,9 +111,7 @@ (paint [graphics] (proxy-super paintComponent graphics) - (.drawImage graphics @image 0 0 nil) - ))] - + (.drawImage graphics @image 0 0 nil)))] (SwingUtilities/invokeLater (fn [] (.setPreferredSize panel (Dimension. width height)) @@ -141,17 +139,15 @@ (let [cam (.clone (.getCamera world)) width (.getWidth cam) height (.getHeight cam)] + (add-eye world cam (view-image width height)) (add-eye world (doto (.clone cam) (.setLocation (Vector3f. -10 0 0)) (.lookAt Vector3f/ZERO Vector3f/UNIT_Y)) (view-image width height)) - (add-eye world cam - (view-image width height)) - ;; this is here to restore the main view + ;; This is here to restore the main view ;; after the other views have completed processing - (add-eye world (.getCamera world) no-op) - )) + (add-eye world (.getCamera world) no-op))) (fn [world tpf] (.rotate candy (* tpf 0.2) 0 0)))))) #+end_src @@ -161,6 +157,9 @@ simulation or for simulating multiple creatures, each with their own sense of vision. +- As a neat bonus, this idea behind simulated vision also enables one + to [[../../cortex/html/capture-video.html][capture live video feeds from jMonkeyEngine]]. + * COMMENT code generation #+begin_src clojure :tangle ../src/cortex/vision.clj