Mercurial > cortex
comparison org/proprioception.org @ 174:136349ac6972
organized imports for proprioception
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 04 Feb 2012 06:29:20 -0700 |
parents | 1943b3f581c2 |
children | 0b9ae09eaec3 |
comparison
equal
deleted
inserted
replaced
173:1943b3f581c2 | 174:136349ac6972 |
---|---|
12 "Simulate the sense of proprioception (ability to detect the | 12 "Simulate the sense of proprioception (ability to detect the |
13 relative positions of body parts with repsect to other body parts) | 13 relative positions of body parts with repsect to other body parts) |
14 in jMonkeyEngine3. Reads specially prepared blender files to | 14 in jMonkeyEngine3. Reads specially prepared blender files to |
15 automatically generate proprioceptive senses." | 15 automatically generate proprioceptive senses." |
16 (:use (cortex world util sense body)) | 16 (:use (cortex world util sense body)) |
17 (:use clojure.contrib.def)) | 17 (:use clojure.contrib.def) |
18 | 18 (:import com.jme3.scene.Node) |
19 | 19 (:import (com.jme3.math Vector3f Quaternion))) |
20 (cortex.import/mega-import-jme3) | |
21 | 20 |
22 (defvar | 21 (defvar |
23 ^{:arglists '([creature])} | 22 ^{:arglists '([creature])} |
24 joints | 23 joints |
25 (sense-nodes "joints") | 24 (sense-nodes "joints") |
88 ;; extract the body's joints | 87 ;; extract the body's joints |
89 (let [senses (map (partial proprioception-fn creature) | 88 (let [senses (map (partial proprioception-fn creature) |
90 (joints creature))] | 89 (joints creature))] |
91 (fn [] | 90 (fn [] |
92 (map #(%) senses)))) | 91 (map #(%) senses)))) |
93 | |
94 | |
95 | |
96 | |
97 | |
98 #+end_src | 92 #+end_src |
99 | |
100 | |
101 | |
102 | |
103 | |
104 | |
105 | |
106 | 93 |
107 * COMMENT generate source | 94 * COMMENT generate source |
108 #+begin_src clojure :tangle ../src/cortex/proprioception.clj | 95 #+begin_src clojure :tangle ../src/cortex/proprioception.clj |
109 <<proprioception>> | 96 <<proprioception>> |
110 #+end_src | 97 #+end_src |