# HG changeset patch # User Robert McIntyre # Date 1328994737 25200 # Node ID 2a7f57e7efdb0f5cd801251ff46b35a9b6158284 # Parent e5db1d2ff9a85a4e57f158153a8eba1da2e5ad5d working on touch.org diff -r e5db1d2ff9a8 -r 2a7f57e7efdb org/ideas.org --- a/org/ideas.org Sat Feb 11 12:53:18 2012 -0700 +++ b/org/ideas.org Sat Feb 11 14:12:17 2012 -0700 @@ -76,6 +76,7 @@ - [ ] project proposals for Winston \ - [ ] additional senses to be implemented for Winston | -- 2 days - [ ] send Winston package / + - [ ] fix videos that were encoded wrong, test on InterNet Explorer. ** would be cool to get done before winston - [X] enable greyscale bitmaps for touch -- 2 hours @@ -99,6 +100,8 @@ - [ ] upgrade to clojure 1.3, replace all defvars with new def + + ;;In the elder days of Art, ;;Builders wrought with greatest care ;;Each minute and unseen part; diff -r e5db1d2ff9a8 -r 2a7f57e7efdb org/touch.org --- a/org/touch.org Sat Feb 11 12:53:18 2012 -0700 +++ b/org/touch.org Sat Feb 11 14:12:17 2012 -0700 @@ -17,7 +17,7 @@ (defn triangles "Return a sequence of all the Triangles which compose a given - Geometry." + Geometry." [#^Geometry geom] (let [mesh (.getMesh geom) @@ -63,7 +63,7 @@ (if-let [image-path (meta-data obj "touch")] (load-image image-path))) -(defn triangle +(defn mesh-triangle "Get the triangle specified by triangle-index from the mesh within bounds." [#^Mesh mesh triangle-index] @@ -80,7 +80,7 @@ (vec indices))) (defn vertex-UV-coord - "Get the uv-coordinates of the vertex named by vertex-index" + "Get the UV-coordinates of the vertex named by vertex-index" [#^Mesh mesh vertex-index] (let [UV-buffer (.getData @@ -91,7 +91,7 @@ (.get UV-buffer (+ 1 (* vertex-index 2)))])) (defn triangle-UV-coord - "Get the uv-cooridnates of the triangle's verticies." + "Get the UV-cooridnates of the triangle's verticies." [#^Mesh mesh width height triangle-index] (map (fn [[u v]] (vector (* width u) (* height v))) (map (partial vertex-UV-coord mesh) @@ -200,7 +200,7 @@ (white-coordinates image bounds)) UV->geometry (triangle-transformation cutout-triangle - (triangle mesh tri-index)) + (mesh-triangle mesh tri-index)) geometry-sensor-coords (map (fn [[u v]] (.mult UV->geometry (Vector3f. u v 0))) UV-sensor-coords)]