bradhe

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

102 Neutral

About bradhe

  • Rank
    Newbie
  1. Matrix to vector?

    Wow, yeah that was crazy easy. I cross-referenced Wikipedia on [url="http://en.wikipedia.org/wiki/Transformation_matrix#Perspective_projection"]Perspective projection matrices[/url], your simple suggestion + Wikipedia made it obvious. Here's what I ended up with: [source lang="java"] public static Matrix4f fromVector(Vector3f vector) { Matrix4f matrix = new Matrix4f(); matrix.m30 = vector.x; matrix.m31 = vector.y; matrix.m32 = vector.z; matrix.m33 = 1; return matrix; } public static Vector3f toVector(Matrix4f matrix, Vector3f vector) { vector.x = matrix.m30; vector.y = matrix.m31; vector.z = matrix.m32; return vector; } public static void mul(Matrix4f left, Vector3f right, Vector3f result) { Matrix4f matrix = fromVector(right); Matrix4f.mul(left, matrix, matrix); toVector(matrix, result); }[/source]
  2. Matrix to vector?

    Heya! I've got a tree of objects, each with their own transformation matrices relative to their parent object. Give an object anywhere in the tree, I'd like to find it's absolute position from the origin. This is simple enough: I walk down the tree, applying each transform along the way, 'till I hit the object in question. The resultant matrix gives the absolute transformation matrix. What's the best way to turn this in to a vector that is the position relative to the origin? I have bounding boxes around each element, and I'd like to use this to find collisions. I may be making this more complicated than I need to...
  3. Here we go! Headed east.
  4. I've never hugged my coworkers when leaving a job. That is, until now. Will miss @AboutUs a lot!
  5. wow that is exciting! RT @deschutesbeer: It's an exciting day here at the brewery. The heirloom cascade hops are being picked for the 1st...
  6. who's headed to the @piepdx grand opening tonight?
  7. every day I wake up and say to myself "thank god I am not a DBA."
  8. amazing article in willamette weakly about the Timbers Army. I'm pretty damn proud! http://ow.ly/6iT99
  9. English language is crazy. To us "yaonor" = "your honor." Always blows me away.
  10. man, the fat ppl just keep getting fatter.
  11. graphing in javascript is painful as hell.
  12. most important thing about a logo? that it looks AWESOME on a sticker!
  13. did I hear that right?
  14. I was really able to get a handle on my website's SEO, thanks to the @AboutUs Site Report!