# HG changeset patch # User Robert McIntyre # Date 1328273556 25200 # Node ID c901b17a1f52a2bb202b2f8e025443bb117d8252 # Parent aaacf087504c0561985d3b70ea16a5dcb02e10d2 remove obsolete integration namespace diff -r aaacf087504c -r c901b17a1f52 org/integration.org --- a/org/integration.org Fri Feb 03 05:52:18 2012 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ - - -* TODO goals for today - - [X] create falling cube in blender - - [ ] record falling cube animation in blender - - [ ] import falling cube in jMonkeyEngine - - [ ] record jmonkeyEngine cube animation - - -#+name: integration -#+begin_src clojure -(ns cortex.integration - "Enable loading creatures with senses from blender." - {:author "Robert McIntyre"}) - -;; TODO remove this! -(require 'cortex.import) -(cortex.import/mega-import-jme3) -(use '(cortex world util)) - -(rlm.rlm-commands/help) - - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; this could be a good way to give objects special properties like -;; being eyes and the like -(defn load-blender-model - "Load a .blend file using an asset folder relative path." - [^String model] - (.loadModel - (doto (asset-manager) - (.registerLoader BlenderModelLoader (into-array String ["blend"]))) - model)) - -(defn scene [] - (load-blender-model "Models/property/test.blend")) - -(defn test-GET! [] - (.getUserData - (.getChild - (scene) 0) - "properties")) - -(defn make-eye [] - (println "hi")) - -(defn test-eval-prop [] - (eval (read-string (.findValue (test-GET!) "form")))) - -;; the properties are saved along with the blender file. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - - -;; Sensors are thunk-functions that return sensory data. -;; Effectors take data and cause changes in the results of the sensor -;; functions. - -(defrecord Creature [sensors effectors]) - - - - - - - - - -#+end_src - - - -#+begin_src clojure :tangle ../src/cortex/integration.clj -<> -#+end_src - - -