applyProjection method

void applyProjection (Matrix4 arg)

Projects this using the projection matrix arg

Implementation

void applyProjection(Matrix4 arg) {
  final Float64List argStorage = arg.storage;
  final double x = _v3storage[0];
  final double y = _v3storage[1];
  final double z = _v3storage[2];
  final double d = 1.0 /
      (argStorage[3] * x +
          argStorage[7] * y +
          argStorage[11] * z +
          argStorage[15]);
  _v3storage[0] = (argStorage[0] * x +
          argStorage[4] * y +
          argStorage[8] * z +
          argStorage[12]) *
      d;
  _v3storage[1] = (argStorage[1] * x +
          argStorage[5] * y +
          argStorage[9] * z +
          argStorage[13]) *
      d;
  _v3storage[2] = (argStorage[2] * x +
          argStorage[6] * y +
          argStorage[10] * z +
          argStorage[14]) *
      d;
}