diff org/eyes.org @ 58:25142dad240a

created test suite
author Robert McIntyre <rlm@mit.edu>
date Sat, 19 Nov 2011 23:42:21 -0700
parents f080f1e49fba
children 1381a6ebd08b
line wrap: on
line diff
     1.1 --- a/org/eyes.org	Wed Nov 16 02:42:50 2011 -0700
     1.2 +++ b/org/eyes.org	Sat Nov 19 23:42:21 2011 -0700
     1.3 @@ -130,27 +130,26 @@
     1.4    object from different angles and displaying both of those views in
     1.5    JFrames."  
     1.6    []
     1.7 -  (.start
     1.8 -   (let [candy
     1.9 -         (box 1 1 1 :physical? false :color ColorRGBA/Blue)]
    1.10 -     (world (doto (Node.)
    1.11 -              (.attachChild candy))
    1.12 -            {}
    1.13 -            (fn [world]
    1.14 -              (let [cam (.clone (.getCamera world))
    1.15 -                    width (.getWidth cam)
    1.16 -                    height (.getHeight cam)]
    1.17 -                (add-eye world cam (view-image width height))
    1.18 -                (add-eye world
    1.19 -                         (doto (.clone cam)
    1.20 -                           (.setLocation (Vector3f. -10 0 0))
    1.21 -                           (.lookAt Vector3f/ZERO Vector3f/UNIT_Y))
    1.22 -                         (view-image width height))
    1.23 +  (let [candy
    1.24 +        (box 1 1 1 :physical? false :color ColorRGBA/Blue)]
    1.25 +    (world (doto (Node.)
    1.26 +             (.attachChild candy))
    1.27 +           {}
    1.28 +           (fn [world]
    1.29 +             (let [cam (.clone (.getCamera world))
    1.30 +                   width (.getWidth cam)
    1.31 +                   height (.getHeight cam)]
    1.32 +               (add-eye world cam (view-image width height))
    1.33 +               (add-eye world
    1.34 +                        (doto (.clone cam)
    1.35 +                          (.setLocation (Vector3f. -10 0 0))
    1.36 +                          (.lookAt Vector3f/ZERO Vector3f/UNIT_Y))
    1.37 +                        (view-image width height))
    1.38                  ;; This is here to restore the main view
    1.39 -                ;; after the other views have completed processing
    1.40 -                (add-eye world (.getCamera world) no-op)))
    1.41 -            (fn [world tpf]
    1.42 -              (.rotate candy (* tpf 0.2) 0 0))))))
    1.43 +               ;; after the other views have completed processing
    1.44 +               (add-eye world (.getCamera world) no-op)))
    1.45 +           (fn [world tpf]
    1.46 +             (.rotate candy (* tpf 0.2) 0 0)))))
    1.47  #+end_src
    1.48  
    1.49  The example code will create two videos of the same rotating object