vrCameraMetrics.d.ts 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import { Matrix } from "../../Maths/math.vector";
  2. /**
  3. * This represents all the required metrics to create a VR camera.
  4. * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_introduction#device-orientation-camera
  5. */
  6. export declare class VRCameraMetrics {
  7. /**
  8. * Define the horizontal resolution off the screen.
  9. */
  10. hResolution: number;
  11. /**
  12. * Define the vertical resolution off the screen.
  13. */
  14. vResolution: number;
  15. /**
  16. * Define the horizontal screen size.
  17. */
  18. hScreenSize: number;
  19. /**
  20. * Define the vertical screen size.
  21. */
  22. vScreenSize: number;
  23. /**
  24. * Define the vertical screen center position.
  25. */
  26. vScreenCenter: number;
  27. /**
  28. * Define the distance of the eyes to the screen.
  29. */
  30. eyeToScreenDistance: number;
  31. /**
  32. * Define the distance between both lenses
  33. */
  34. lensSeparationDistance: number;
  35. /**
  36. * Define the distance between both viewer's eyes.
  37. */
  38. interpupillaryDistance: number;
  39. /**
  40. * Define the distortion factor of the VR postprocess.
  41. * Please, touch with care.
  42. */
  43. distortionK: number[];
  44. /**
  45. * Define the chromatic aberration correction factors for the VR post process.
  46. */
  47. chromaAbCorrection: number[];
  48. /**
  49. * Define the scale factor of the post process.
  50. * The smaller the better but the slower.
  51. */
  52. postProcessScaleFactor: number;
  53. /**
  54. * Define an offset for the lens center.
  55. */
  56. lensCenterOffset: number;
  57. /**
  58. * Define if the current vr camera should compensate the distortion of the lens or not.
  59. */
  60. compensateDistortion: boolean;
  61. /**
  62. * Defines if multiview should be enabled when rendering (Default: false)
  63. */
  64. multiviewEnabled: boolean;
  65. /**
  66. * Gets the rendering aspect ratio based on the provided resolutions.
  67. */
  68. get aspectRatio(): number;
  69. /**
  70. * Gets the aspect ratio based on the FOV, scale factors, and real screen sizes.
  71. */
  72. get aspectRatioFov(): number;
  73. /**
  74. * @internal
  75. */
  76. get leftHMatrix(): Matrix;
  77. /**
  78. * @internal
  79. */
  80. get rightHMatrix(): Matrix;
  81. /**
  82. * @internal
  83. */
  84. get leftPreViewMatrix(): Matrix;
  85. /**
  86. * @internal
  87. */
  88. get rightPreViewMatrix(): Matrix;
  89. /**
  90. * Get the default VRMetrics based on the most generic setup.
  91. * @returns the default vr metrics
  92. */
  93. static GetDefault(): VRCameraMetrics;
  94. }