diff org/integration.org @ 199:305439cec54d

added video to sense.org
author Robert McIntyre <rlm@mit.edu>
date Mon, 06 Feb 2012 01:40:22 -0700
parents deac7b708750
children 7351c9c0c471
line wrap: on
line diff
     1.1 --- a/org/integration.org	Sun Feb 05 14:01:47 2012 -0700
     1.2 +++ b/org/integration.org	Mon Feb 06 01:40:22 2012 -0700
     1.3 @@ -304,36 +304,6 @@
     1.4           (.applyTorque control
     1.5                         (.mult (.getPhysicsRotation control)
     1.6                                (Vector3f. 1 0 0))))))))
     1.7 -
     1.8 -(defn follow-test
     1.9 -  "Show a camera that stays in the same relative position to a blue cube."
    1.10 -  []
    1.11 -  (let [camera-pos (Vector3f. 0 30 0)
    1.12 -        rock (box 1 1 1 :color ColorRGBA/Blue
    1.13 -                     :position (Vector3f. 0 10 0)
    1.14 -                     :mass 30
    1.15 -                     )
    1.16 -        rot (.getWorldRotation rock)
    1.17 -        
    1.18 -        table (box 3 1 10 :color ColorRGBA/Gray :mass 0
    1.19 -                   :position (Vector3f. 0 -3 0))]
    1.20 -
    1.21 -    (world
    1.22 -     (nodify [rock table])
    1.23 -             standard-debug-controls
    1.24 -             (fn [world]
    1.25 -               (let 
    1.26 -                   [cam (doto (.clone (.getCamera world))
    1.27 -                          (.setLocation camera-pos)
    1.28 -                          (.lookAt Vector3f/ZERO
    1.29 -                                   Vector3f/UNIT_X))]
    1.30 -                 (bind-sense rock cam)
    1.31 -                 
    1.32 -                 (.setTimer world (RatchetTimer. 60))
    1.33 -                 (add-camera! world cam (comp (view-image) BufferedImage!))
    1.34 -                 (add-camera! world (.getCamera world) no-op))
    1.35 -               )
    1.36 -             (fn [_ _] (println-repl rot)))))
    1.37  #+end_src
    1.38    
    1.39