Mercurial > cortex
diff org/eyes.org @ 35:5eb5c6f0590b
added reference to capture-video
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 03 Nov 2011 08:38:41 -0700 |
parents | 183744c179e6 |
children | 91090f8a4414 |
line wrap: on
line diff
1.1 --- a/org/eyes.org Thu Nov 03 08:28:26 2011 -0700 1.2 +++ b/org/eyes.org Thu Nov 03 08:38:41 2011 -0700 1.3 @@ -111,9 +111,7 @@ 1.4 (paint 1.5 [graphics] 1.6 (proxy-super paintComponent graphics) 1.7 - (.drawImage graphics @image 0 0 nil) 1.8 - ))] 1.9 - 1.10 + (.drawImage graphics @image 0 0 nil)))] 1.11 (SwingUtilities/invokeLater 1.12 (fn [] 1.13 (.setPreferredSize panel (Dimension. width height)) 1.14 @@ -141,17 +139,15 @@ 1.15 (let [cam (.clone (.getCamera world)) 1.16 width (.getWidth cam) 1.17 height (.getHeight cam)] 1.18 + (add-eye world cam (view-image width height)) 1.19 (add-eye world 1.20 (doto (.clone cam) 1.21 (.setLocation (Vector3f. -10 0 0)) 1.22 (.lookAt Vector3f/ZERO Vector3f/UNIT_Y)) 1.23 (view-image width height)) 1.24 - (add-eye world cam 1.25 - (view-image width height)) 1.26 - ;; this is here to restore the main view 1.27 + ;; This is here to restore the main view 1.28 ;; after the other views have completed processing 1.29 - (add-eye world (.getCamera world) no-op) 1.30 - )) 1.31 + (add-eye world (.getCamera world) no-op))) 1.32 (fn [world tpf] 1.33 (.rotate candy (* tpf 0.2) 0 0)))))) 1.34 #+end_src 1.35 @@ -161,6 +157,9 @@ 1.36 simulation or for simulating multiple creatures, each with their own 1.37 sense of vision. 1.38 1.39 +- As a neat bonus, this idea behind simulated vision also enables one 1.40 + to [[../../cortex/html/capture-video.html][capture live video feeds from jMonkeyEngine]]. 1.41 + 1.42 1.43 * COMMENT code generation 1.44 #+begin_src clojure :tangle ../src/cortex/vision.clj