import { type Camera } from "@babylonjs/core/Cameras/camera.pure.js"; import { type IMatrixLike, type IVector3Like, type IVector4Like } from "@babylonjs/core/Maths/math.like.js"; /** * Variables that are used to render the atmosphere and are computed per-camera. */ export declare class AtmospherePerCameraVariables { private _inverseViewProjectionMatrixWithoutTranslation; private _directionToLightRelativeToCameraGeocentricNormal; private _cosAngleLightToZenith; private _cameraRadius; private _clampedCameraRadius; private _cameraHeight; private _clampedCameraHeight; private _cameraPositionGlobal; private _clampedCameraPositionGlobal; private _cosCameraHorizonAngleFromZenith; private _sinCameraAtmosphereHorizonAngleFromNadir; private _cameraGeocentricNormal; private _cameraForward; private _cameraNearPlane; private _cameraPosition; private _viewport; private _lastViewMatrix; private _lastProjectionMatrix; private _inverseViewMatrixWithoutTranslation; private _inverseProjectionMatrix; /** * The inverse view projection matrix is used to unproject rays. * To avoid precision issues, the translation part of the matrix has been removed. */ get inverseViewProjectionMatrixWithoutTranslation(): IMatrixLike; /** * The direction to the light relative to the geocentric normal under the camera. */ get directionToLightRelativeToCameraGeocentricNormal(): IVector3Like; /** * The cosine of the angle between the light direction and zenith. */ get cosAngleLightToZenith(): number; /** * The distance from the camera to the planet origin in kilometers. */ get cameraRadius(): number; /** * The distance from the camera to the planet origin, clamped to the planet radius offset, in kilometers. */ get clampedCameraRadius(): number; /** * The height of the camera above the planet surface in kilometers. */ get cameraHeight(): number; /** * The height of the camera above the planet surface, clamped to the planet radius offset, in kilometers. */ get clampedCameraHeight(): number; /** * The camera position in global space kilometers. * * The behavior of this value depends on whether floating origin mode is enabled: * - If floating origin mode is enabled, this is simply the camera's global position scaled to kilometers. The atmosphere's origin height is used to offset the camera position along its geocentric normal. * - If floating origin mode is disabled, the camera's y position is offset by the planet radius plus any origin height. */ get cameraPositionGlobal(): IVector3Like; /** * The camera position, clamped to the planet radius offset, in global space kilometers. * See {@link cameraPositionGlobal} for details on how the value is computed. */ get clampedCameraPositionGlobal(): IVector3Like; /** * The cosine of the angle from the zenith to the horizon of the planet, measured from the camera position. */ get cosCameraHorizonAngleFromZenith(): number; /** * The sine of the angle from the nadir to the horizon of the atmosphere, measured from the camera position. */ get sinCameraAtmosphereHorizonAngleFromNadir(): number; /** * The geocentric normal of the camera in global space i.e., the normalization of {@link cameraPositionGlobal}. * Note the behavior of this value depends on whether floating origin mode is enabled. See {@link cameraPositionGlobal} for details. */ get cameraGeocentricNormal(): IVector3Like; /** * The camera's forward direction in world space. */ get cameraForward(): IVector3Like; /** * The distance to the near plane of the camera. */ get cameraNearPlane(): number; /** * The camera's position in world space. */ get cameraPosition(): IVector3Like; /** * The viewport for the camera. */ get viewport(): IVector4Like; /** * Updates the variables. * @param camera - The camera to update the variables for. * @param planetRadius - The radius of the planet in kilometers. * @param planetRadiusWithOffset - The radius of the planet with the offset in kilometers. * @param atmosphereRadius - The radius of the atmosphere in kilometers. * @param directionToLight - The direction to the light in world space. * @param originHeight - The height of the origin (distance from planet's surface) in kilometers. */ update(camera: Camera, planetRadius: number, planetRadiusWithOffset: number, atmosphereRadius: number, directionToLight: IVector3Like, originHeight: number): void; }