changeset 317:bb3f8a4af87f

removed references to defvar from clojure.contrib.def since the def from 1.4 now allows for docstrings
author Robert McIntyre <rlm@mit.edu>
date Tue, 28 Feb 2012 14:04:21 -0600
parents 2c7fbcbd5ebb
children 2ffda8e9b2a5
files org/body.org org/hearing.org org/movement.org org/proprioception.org org/test.org org/touch.org org/util.org org/vision.org org/world.org
diffstat 9 files changed, 33 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/org/body.org	Tue Feb 28 13:44:46 2012 -0600
     1.2 +++ b/org/body.org	Tue Feb 28 14:04:21 2012 -0600
     1.3 @@ -233,11 +233,11 @@
     1.4  
     1.5  #+name: joints-2 
     1.6  #+begin_src clojure
     1.7 -(defvar 
     1.8 -  ^{:arglists '([creature])}
     1.9 +(def
    1.10 +  ^{:doc "Return the children of the creature's \"joints\" node."
    1.11 +    :arglists '([creature])}
    1.12    joints
    1.13 -  (sense-nodes "joints")
    1.14 -  "Return the children of the creature's \"joints\" node.")
    1.15 +  (sense-nodes "joints"))
    1.16  #+end_src
    1.17  
    1.18  ** Joint Targets and Orientation
    1.19 @@ -550,7 +550,6 @@
    1.20     that a creature can have a physical presence in the simulation."
    1.21    {:author "Robert McIntyre"}
    1.22    (:use (cortex world util sense))
    1.23 -  (:use clojure.contrib.def)
    1.24    (:import
    1.25     (com.jme3.math Vector3f Quaternion Vector2f Matrix3f)
    1.26     (com.jme3.bullet.joints
     2.1 --- a/org/hearing.org	Tue Feb 28 13:44:46 2012 -0600
     2.2 +++ b/org/hearing.org	Tue Feb 28 14:04:21 2012 -0600
     2.3 @@ -834,11 +834,12 @@
     2.4  
     2.5  #+name: hearing-ears
     2.6  #+begin_src clojure
     2.7 -(defvar 
     2.8 -  ^{:arglists '([creature])}
     2.9 +(def
    2.10 +  ^{:doc "Return the children of the creature's \"ears\" node."
    2.11 +    :arglists '([creature])}
    2.12    ears
    2.13 -  (sense-nodes "ears")
    2.14 -  "Return the children of the creature's \"ears\" node.")
    2.15 +  (sense-nodes "ears"))
    2.16 +
    2.17  
    2.18  (defn update-listener-velocity!
    2.19    "Update the listener's velocity every update loop."
    2.20 @@ -1140,7 +1141,6 @@
    2.21    instantiates them in the world as simulated ears."
    2.22    {:author "Robert McIntyre"}
    2.23    (:use (cortex world util sense))
    2.24 -  (:use clojure.contrib.def)
    2.25    (:import java.nio.ByteBuffer)
    2.26    (:import java.awt.image.BufferedImage)
    2.27    (:import org.tritonus.share.sampled.FloatSampleTools)
     3.1 --- a/org/movement.org	Tue Feb 28 13:44:46 2012 -0600
     3.2 +++ b/org/movement.org	Tue Feb 28 14:04:21 2012 -0600
     3.3 @@ -63,11 +63,12 @@
     3.4  #+begin_src clojure 
     3.5  (in-ns 'cortex.movement)
     3.6  
     3.7 -(defvar 
     3.8 -  ^{:arglists '([creature])}
     3.9 +(def 
    3.10 +  ^{:doc "Return the children of the creature's \"muscles\" node."
    3.11 +    :arglists '([creature])}
    3.12    muscles
    3.13 -  (sense-nodes "muscles")
    3.14 -  "Return the children of the creature's \"muscles\" node.")
    3.15 +  (sense-nodes "muscles"))
    3.16 +
    3.17  
    3.18  (defn muscle-profile-image
    3.19    "Get the muscle-profile image from the node's blender meta-data."
    3.20 @@ -292,7 +293,6 @@
    3.21     to move around in a simulated environment."
    3.22    {:author "Robert McIntyre"}
    3.23    (:use (cortex world util sense body))
    3.24 -  (:use clojure.contrib.def)
    3.25    (:import java.awt.image.BufferedImage)
    3.26    (:import com.jme3.scene.Node)
    3.27    (:import com.jme3.math.Vector3f)
    3.28 @@ -304,7 +304,6 @@
    3.29  (ns cortex.test.movement
    3.30    (:use (cortex world util sense body movement))
    3.31    (:use cortex.test.body)
    3.32 -  (:use clojure.contrib.def)
    3.33    (:import java.io.File)
    3.34    (:import java.awt.image.BufferedImage)
    3.35    (:import com.jme3.scene.Node)
     4.1 --- a/org/proprioception.org	Tue Feb 28 13:44:46 2012 -0600
     4.2 +++ b/org/proprioception.org	Tue Feb 28 14:04:21 2012 -0600
     4.3 @@ -343,7 +343,6 @@
     4.4    in jMonkeyEngine3. Reads specially prepared blender files to
     4.5    automatically generate proprioceptive senses."
     4.6    (:use (cortex world util sense body))
     4.7 -  (:use clojure.contrib.def)
     4.8    (:import com.jme3.scene.Node)
     4.9    (:import java.awt.image.BufferedImage)
    4.10    (:import (com.jme3.math Vector3f Quaternion)))
     5.1 --- a/org/test.org	Tue Feb 28 13:44:46 2012 -0600
     5.2 +++ b/org/test.org	Tue Feb 28 14:04:21 2012 -0600
     5.3 @@ -11,7 +11,6 @@
     5.4  #+begin_src clojure 
     5.5  (ns cortex.test
     5.6    (:use cortex.util)
     5.7 -  (:use clojure.contrib.def)
     5.8    (:require [cortex.test touch vision body hearing])
     5.9    (:import com.jme3.app.state.AppState
    5.10  	   com.jme3.system.AppSettings))
    5.11 @@ -49,13 +48,13 @@
    5.12    (println-repl (:doc (meta test-fn-var)))
    5.13    (run-world ((deref test-fn-var))))
    5.14  
    5.15 -(defvar test-suite
    5.16 +(def test-suite
    5.17 +  "The full test suite for all sensors/effectors."
    5.18    [#'cortex.test.touch/test-skin
    5.19     #'cortex.test.vision/test-two-eyes
    5.20     #'cortex.test.hearing/test-advanced-hearing
    5.21     #'cortex.test.body/test-proprioception
    5.22 -   #'cortex.test.body/test-motor-control]
    5.23 -  "The full test suite for all sensors/effectors.")
    5.24 +   #'cortex.test.body/test-motor-control])
    5.25  
    5.26  (defn run-suite
    5.27    "Run the entire test-suite."
     6.1 --- a/org/touch.org	Tue Feb 28 13:44:46 2012 -0600
     6.2 +++ b/org/touch.org	Tue Feb 28 14:04:21 2012 -0600
     6.3 @@ -723,7 +723,6 @@
     6.4    construct this sense automatically."
     6.5    {:author "Robert McIntyre"}
     6.6    (:use (cortex world util sense))
     6.7 -  (:use clojure.contrib.def)
     6.8    (:import (com.jme3.scene Geometry Node Mesh))
     6.9    (:import com.jme3.collision.CollisionResults)
    6.10    (:import com.jme3.scene.VertexBuffer$Type)
     7.1 --- a/org/util.org	Tue Feb 28 13:44:46 2012 -0600
     7.2 +++ b/org/util.org	Tue Feb 28 14:04:21 2012 -0600
     7.3 @@ -83,7 +83,6 @@
     7.4     clojure."
     7.5    {:author "Robert McIntyre"}
     7.6    (:use cortex.world)
     7.7 -  (:use clojure.contrib.def)
     7.8    (:import com.jme3.math.Vector3f)
     7.9    (:import com.jme3.math.Quaternion)
    7.10    (:import com.jme3.asset.TextureKey)
     8.1 --- a/org/vision.org	Tue Feb 28 13:44:46 2012 -0600
     8.2 +++ b/org/vision.org	Tue Feb 28 14:04:21 2012 -0600
     8.3 @@ -224,13 +224,13 @@
     8.4  
     8.5  #+name: sensitivity
     8.6  #+begin_src clojure
     8.7 -(defvar sensitivity-presets
     8.8 +(def sensitivity-presets
     8.9 +  "Retinal sensitivity presets for sensors that extract one channel
    8.10 +   (:red :blue :green) or average all channels (:all)"
    8.11    {:all    0xFFFFFF
    8.12     :red    0xFF0000
    8.13     :blue   0x0000FF
    8.14 -   :green  0x00FF00}
    8.15 -  "Retinal sensitivity presets for sensors that extract one channel
    8.16 -   (:red :blue :green) or average all channels (:all)")
    8.17 +   :green  0x00FF00})
    8.18  #+end_src
    8.19  
    8.20  ** Metadata Processing
    8.21 @@ -268,11 +268,11 @@
    8.22  eyes the creature has.
    8.23  #+name: eye-node
    8.24  #+begin_src clojure
    8.25 -(defvar 
    8.26 -  ^{:arglists '([creature])}
    8.27 +(def
    8.28 +  ^{:doc "Return the children of the creature's \"eyes\" node."
    8.29 +    :arglists '([creature])}
    8.30    eyes
    8.31 -  (sense-nodes "eyes")
    8.32 -  "Return the children of the creature's \"eyes\" node.")
    8.33 +  (sense-nodes "eyes"))
    8.34  #+end_src
    8.35  
    8.36  Then, add the camera created by =add-eye!= to the simulation by
    8.37 @@ -692,7 +692,6 @@
    8.38    them in the world as actual eyes."
    8.39    {:author "Robert McIntyre"}
    8.40    (:use (cortex world sense util))
    8.41 -  (:use clojure.contrib.def)
    8.42    (:import com.jme3.post.SceneProcessor)
    8.43    (:import (com.jme3.util BufferUtils Screenshots))
    8.44    (:import java.nio.ByteBuffer)
     9.1 --- a/org/world.org	Tue Feb 28 13:44:46 2012 -0600
     9.2 +++ b/org/world.org	Tue Feb 28 14:04:21 2012 -0600
     9.3 @@ -53,7 +53,7 @@
     9.4    driven exception handling"
     9.5    {:author "Robert McIntyre"}
     9.6    
     9.7 -  (:use (clojure.contrib (def :only (defvar defn-memo))))
     9.8 +  (:use (clojure.contrib (def :only (defn-memo))))
     9.9    (:use [clojure.contrib [str-utils :only [re-gsub]]])
    9.10  
    9.11    (:import com.aurellem.capture.IsoTimer)
    9.12 @@ -217,18 +217,17 @@
    9.13  mouse button controls to the map.
    9.14  
    9.15  #+begin_src clojure :exports both :results output
    9.16 -(require 'clojure.contrib.pprint)
    9.17 -(clojure.contrib.pprint/pprint
    9.18 +(clojure.pprint/pprint
    9.19   (take 6 (cortex.world/all-keys)))
    9.20  #+end_src
    9.21  
    9.22  #+results:
    9.23 -: (["key-n" #<KeyTrigger com.jme3.input.controls.KeyTrigger@9f9fec0>]
    9.24 -:  ["key-apps" #<KeyTrigger com.jme3.input.controls.KeyTrigger@28edbe7f>]
    9.25 -:  ["key-pgup" #<KeyTrigger com.jme3.input.controls.KeyTrigger@647fd33a>]
    9.26 -:  ["key-f8" #<KeyTrigger com.jme3.input.controls.KeyTrigger@24f97188>]
    9.27 -:  ["key-o" #<KeyTrigger com.jme3.input.controls.KeyTrigger@685c53ff>]
    9.28 -:  ["key-at" #<KeyTrigger com.jme3.input.controls.KeyTrigger@4c3e2e5f>])
    9.29 +: (["key-n" #<KeyTrigger com.jme3.input.controls.KeyTrigger@2ad82934>]
    9.30 +:  ["key-apps" #<KeyTrigger com.jme3.input.controls.KeyTrigger@3c900d00>]
    9.31 +:  ["key-pgup" #<KeyTrigger com.jme3.input.controls.KeyTrigger@7d051157>]
    9.32 +:  ["key-f8" #<KeyTrigger com.jme3.input.controls.KeyTrigger@717f0d2d>]
    9.33 +:  ["key-o" #<KeyTrigger com.jme3.input.controls.KeyTrigger@4a555fcc>]
    9.34 +:  ["key-at" #<KeyTrigger com.jme3.input.controls.KeyTrigger@47d31aaa>])
    9.35  
    9.36  ** World Creation
    9.37  #+name: world