diff org/movement.org @ 340:4f5a5d5f1613

added time dialation display for test suite.
author Robert McIntyre <rlm@mit.edu>
date Sat, 21 Jul 2012 11:18:47 -0500
parents 702b5c78c2de
children 2e7d786241d3
line wrap: on
line diff
     1.1 --- a/org/movement.org	Sat Jul 21 10:03:02 2012 -0500
     1.2 +++ b/org/movement.org	Sat Jul 21 11:18:47 2012 -0500
     1.3 @@ -185,6 +185,8 @@
     1.4  
     1.5  #+name: test-movement
     1.6  #+begin_src clojure
     1.7 +(in-ns 'cortex.test.movement)
     1.8 +
     1.9  (defn test-worm-movement
    1.10    "Testing movement:
    1.11     You should see the worm suspended in mid air and a display on the
    1.12 @@ -217,13 +219,16 @@
    1.13                    (if value
    1.14                      (swap! muscle-exertion (fn [v] (- v 20)))))})
    1.15          (fn [world]
    1.16 +
    1.17 +          (let [timer (RatchetTimer. 60)]
    1.18 +            (.setTimer world timer)
    1.19 +            (display-dilated-time world timer))
    1.20            (if record?
    1.21              (Capture/captureVideo
    1.22               world
    1.23               (File. "/home/r/proj/cortex/render/worm-muscles/main-view")))
    1.24            (light-up-everything world)
    1.25            (enable-debug world)
    1.26 -          (.setTimer world (RatchetTimer. 60))
    1.27            (set-gravity world (Vector3f. 0 0 0))
    1.28            (.setLocation (.getCamera world)
    1.29                          (Vector3f. -4.912815, 2.004171, 0.15710819))
    1.30 @@ -237,6 +242,9 @@
    1.31               (File. "/home/r/proj/cortex/render/worm-muscles/muscles"))))))))
    1.32  #+end_src
    1.33  
    1.34 +#+results: test-movement
    1.35 +: #'cortex.test.movement/test-worm-movement
    1.36 +
    1.37  * Video Demonstration 
    1.38  
    1.39  #+begin_html