This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Matrix4f Mapped Soot

By: a guest on Jul 24th, 2011  |  syntax: Java 5  |  size: 1.76 KB  |  views: 181  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public void mul4f(Matrix4fMapped left, Matrix4fMapped right) {
  2.         float lm00 = left.m00;
  3.         float lm10;
  4.         float lm20;
  5.         float lm30;
  6.         float rm01;
  7.         float rm02;
  8.         float rm03;
  9.         float rm00 = right.m00;
  10.         float rm10 = right.m10;
  11.         float rm20 = right.m20;
  12.         float rm30 = right.m30;
  13.         float lm01 = left.m01;
  14.         float lm02 = left.m02;
  15.         float lm03 = left.m03;
  16.         m00 = lm00 * rm00 + (lm10 = left.m10) * (rm01 = right.m01) + (lm20 = left.m20) * (rm02 = right.m02) + (lm30 = left.m30) * (rm03 = right.m03);
  17.         float rm11;
  18.         float rm12;
  19.         float rm13;
  20.         m10 = lm00 * rm10 + lm10 * (rm11 = right.m11) + lm20 * (rm12 = right.m12) + lm30 * (rm13 = right.m13);
  21.         float rm21;
  22.         float rm22;
  23.         float rm23;
  24.         m20 = lm00 * rm20 + lm10 * (rm21 = right.m21) + lm20 * (rm22 = right.m22) + lm30 * (rm23 = right.m23);
  25.         float rm32;
  26.         m30 = lm00 * rm30 + lm10 * (lm00 = right.m31) + lm20 * (rm32 = right.m32) + lm30 * (right = ((Matrix4fMapped)(right.m33)));
  27.         m01 = lm01 * rm00 + (lm30 = left.m11) * rm01 + (lm20 = left.m21) * rm02 + (lm10 = left.m31) * rm03;
  28.         m11 = lm01 * rm10 + lm30 * rm11 + lm20 * rm12 + lm10 * rm13;
  29.         m21 = lm01 * rm20 + lm30 * rm21 + lm20 * rm22 + lm10 * rm23;
  30.         m31 = lm01 * rm30 + lm30 * lm00 + lm20 * rm32 + lm10 * right;
  31.         m02 = lm02 * rm00 + (lm01 = left.m12) * rm01 + (lm30 = left.m22) * rm02 + (lm20 = left.m32) * rm03;
  32.         m12 = lm02 * rm10 + lm01 * rm11 + lm30 * rm12 + lm20 * rm13;
  33.         m22 = lm02 * rm20 + lm01 * rm21 + lm30 * rm22 + lm20 * rm23;
  34.         m32 = lm02 * rm30 + lm01 * lm00 + lm30 * rm32 + lm20 * right;
  35.         m03 = lm03 * rm00 + (rm00 = left.m13) * rm01 + (rm01 = left.m23) * rm02 + (rm02 = left.m33) * rm03;
  36.         m13 = lm03 * rm10 + rm00 * rm11 + rm01 * rm12 + rm02 * rm13;
  37.         m23 = lm03 * rm20 + rm00 * rm21 + rm01 * rm22 + rm02 * rm23;
  38.         m33 = lm03 * rm30 + rm00 * lm00 + rm01 * rm32 + rm02 * right;
  39. }
clone this paste RAW Paste Data