Currently Being Moderated
/*
As I understand, column with 0 at the bottom defines the above column
is an axis vector
The digits in the right most column represent the streches, or the same, result,
except the lower right hand cell, which I believe has to be the same as the rest
of the lowest row.
Correct?
*/
Matrix4d initial = new Matrix4d(1,0,0,1, 0,1,0,1, 0,0,1,1, 0,0,0,0);
Matrix4d result = new Matrix4d();
System.out.println("Initial targest Matrix:");
System.out.println(initial);
System.out.println();
Transform3D transform = new Transform3D(initial);
Double degrees = new Double(45);
Double radians = new Double(degrees*Math.PI/180);
System.out.println("Angle: " + degrees + " degrees");
AxisAngle4d axisAngleRotate = new AxisAngle4d(1,1,1,radians); //must be equivalent to the Matrix contents.
System.out.println(axisAngleRotate);
System.out.println();
transform.setRotation(axisAngleRotate);
transform.get(result);
System.out.println("Forward Rotation results:");
System.out.println(result);
System.out.println();
//-------------------------------------------------------------------
/*
It only setRotation() only overwrites the matrix with the updates
trigonometry values for the rotation matrix. It thus becomes the multipler
itself.
*/
Edited by: Zachary1234 on Jan 30, 2013 5:50 PM