GeomConverter/test/org/lcsim/detector
diff -u -r1.1 -r1.2
--- Rotation3DTest.java 24 Feb 2007 03:19:24 -0000 1.1
+++ Rotation3DTest.java 26 Feb 2007 19:41:43 -0000 1.2
@@ -26,7 +26,7 @@
public void testIdentityIsDefault()
{
Rotation3D rotation = new Rotation3D();
- assert(rotation.getMatrix().trace() == 3.0);
+ assert(rotation.getRotationMatrix().trace() == 3.0);
}
public void testSimpleRotationX()
@@ -34,15 +34,14 @@
Hep3Vector coordinate = new BasicHep3Vector(1.0,0.0,0.0);
Rotation3D rotation = new Rotation3D();
rotation.setTaitBryan(Math.PI / 2, 0, 0);
- Hep3Vector result = VecOp.mult(rotation.getMatrix(),coordinate);
+ Hep3Vector result = VecOp.mult(rotation.getRotationMatrix(),coordinate);
System.out.println("90 degree X rotation");
rotation.printOut(System.out);
System.out.printf("original point -> ( %.4f %.4f %.4f ) \n",coordinate.x(),coordinate.y(),coordinate.z());
System.out.printf("rotated 90 deg -> ( %.4f %.4f %.4f ) \n",result.x(),result.y(),result.z());
rotation.invert();
- result = VecOp.mult(rotation.getMatrix(),result);
+ result = VecOp.mult(rotation.getRotationMatrix(),result);
System.out.printf("inverse rotated 90 deg -> ( %.4f %.4f %.4f ) \n",result.x(),result.y(),result.z());
-
}
public void testSimpleRotationY()
@@ -50,13 +49,13 @@
Hep3Vector coordinate = new BasicHep3Vector(1.0,0.0,0.0);
Rotation3D rotation = new Rotation3D();
rotation.setTaitBryan(0, Math.PI / 2, 0);
- Hep3Vector result = VecOp.mult(rotation.getMatrix(),coordinate);
+ Hep3Vector result = VecOp.mult(rotation.getRotationMatrix(),coordinate);
System.out.println("90 degree Y rotation");
rotation.printOut(System.out);
System.out.printf("original point -> ( %.4f %.4f %.4f ) \n",coordinate.x(),coordinate.y(),coordinate.z());
System.out.printf("rotated 90 deg -> ( %.4f %.4f %.4f ) \n",result.x(),result.y(),result.z());
rotation.invert();
- result = VecOp.mult(rotation.getMatrix(),result);
+ result = VecOp.mult(rotation.getRotationMatrix(),result);
System.out.printf("inverse rotated 90 deg -> ( %.4f %.4f %.4f ) \n",result.x(),result.y(),result.z());
}
@@ -65,13 +64,13 @@
Hep3Vector coordinate = new BasicHep3Vector(1.0,0.0,0.0);
Rotation3D rotation = new Rotation3D();
rotation.setTaitBryan(0, 0, Math.PI / 2);
- Hep3Vector result = VecOp.mult(rotation.getMatrix(),coordinate);
+ Hep3Vector result = VecOp.mult(rotation.getRotationMatrix(),coordinate);
System.out.println("90 degree Z rotation");
rotation.printOut(System.out);
System.out.printf("original point -> ( %.4f %.4f %.4f ) \n",coordinate.x(),coordinate.y(),coordinate.z());
System.out.printf("rotated 90 deg -> ( %.4f %.4f %.4f ) \n",result.x(),result.y(),result.z());
rotation.invert();
- result = VecOp.mult(rotation.getMatrix(),result);
+ result = VecOp.mult(rotation.getRotationMatrix(),result);
System.out.printf("inverse rotated 90 deg -> ( %.4f %.4f %.4f ) \n",result.x(),result.y(),result.z());
}