I've worked up a little library of some of the things that I do frequently
with Vectors and Matrices, and I thought that it might help out some other
people on the list.
This code will extract or set euler angles from a Matrix3d (something I saw
someone asking for recently), calculate the angles between two Vector3ds,
convert from 2d polar to a Point2d, extract the euler angle from a Vector3d
(something which would solve a question I saw on the list recently about
translating a box using an interpolator), and a few other things.
The code is copyrighted, but I hereby give permission to everyone to use the
code in the code as attached here as you see fit. I do not take any
responsibility for its correctness or fitness for any purpose. (I think
it's fine, but no lawsuits for me, thank you.)
Feel free to put the code on j3d.org if you like.
Bobby Martin
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
MathUtil.java
MatrixUtil.java
VectorUtil.java