-\r
-public class RotatableMatrix {\r
-\r
- float matrix[][];\r
-\r
- float[] temp;\r
-\r
- float[][] rot;\r
-\r
-\r
-\r
- public RotatableMatrix(int rows, int cols) {\r
-\r
- matrix = new float[rows][cols];\r
-\r
- temp = new float[3];\r
-\r
- rot = new float[3][3];\r
-\r
- }\r
-\r
-\r
-\r
- public void addElement(int i, int j, float value) {\r
-\r
- matrix[i][j] = value;\r
-\r
- }\r
-\r
-\r
-\r
- public void print() {\r
-\r
- System.out.println(matrix[0][0] + " " + matrix[0][1] + " " + matrix[0][2]);\r
-\r
- System.out.println(matrix[1][0] + " " + matrix[1][1] + " " + matrix[1][2]);\r
-\r
- System.out.println(matrix[2][0] + " " + matrix[2][1] + " " + matrix[2][2]);\r
-\r
- }\r
-\r
-\r
-\r
- public void rotate (float degrees, char axis) {\r
-\r
-\r
-\r
- float costheta = (float)Math.cos(degrees*Math.PI/(float)180.0);\r
-\r
- float sintheta = (float)Math.sin(degrees*Math.PI/(float)180.0);\r
-\r
-\r
-\r
- if (axis == 'z') {\r
-\r
-\r
-\r
- rot[0][0] = (float)costheta;\r
-\r
- rot[0][1] = (float)-sintheta;\r
-\r
- rot[0][2] = (float)0.0;\r
-\r
-\r
-\r
- rot[1][0] = (float)sintheta;\r
-\r
- rot[1][1] = (float)costheta;\r
-\r
- rot[1][2] = (float)0.0;\r
-\r
-\r
-\r
- rot[2][0] = (float)0.0;\r
-\r
- rot[2][1] = (float)0.0;\r
-\r
- rot[2][2] = (float)1.0;\r
-\r
-\r
-\r
- preMultiply(rot);\r
-\r
+/**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @author $author$\r
+ * @version $Revision$\r
+ */\r
+public class RotatableMatrix\r
+{\r
+ float[][] matrix;\r
+ float[] temp;\r
+ float[][] rot;\r
+\r
+ /**\r
+ * Creates a new RotatableMatrix object.\r
+ *\r
+ * @param rows DOCUMENT ME!\r
+ * @param cols DOCUMENT ME!\r
+ */\r
+ public RotatableMatrix(int rows, int cols)\r
+ {\r
+ matrix = new float[rows][cols];\r
+\r
+ temp = new float[3];\r
+\r
+ rot = new float[3][3];\r