comparison org/touch.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 698d48b91cd5
children 5205535237fb 42ddfe406c0a
comparison
equal deleted inserted replaced
339:0efa36180e8a 340:4f5a5d5f1613
550 :color ColorRGBA/Gray :mass 0)]) 550 :color ColorRGBA/Gray :mass 0)])
551 551
552 standard-debug-controls 552 standard-debug-controls
553 553
554 (fn [world] 554 (fn [world]
555 (let [timer (IsoTimer. 60)]
556 (.setTimer world timer)
557 (display-dilated-time world timer))
555 (if record? 558 (if record?
556 (Capture/captureVideo 559 (Capture/captureVideo
557 world 560 world
558 (File. "/home/r/proj/cortex/render/touch-cube/main-view/"))) 561 (File. "/home/r/proj/cortex/render/touch-cube/main-view/")))
559 (speed-up world) 562 (speed-up world)
563 (touch-display 566 (touch-display
564 (map #(% (.getRootNode world)) touch) 567 (map #(% (.getRootNode world)) touch)
565 (if record? 568 (if record?
566 (File. "/home/r/proj/cortex/render/touch-cube/touch/")))))))) 569 (File. "/home/r/proj/cortex/render/touch-cube/touch/"))))))))
567 #+end_src 570 #+end_src
571
572 #+results: test-touch-1
573 : #'cortex.test.touch/test-basic-touch
568 574
569 ** Basic Touch Demonstration 575 ** Basic Touch Demonstration
570 576
571 #+begin_html 577 #+begin_html
572 <div class="figure"> 578 <div class="figure">
654 (world 660 (world
655 (nodify [the-worm (floor)]) 661 (nodify [the-worm (floor)])
656 standard-debug-controls 662 standard-debug-controls
657 663
658 (fn [world] 664 (fn [world]
665 (let [timer (IsoTimer. 60)]
666 (.setTimer world timer)
667 (display-dilated-time world timer))
659 (if record? 668 (if record?
660 (Capture/captureVideo 669 (Capture/captureVideo
661 world 670 world
662 (File. "/home/r/proj/cortex/render/worm-touch/main-view/"))) 671 (File. "/home/r/proj/cortex/render/worm-touch/main-view/")))
663 (speed-up world) 672 (speed-up world)
667 (touch-display 676 (touch-display
668 (map #(% (.getRootNode world)) touch) 677 (map #(% (.getRootNode world)) touch)
669 (if record? 678 (if record?
670 (File. "/home/r/proj/cortex/render/worm-touch/touch/")))))))) 679 (File. "/home/r/proj/cortex/render/worm-touch/touch/"))))))))
671 #+end_src 680 #+end_src
681
682 #+results: test-touch-2
683 : #'cortex.test.touch/test-worm-touch
672 684
673 ** Worm Touch Demonstration 685 ** Worm Touch Demonstration
674 #+begin_html 686 #+begin_html
675 <div class="figure"> 687 <div class="figure">
676 <center> 688 <center>
745 #+name: test-touch-header 757 #+name: test-touch-header
746 #+begin_src clojure 758 #+begin_src clojure
747 (ns cortex.test.touch 759 (ns cortex.test.touch
748 (:use (cortex world util sense body touch)) 760 (:use (cortex world util sense body touch))
749 (:use cortex.test.body) 761 (:use cortex.test.body)
750 (:import com.aurellem.capture.Capture) 762 (:import (com.aurellem.capture Capture IsoTimer))
751 (:import java.io.File) 763 (:import java.io.File)
752 (:import (com.jme3.math Vector3f ColorRGBA))) 764 (:import (com.jme3.math Vector3f ColorRGBA)))
753 #+end_src 765 #+end_src
766
767 #+results: test-touch-header
768 : com.jme3.math.ColorRGBA
754 769
755 * Source Listing 770 * Source Listing
756 - [[../src/cortex/touch.clj][cortex.touch]] 771 - [[../src/cortex/touch.clj][cortex.touch]]
757 - [[../src/cortex/test/touch.clj][cortex.test.touch]] 772 - [[../src/cortex/test/touch.clj][cortex.test.touch]]
758 - [[../src/cortex/video/magick4.clj][cortex.video.magick4]] 773 - [[../src/cortex/video/magick4.clj][cortex.video.magick4]]