changeset 8:522cf85fdb57

getting there!
author Robert McIntyre <rlm@mit.edu>
date Sun, 23 Oct 2011 00:59:22 -0700
parents 9ccfbcbed90a
children 7d0c0282c3a7
files org/skin.org
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/org/skin.org	Sun Oct 23 00:49:33 2011 -0700
     1.2 +++ b/org/skin.org	Sun Oct 23 00:59:22 2011 -0700
     1.3 @@ -103,16 +103,19 @@
     1.4    [geom tri]
     1.5    (let [new (Vector3f.)]
     1.6      (.calculateCenter tri)
     1.7 -    (.localToWorld geom (.get tri 1) new)
     1.8 +    (.localToWorld geom (.getCenter tri) new)
     1.9      new))
    1.10  
    1.11  (defn get-ray-direction
    1.12    [geom tri]
    1.13    (let [new (Vector3f.)]
    1.14      (.calculateNormal tri)
    1.15 +    
    1.16      (.localToWorld geom (.getNormal tri) new)
    1.17 -    new
    1.18 -    Vector3f/UNIT_Y))
    1.19 +    (.subtract new (get-ray-origin geom tri))
    1.20 +               
    1.21 +    ;;Vector3f/UNIT_Y
    1.22 +    ))
    1.23    
    1.24  (defn ray-origin-debug
    1.25    [ray]