transform method

Vector3 transform (Vector3 arg)

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

Implementation

Vector3 transform(Vector3 arg) {
  final Float32List argStorage = arg._v3storage;
  final double x_ = (storage[0] * argStorage[0]) +
      (storage[3] * argStorage[1]) +
      (storage[6] * argStorage[2]);
  final double y_ = (storage[1] * argStorage[0]) +
      (storage[4] * argStorage[1]) +
      (storage[7] * argStorage[2]);
  final double z_ = (storage[2] * argStorage[0]) +
      (storage[5] * argStorage[1]) +
      (storage[8] * argStorage[2]);
  arg
    ..x = x_
    ..y = y_
    ..z = z_;
  return arg;
}