Mercurial > cortex
view org/test.org @ 65:4b5f00110d8c
removed pokemon.lpsolve dependency
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 07 Dec 2011 10:29:35 -0600 |
parents | 25142dad240a |
children | 1381a6ebd08b |
line wrap: on
line source
1 #+title: The BODY!!!2 #+author: Robert McIntyre3 #+email: rlm@mit.edu4 #+description: Simulating a body (movement, touch, propioception) in jMonkeyEngine3.5 #+SETUPFILE: ../../aurellem/org/setup.org6 #+INCLUDE: ../../aurellem/org/level-0.org8 * Body10 #+srcname: body-main11 #+begin_src clojure12 (ns test.all13 (:require [test touch vision])14 (:import com.jme3.app.state.AppState15 com.jme3.system.AppSettings))17 (defn run-world18 "run the simulation and wait until it closes proprely"19 [world]20 (let [lock (promise)]21 (.enqueue22 world23 (partial24 (fn [world]25 (.attach26 (.getStateManager world)27 (proxy [AppState] []28 (cleanup [] (deliver lock nil))29 (initialize [_ _])30 (isEnabled [] true)31 (setEnabled [_] )32 (stateAttached [_])33 (stateDetached [_])34 (update [_])35 (render [_])36 (isInitialized [] true)37 (postRender []))))38 world))39 (.start world)40 (deref lock)))42 (defn test-all []43 (println44 "***************\n"45 "Testing touch:\n"46 "you should see a ball which responds to the table\n"47 "and whatever balls hit it.\n")48 (run-world (test.touch/test-skin))49 (println50 "***************\n"51 "Testing vision:\n"52 "You should see a rotating cube, and two windows,\n"53 "each displaying a different view of the cube.\n")54 (run-world (test.vision/test-two-eyes))55 (println56 "***************\n"57 "Testing hearing:\n"58 "You should see a blue sphere flying around several\n"59 "cubes. As the sphere approaches each cube, it turns\n"60 "green.\n")61 (run-world62 (doto (com.aurellem.capture.examples.Advanced.)63 (.setSettings64 (doto (AppSettings. true)65 (.setAudioRenderer "Send")))66 (.setShowSettings false)67 (.setPauseOnLostFocus false))))68 #+end_src73 * COMMENT generate Source.74 #+begin_src clojure :tangle ../src/test/all.clj75 <<body-main>>76 #+end_src