# HG changeset patch # User Robert McIntyre # Date 1395957386 14400 # Node ID a86555b029165b06ef14628d8b9581f528d3c94b # Parent 42ddfe406c0a3897eb833cdb6b9b3ee59b098166 changes from laptop. diff -r 42ddfe406c0a -r a86555b02916 org/depth-map.org --- a/org/depth-map.org Tue Jun 11 07:13:42 2013 -0400 +++ b/org/depth-map.org Thu Mar 27 17:56:26 2014 -0400 @@ -13,7 +13,7 @@ (cortex.import/mega-import-jme3) (defn convert-pixel-to-ray - [camera x y] + [camera ray x y] (let [pixel-arrow (.getWorldCoordinates camera @@ -26,7 +26,6 @@ (set-ray ray Matrix4f/IDENTITY (.getLocation camera) pixel-arrow) ray)) - (defn generate-depth-map-points "Generate a data structure representating the depth of the first object to collide with a ray from the camera's current position." @@ -35,17 +34,34 @@ height (.getHeight camera) pixels (for [x (range width) y (range height)] [x y]) - + temp-ray (Ray.) depths (for [[x y] pixels] - (let [ray (convert-pixel-to-ray camera x y) + (let [ray (convert-pixel-to-ray camera temp-ray x y) results (CollisionResults.)] (.collideWith world ray results) - (.getDistance (.getClosestCollision results))))] + (if-let [closest (.getClosestCollision results)] + (.hashCode (.getGeometry closest)) 0)))] + (zipmap pixels depths))) (defn test-world [] (nodify [(floor*) (brick-wall*)])) -(defn run-depth-map-test [] +(import com.aurellem.capture.RatchetTimer) + +(defn depth-map-test [] + (let [the-world (test-world)] + (world + the-world + ;;controls + standard-debug-controls + ;;init + (fn [world] + (let [timer (RatchetTimer. 60)] + (.setTimer world timer) + (display-dilated-time world timer))) + ;; update + no-op))) + #+end_src \ No newline at end of file diff -r 42ddfe406c0a -r a86555b02916 org/ideas.org --- a/org/ideas.org Tue Jun 11 07:13:42 2013 -0400 +++ b/org/ideas.org Thu Mar 27 17:56:26 2014 -0400 @@ -2,6 +2,11 @@ * Brainstorming different sensors and effectors. +** toys +Make toys in the world with "docking points," which would attach +together in physically stable ways. Could make analogs to legos, +tinker toys, and lincoln logs. + Every sense that we have should have an effector that changes what that sense (or others who have that sense) experiences. diff -r 42ddfe406c0a -r a86555b02916 org/util.org --- a/org/util.org Tue Jun 11 07:13:42 2013 -0400 +++ b/org/util.org Thu Mar 27 17:56:26 2014 -0400 @@ -59,6 +59,7 @@ "Import ALL the jme classes. For REPL use." [] (dorun + (import com.aurellem.capture.IsoTimer) (map (comp permissive-import symbol) (jme-class-names)))) #+end_src