text: import { Matrix } from "../../Maths/math.vector";
  /**
   * This represents all the required metrics to create a VR camera.
   * @see https://doc.babylonjs.com/babylon101/cameras#device-orientation-camera
   */
  var VRCameraMetrics = /** @class */ (function () {
      function VRCameraMetrics() {
          /**
           * Define if the current vr camera should compensate the distortion of the lense or not.
           */
          this.compensateDistortion = true;
          /**
           * Defines if multiview should be enabled when rendering (Default: false)
           */
          this.multiviewEnabled = false;
      }
      Object.defineProperty(VRCameraMetrics.prototype, "aspectRatio", {
          /**
           * Gets the rendering aspect ratio based on the provided resolutions.
           */
          get: function () {
              return this.hResolution / (2 * this.vResolution);
          },
          enumerable: false,
          configurable: true
      });
      Object.defineProperty(VRCameraMetrics.prototype, "aspectRatioFov", {
          /**
           * Gets the aspect ratio based on the FOV, scale factors, and real screen sizes.
           */
          get: function () {
              return (2 * Math.atan((this.postProcessScaleFactor * this.vScreenSize) / (2 * this.eyeToScreenDistance)));
          },
          enumerable: false,
          configurable: true
      });
      Object.defineProperty(VRCameraMetrics.prototype, "leftHMatrix", {
          /**
           * @hidden
           */
          get: function () {
              var meters = (this.hScreenSize / 4) - (this.lensSeparationDistance / 2);
              var h = (4 * meters) / this.hScreenSize;
              return Matrix.Translation(h, 0, 0);
          },
          enumerable: false,
          configurable: true
      });
      Object.defineProperty(VRCameraMetrics.prototype, "rightHMatrix", {
          /**
           * @hidden
           */
          get: function () {
              var meters = (this.hScreenSize / 4) - (this.lensSeparationDistance / 2);
              var h = (4 * meters) / this.hScreenSize;
              return Matrix.Translation(-h, 0, 0);
          },
          enumerable: false,
          configurable: true
      });
      Object.defineProperty(VRCameraMetrics.prototype, "leftPreViewMatrix", {
          /**
           * @hidden
           */
          get: function () {
              return Matrix.Translation(0.5 * this.interpupillaryDistance, 0, 0);
          },
          enumerable: false,
          configurable: true
      });
      Object.defineProperty(VRCameraMetrics.prototype, "rightPreViewMatrix", {
          /**
           * @hidden
           */
          get: function () {
              return Matrix.Translation(-0.5 * this.interpupillaryDistance, 0, 0);
          },
          enumerable: false,
          configurable: true
      });
      /**
       * Get the default VRMetrics based on the most generic setup.
       * @returns the default vr metrics
       */
      VRCameraMetrics.GetDefault = function () {
          var result = new VRCameraMetrics();
          result.hResolution = 1280;
          result.vResolution = 800;
          result.hScreenSize = 0.149759993;
          result.vScreenSize = 0.0935999975;
          result.vScreenCenter = 0.0467999987;
          result.eyeToScreenDistance = 0.0410000011;
          result.lensSeparationDistance = 0.0635000020;
          result.interpupillaryDistance = 0.0640000030;
          result.distortionK = [1.0, 0.219999999, 0.239999995, 0.0];
          result.chromaAbCorrection = [0.995999992, -0.00400000019, 1.01400006, 0.0];
          result.postProcessScaleFactor = 1.714605507808412;
          result.lensCenterOffset = 0.151976421;
          return result;
      };
      return VRCameraMetrics;
  }());
  export { VRCameraMetrics };
  //# sourceMappingURL=vrCameraMetrics.js.map