checkpoint
[anneal.git] / src / edu / berkeley / qfat / geom / Matrix.java
index eeeb68f..31fe6e0 100644 (file)
@@ -122,6 +122,14 @@ public class Matrix {
                        i*p.x + j*p.y + k*p.z + l);
     }
 
+    public Matrix preMultiplyTranslationalComponentBy(Matrix mm) {
+        Vec v = mm.times(getTranslationalComponent());
+        return new Matrix(a, b, c, v.x,
+                          e, f, g, v.y,
+                          i, j, k, v.z,
+                          m, n, o, 1);
+    }
+
     /** multiply by another matrix */
     public Matrix times(Matrix z) {
         float t00 = a;