transform method

Vector4 transform (Vector4 arg)

Transform arg of type Vector4 using the transformation defined by this.

Implementation

Vector4 transform(Vector4 arg) {
  final Float64List argStorage = arg._v4storage;
  final double x_ = (_m4storage[0] * argStorage[0]) +
      (_m4storage[4] * argStorage[1]) +
      (_m4storage[8] * argStorage[2]) +
      (_m4storage[12] * argStorage[3]);
  final double y_ = (_m4storage[1] * argStorage[0]) +
      (_m4storage[5] * argStorage[1]) +
      (_m4storage[9] * argStorage[2]) +
      (_m4storage[13] * argStorage[3]);
  final double z_ = (_m4storage[2] * argStorage[0]) +
      (_m4storage[6] * argStorage[1]) +
      (_m4storage[10] * argStorage[2]) +
      (_m4storage[14] * argStorage[3]);
  final double w_ = (_m4storage[3] * argStorage[0]) +
      (_m4storage[7] * argStorage[1]) +
      (_m4storage[11] * argStorage[2]) +
      (_m4storage[15] * argStorage[3]);
  argStorage[0] = x_;
  argStorage[1] = y_;
  argStorage[2] = z_;
  argStorage[3] = w_;
  return arg;
}