diff org/body.org @ 304:2dfebf71053c

Merged Winston cover letter
author Dylan Holmes <ocsenave@gmail.com>
date Sat, 18 Feb 2012 02:07:40 -0600
parents 23aadf376e9d
children 7e7f8d6d9ec5
line wrap: on
line diff
     1.1 --- a/org/body.org	Sat Feb 18 02:06:06 2012 -0600
     1.2 +++ b/org/body.org	Sat Feb 18 02:07:40 2012 -0600
     1.3 @@ -80,14 +80,17 @@
     1.4    (.setTimer world (RatchetTimer. 60))
     1.5    world)
     1.6  
     1.7 -(defn test-one []
     1.8 -  (world (hand)
     1.9 -         standard-debug-controls
    1.10 -         (comp
    1.11 -          #(Capture/captureVideo
    1.12 -            % (File. "/home/r/proj/cortex/render/body/1"))
    1.13 -          setup)
    1.14 -         no-op))
    1.15 +(defn test-hand-1
    1.16 +  ([] (test-hand-1 false))
    1.17 +  ([record?]
    1.18 +     (world (hand)
    1.19 +            standard-debug-controls
    1.20 +            (fn [world]
    1.21 +              (if record?
    1.22 +                (Capture/captureVideo
    1.23 +                 world
    1.24 +                 (File. "/home/r/proj/cortex/render/body/1")))
    1.25 +             (setup world)) no-op)))
    1.26  #+end_src
    1.27  
    1.28  
    1.29 @@ -158,18 +161,22 @@
    1.30    (box 10 3 10 :position (Vector3f. 0 -10 0)
    1.31         :color ColorRGBA/Gray :mass 0))
    1.32  
    1.33 -(defn test-two []
    1.34 -  (world (nodify
    1.35 -          [(doto (hand)
    1.36 -             (physical!))
    1.37 -          (floor)])
    1.38 -         (merge standard-debug-controls gravity-control)
    1.39 -         (comp
    1.40 -          #(Capture/captureVideo
    1.41 -            % (File. "/home/r/proj/cortex/render/body/2"))
    1.42 -          #(do (set-gravity % Vector3f/ZERO) %)
    1.43 -          setup)
    1.44 -         no-op))
    1.45 +(defn test-hand-2
    1.46 +  ([] (test-hand-2 false))
    1.47 +  ([record?]
    1.48 +     (world
    1.49 +      (nodify
    1.50 +       [(doto (hand)
    1.51 +          (physical!))
    1.52 +        (floor)])
    1.53 +      (merge standard-debug-controls gravity-control)
    1.54 +      (fn [world]
    1.55 +        (if record?
    1.56 +          (Capture/captureVideo
    1.57 +           world (File. "/home/r/proj/cortex/render/body/2")))
    1.58 +        (set-gravity world Vector3f/ZERO)
    1.59 +        (setup world))
    1.60 +      no-op)))
    1.61  #+end_src
    1.62  
    1.63  #+begin_html
    1.64 @@ -428,20 +435,23 @@
    1.65    {"key-h" (fn [world val]
    1.66               (if val (enable-debug world)))})
    1.67    
    1.68 -(defn test-three []
    1.69 -  (world (nodify
    1.70 -          [(doto (hand)
    1.71 -             (physical!)
    1.72 -             (joints!))
    1.73 -           (floor)])
    1.74 -         (merge standard-debug-controls debug-control
    1.75 -                gravity-control)
    1.76 -         (comp
    1.77 -          #(Capture/captureVideo
    1.78 -            % (File. "/home/r/proj/cortex/render/body/3"))
    1.79 -          #(do (set-gravity % Vector3f/ZERO) %)
    1.80 -          setup)
    1.81 -         no-op))
    1.82 +(defn test-hand-3
    1.83 +  ([] (test-hand-3 false))
    1.84 +  ([record?]
    1.85 +     (world 
    1.86 +      (nodify
    1.87 +       [(doto (hand)
    1.88 +          (physical!)
    1.89 +          (joints!))
    1.90 +        (floor)])
    1.91 +      (merge standard-debug-controls debug-control
    1.92 +             gravity-control)
    1.93 +      (comp
    1.94 +       #(Capture/captureVideo
    1.95 +         % (File. "/home/r/proj/cortex/render/body/3"))
    1.96 +       #(do (set-gravity % Vector3f/ZERO) %)
    1.97 +       setup)
    1.98 +      no-op)))
    1.99  #+end_src
   1.100  
   1.101  =physical!= makes the hand solid, then =joints!= connects each
   1.102 @@ -494,22 +504,25 @@
   1.103   (load-blender-model
   1.104              "Models/test-creature/worm.blend"))
   1.105  
   1.106 -(defn worm-1 []
   1.107 -  (let [timer (RatchetTimer. 60)]
   1.108 -    (world
   1.109 -     (nodify
   1.110 -      [(doto (worm)
   1.111 -         (body!))
   1.112 -       (floor)])
   1.113 -     (merge standard-debug-controls debug-control)
   1.114 -     #(do
   1.115 -        (speed-up %)
   1.116 -        (light-up-everything %)
   1.117 -        (.setTimer % timer)
   1.118 -        (cortex.util/display-dialated-time % timer)
   1.119 -        (Capture/captureVideo
   1.120 -         % (File. "/home/r/proj/cortex/render/body/4")))
   1.121 -     no-op)))
   1.122 +(defn test-worm
   1.123 +  ([] (test-worm false))
   1.124 +  ([record?]
   1.125 +     (let [timer (RatchetTimer. 60)]
   1.126 +       (world
   1.127 +        (nodify
   1.128 +         [(doto (worm)
   1.129 +            (body!))
   1.130 +          (floor)])
   1.131 +        (merge standard-debug-controls debug-control)
   1.132 +        #(do
   1.133 +           (speed-up %)
   1.134 +           (light-up-everything %)
   1.135 +           (.setTimer % timer)
   1.136 +           (cortex.util/display-dialated-time % timer)
   1.137 +           (if record?
   1.138 +             (Capture/captureVideo
   1.139 +              % (File. "/home/r/proj/cortex/render/body/4"))))
   1.140 +        no-op))))
   1.141  #+end_src
   1.142  
   1.143  #+begin_html