applyProjection method

void applyProjection(
  1. Matrix4 arg
)
inherited

Projects this using the projection matrix arg

Implementation

void applyProjection(Matrix4 arg) {
  final argStorage = arg.storage;
  final x = _v3storage[0];
  final y = _v3storage[1];
  final z = _v3storage[2];
  final 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;
}