{"version":3,"file":"TerrainEncoding-82b55fe0.js","sources":["../../../../Source/Core/EllipsoidalOccluder.js","../../../../Source/Core/TerrainExaggeration.js","../../../../Source/Core/TerrainQuantization.js","../../../../Source/Core/TerrainEncoding.js"],"sourcesContent":["import BoundingSphere from \"./BoundingSphere.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport Ellipsoid from \"./Ellipsoid.js\";\nimport Rectangle from \"./Rectangle.js\";\n\n/**\n * Determine whether or not other objects are visible or hidden behind the visible horizon defined by\n * an {@link Ellipsoid} and a camera position. The ellipsoid is assumed to be located at the\n * origin of the coordinate system. This class uses the algorithm described in the\n * {@link https://cesium.com/blog/2013/04/25/Horizon-culling/|Horizon Culling} blog post.\n *\n * @alias EllipsoidalOccluder\n *\n * @param {Ellipsoid} ellipsoid The ellipsoid to use as an occluder.\n * @param {Cartesian3} [cameraPosition] The coordinate of the viewer/camera. If this parameter is not\n * specified, {@link EllipsoidalOccluder#cameraPosition} must be called before\n * testing visibility.\n *\n * @constructor\n *\n * @example\n * // Construct an ellipsoidal occluder with radii 1.0, 1.1, and 0.9.\n * const cameraPosition = new Cesium.Cartesian3(5.0, 6.0, 7.0);\n * const occluderEllipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);\n * const occluder = new Cesium.EllipsoidalOccluder(occluderEllipsoid, cameraPosition);\n *\n * @private\n */\nfunction EllipsoidalOccluder(ellipsoid, cameraPosition) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"ellipsoid\", ellipsoid);\n //>>includeEnd('debug');\n\n this._ellipsoid = ellipsoid;\n this._cameraPosition = new Cartesian3();\n this._cameraPositionInScaledSpace = new Cartesian3();\n this._distanceToLimbInScaledSpaceSquared = 0.0;\n\n // cameraPosition fills in the above values\n if (defined(cameraPosition)) {\n this.cameraPosition = cameraPosition;\n }\n}\n\nObject.defineProperties(EllipsoidalOccluder.prototype, {\n /**\n * Gets the occluding ellipsoid.\n * @memberof EllipsoidalOccluder.prototype\n * @type {Ellipsoid}\n */\n ellipsoid: {\n get: function () {\n return this._ellipsoid;\n },\n },\n /**\n * Gets or sets the position of the camera.\n * @memberof EllipsoidalOccluder.prototype\n * @type {Cartesian3}\n */\n cameraPosition: {\n get: function () {\n return this._cameraPosition;\n },\n set: function (cameraPosition) {\n // See https://cesium.com/blog/2013/04/25/Horizon-culling/\n const ellipsoid = this._ellipsoid;\n const cv = ellipsoid.transformPositionToScaledSpace(\n cameraPosition,\n this._cameraPositionInScaledSpace\n );\n const vhMagnitudeSquared = Cartesian3.magnitudeSquared(cv) - 1.0;\n\n Cartesian3.clone(cameraPosition, this._cameraPosition);\n this._cameraPositionInScaledSpace = cv;\n this._distanceToLimbInScaledSpaceSquared = vhMagnitudeSquared;\n },\n },\n});\n\nconst scratchCartesian = new Cartesian3();\n\n/**\n * Determines whether or not a point, the occludee
, is hidden from view by the occluder.\n *\n * @param {Cartesian3} occludee The point to test for visibility.\n * @returns {Boolean} true
if the occludee is visible; otherwise false
.\n *\n * @example\n * const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);\n * const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);\n * const occluder = new Cesium.EllipsoidalOccluder(ellipsoid, cameraPosition);\n * const point = new Cesium.Cartesian3(0, -3, -3);\n * occluder.isPointVisible(point); //returns true\n */\nEllipsoidalOccluder.prototype.isPointVisible = function (occludee) {\n const ellipsoid = this._ellipsoid;\n const occludeeScaledSpacePosition = ellipsoid.transformPositionToScaledSpace(\n occludee,\n scratchCartesian\n );\n return isScaledSpacePointVisible(\n occludeeScaledSpacePosition,\n this._cameraPositionInScaledSpace,\n this._distanceToLimbInScaledSpaceSquared\n );\n};\n\n/**\n * Determines whether or not a point expressed in the ellipsoid scaled space, is hidden from view by the\n * occluder. To transform a Cartesian X, Y, Z position in the coordinate system aligned with the ellipsoid\n * into the scaled space, call {@link Ellipsoid#transformPositionToScaledSpace}.\n *\n * @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space.\n * @returns {Boolean} true
if the occludee is visible; otherwise false
.\n *\n * @example\n * const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);\n * const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);\n * const occluder = new Cesium.EllipsoidalOccluder(ellipsoid, cameraPosition);\n * const point = new Cesium.Cartesian3(0, -3, -3);\n * const scaledSpacePoint = ellipsoid.transformPositionToScaledSpace(point);\n * occluder.isScaledSpacePointVisible(scaledSpacePoint); //returns true\n */\nEllipsoidalOccluder.prototype.isScaledSpacePointVisible = function (\n occludeeScaledSpacePosition\n) {\n return isScaledSpacePointVisible(\n occludeeScaledSpacePosition,\n this._cameraPositionInScaledSpace,\n this._distanceToLimbInScaledSpaceSquared\n );\n};\n\nconst scratchCameraPositionInScaledSpaceShrunk = new Cartesian3();\n\n/**\n * Similar to {@link EllipsoidalOccluder#isScaledSpacePointVisible} except tests against an\n * ellipsoid that has been shrunk by the minimum height when the minimum height is below\n * the ellipsoid. This is intended to be used with points generated by\n * {@link EllipsoidalOccluder#computeHorizonCullingPointPossiblyUnderEllipsoid} or\n * {@link EllipsoidalOccluder#computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid}.\n *\n * @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space of the possibly-shrunk ellipsoid.\n * @returns {Boolean} true
if the occludee is visible; otherwise false
.\n */\nEllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid = function (\n occludeeScaledSpacePosition,\n minimumHeight\n) {\n const ellipsoid = this._ellipsoid;\n let vhMagnitudeSquared;\n let cv;\n\n if (\n defined(minimumHeight) &&\n minimumHeight < 0.0 &&\n ellipsoid.minimumRadius > -minimumHeight\n ) {\n // This code is similar to the cameraPosition setter, but unrolled for performance because it will be called a lot.\n cv = scratchCameraPositionInScaledSpaceShrunk;\n cv.x = this._cameraPosition.x / (ellipsoid.radii.x + minimumHeight);\n cv.y = this._cameraPosition.y / (ellipsoid.radii.y + minimumHeight);\n cv.z = this._cameraPosition.z / (ellipsoid.radii.z + minimumHeight);\n vhMagnitudeSquared = cv.x * cv.x + cv.y * cv.y + cv.z * cv.z - 1.0;\n } else {\n cv = this._cameraPositionInScaledSpace;\n vhMagnitudeSquared = this._distanceToLimbInScaledSpaceSquared;\n }\n\n return isScaledSpacePointVisible(\n occludeeScaledSpacePosition,\n cv,\n vhMagnitudeSquared\n );\n};\n\n/**\n * Computes a point that can be used for horizon culling from a list of positions. If the point is below\n * the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point\n * is expressed in the ellipsoid-scaled space and is suitable for use with\n * {@link EllipsoidalOccluder#isScaledSpacePointVisible}.\n *\n * @param {Cartesian3} directionToPoint The direction that the computed point will lie along.\n * A reasonable direction to use is the direction from the center of the ellipsoid to\n * the center of the bounding sphere computed from the positions. The direction need not\n * be normalized.\n * @param {Cartesian3[]} positions The positions from which to compute the horizon culling point. The positions\n * must be expressed in a reference frame centered at the ellipsoid and aligned with the\n * ellipsoid's axes.\n * @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.\n * @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.\n */\nEllipsoidalOccluder.prototype.computeHorizonCullingPoint = function (\n directionToPoint,\n positions,\n result\n) {\n return computeHorizonCullingPointFromPositions(\n this._ellipsoid,\n directionToPoint,\n positions,\n result\n );\n};\n\nconst scratchEllipsoidShrunk = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE);\n\n/**\n * Similar to {@link EllipsoidalOccluder#computeHorizonCullingPoint} except computes the culling\n * point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below\n * the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable\n * for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.\n *\n * @param {Cartesian3} directionToPoint The direction that the computed point will lie along.\n * A reasonable direction to use is the direction from the center of the ellipsoid to\n * the center of the bounding sphere computed from the positions. The direction need not\n * be normalized.\n * @param {Cartesian3[]} positions The positions from which to compute the horizon culling point. The positions\n * must be expressed in a reference frame centered at the ellipsoid and aligned with the\n * ellipsoid's axes.\n * @param {Number} [minimumHeight] The minimum height of all positions. If this value is undefined, all positions are assumed to be above the ellipsoid.\n * @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.\n * @returns {Cartesian3} The computed horizon culling point, expressed in the possibly-shrunk ellipsoid-scaled space.\n */\nEllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid = function (\n directionToPoint,\n positions,\n minimumHeight,\n result\n) {\n const possiblyShrunkEllipsoid = getPossiblyShrunkEllipsoid(\n this._ellipsoid,\n minimumHeight,\n scratchEllipsoidShrunk\n );\n return computeHorizonCullingPointFromPositions(\n possiblyShrunkEllipsoid,\n directionToPoint,\n positions,\n result\n );\n};\n/**\n * Computes a point that can be used for horizon culling from a list of positions. If the point is below\n * the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point\n * is expressed in the ellipsoid-scaled space and is suitable for use with\n * {@link EllipsoidalOccluder#isScaledSpacePointVisible}.\n *\n * @param {Cartesian3} directionToPoint The direction that the computed point will lie along.\n * A reasonable direction to use is the direction from the center of the ellipsoid to\n * the center of the bounding sphere computed from the positions. The direction need not\n * be normalized.\n * @param {Number[]} vertices The vertices from which to compute the horizon culling point. The positions\n * must be expressed in a reference frame centered at the ellipsoid and aligned with the\n * ellipsoid's axes.\n * @param {Number} [stride=3]\n * @param {Cartesian3} [center=Cartesian3.ZERO]\n * @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.\n * @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.\n */\nEllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function (\n directionToPoint,\n vertices,\n stride,\n center,\n result\n) {\n return computeHorizonCullingPointFromVertices(\n this._ellipsoid,\n directionToPoint,\n vertices,\n stride,\n center,\n result\n );\n};\n\n/**\n * Similar to {@link EllipsoidalOccluder#computeHorizonCullingPointFromVertices} except computes the culling\n * point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below\n * the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable\n * for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.\n *\n * @param {Cartesian3} directionToPoint The direction that the computed point will lie along.\n * A reasonable direction to use is the direction from the center of the ellipsoid to\n * the center of the bounding sphere computed from the positions. The direction need not\n * be normalized.\n * @param {Number[]} vertices The vertices from which to compute the horizon culling point. The positions\n * must be expressed in a reference frame centered at the ellipsoid and aligned with the\n * ellipsoid's axes.\n * @param {Number} [stride=3]\n * @param {Cartesian3} [center=Cartesian3.ZERO]\n * @param {Number} [minimumHeight] The minimum height of all vertices. If this value is undefined, all vertices are assumed to be above the ellipsoid.\n * @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.\n * @returns {Cartesian3} The computed horizon culling point, expressed in the possibly-shrunk ellipsoid-scaled space.\n */\nEllipsoidalOccluder.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid = function (\n directionToPoint,\n vertices,\n stride,\n center,\n minimumHeight,\n result\n) {\n const possiblyShrunkEllipsoid = getPossiblyShrunkEllipsoid(\n this._ellipsoid,\n minimumHeight,\n scratchEllipsoidShrunk\n );\n return computeHorizonCullingPointFromVertices(\n possiblyShrunkEllipsoid,\n directionToPoint,\n vertices,\n stride,\n center,\n result\n );\n};\n\nconst subsampleScratch = [];\n\n/**\n * Computes a point that can be used for horizon culling of a rectangle. If the point is below\n * the horizon, the ellipsoid-conforming rectangle is guaranteed to be below the horizon as well.\n * The returned point is expressed in the ellipsoid-scaled space and is suitable for use with\n * {@link EllipsoidalOccluder#isScaledSpacePointVisible}.\n *\n * @param {Rectangle} rectangle The rectangle for which to compute the horizon culling point.\n * @param {Ellipsoid} ellipsoid The ellipsoid on which the rectangle is defined. This may be different from\n * the ellipsoid used by this instance for occlusion testing.\n * @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.\n * @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.\n */\nEllipsoidalOccluder.prototype.computeHorizonCullingPointFromRectangle = function (\n rectangle,\n ellipsoid,\n result\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"rectangle\", rectangle);\n //>>includeEnd('debug');\n\n const positions = Rectangle.subsample(\n rectangle,\n ellipsoid,\n 0.0,\n subsampleScratch\n );\n const bs = BoundingSphere.fromPoints(positions);\n\n // If the bounding sphere center is too close to the center of the occluder, it doesn't make\n // sense to try to horizon cull it.\n if (Cartesian3.magnitude(bs.center) < 0.1 * ellipsoid.minimumRadius) {\n return undefined;\n }\n\n return this.computeHorizonCullingPoint(bs.center, positions, result);\n};\n\nconst scratchEllipsoidShrunkRadii = new Cartesian3();\n\nfunction getPossiblyShrunkEllipsoid(ellipsoid, minimumHeight, result) {\n if (\n defined(minimumHeight) &&\n minimumHeight < 0.0 &&\n ellipsoid.minimumRadius > -minimumHeight\n ) {\n const ellipsoidShrunkRadii = Cartesian3.fromElements(\n ellipsoid.radii.x + minimumHeight,\n ellipsoid.radii.y + minimumHeight,\n ellipsoid.radii.z + minimumHeight,\n scratchEllipsoidShrunkRadii\n );\n ellipsoid = Ellipsoid.fromCartesian3(ellipsoidShrunkRadii, result);\n }\n return ellipsoid;\n}\n\nfunction computeHorizonCullingPointFromPositions(\n ellipsoid,\n directionToPoint,\n positions,\n result\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"directionToPoint\", directionToPoint);\n Check.defined(\"positions\", positions);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n const scaledSpaceDirectionToPoint = computeScaledSpaceDirectionToPoint(\n ellipsoid,\n directionToPoint\n );\n let resultMagnitude = 0.0;\n\n for (let i = 0, len = positions.length; i < len; ++i) {\n const position = positions[i];\n const candidateMagnitude = computeMagnitude(\n ellipsoid,\n position,\n scaledSpaceDirectionToPoint\n );\n if (candidateMagnitude < 0.0) {\n // all points should face the same direction, but this one doesn't, so return undefined\n return undefined;\n }\n resultMagnitude = Math.max(resultMagnitude, candidateMagnitude);\n }\n\n return magnitudeToPoint(scaledSpaceDirectionToPoint, resultMagnitude, result);\n}\n\nconst positionScratch = new Cartesian3();\n\nfunction computeHorizonCullingPointFromVertices(\n ellipsoid,\n directionToPoint,\n vertices,\n stride,\n center,\n result\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"directionToPoint\", directionToPoint);\n Check.defined(\"vertices\", vertices);\n Check.typeOf.number(\"stride\", stride);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n stride = defaultValue(stride, 3);\n center = defaultValue(center, Cartesian3.ZERO);\n const scaledSpaceDirectionToPoint = computeScaledSpaceDirectionToPoint(\n ellipsoid,\n directionToPoint\n );\n let resultMagnitude = 0.0;\n\n for (let i = 0, len = vertices.length; i < len; i += stride) {\n positionScratch.x = vertices[i] + center.x;\n positionScratch.y = vertices[i + 1] + center.y;\n positionScratch.z = vertices[i + 2] + center.z;\n\n const candidateMagnitude = computeMagnitude(\n ellipsoid,\n positionScratch,\n scaledSpaceDirectionToPoint\n );\n if (candidateMagnitude < 0.0) {\n // all points should face the same direction, but this one doesn't, so return undefined\n return undefined;\n }\n resultMagnitude = Math.max(resultMagnitude, candidateMagnitude);\n }\n\n return magnitudeToPoint(scaledSpaceDirectionToPoint, resultMagnitude, result);\n}\n\nfunction isScaledSpacePointVisible(\n occludeeScaledSpacePosition,\n cameraPositionInScaledSpace,\n distanceToLimbInScaledSpaceSquared\n) {\n // See https://cesium.com/blog/2013/04/25/Horizon-culling/\n const cv = cameraPositionInScaledSpace;\n const vhMagnitudeSquared = distanceToLimbInScaledSpaceSquared;\n const vt = Cartesian3.subtract(\n occludeeScaledSpacePosition,\n cv,\n scratchCartesian\n );\n const vtDotVc = -Cartesian3.dot(vt, cv);\n // If vhMagnitudeSquared < 0 then we are below the surface of the ellipsoid and\n // in this case, set the culling plane to be on V.\n const isOccluded =\n vhMagnitudeSquared < 0\n ? vtDotVc > 0\n : vtDotVc > vhMagnitudeSquared &&\n (vtDotVc * vtDotVc) / Cartesian3.magnitudeSquared(vt) >\n vhMagnitudeSquared;\n return !isOccluded;\n}\n\nconst scaledSpaceScratch = new Cartesian3();\nconst directionScratch = new Cartesian3();\n\nfunction computeMagnitude(ellipsoid, position, scaledSpaceDirectionToPoint) {\n const scaledSpacePosition = ellipsoid.transformPositionToScaledSpace(\n position,\n scaledSpaceScratch\n );\n let magnitudeSquared = Cartesian3.magnitudeSquared(scaledSpacePosition);\n let magnitude = Math.sqrt(magnitudeSquared);\n const direction = Cartesian3.divideByScalar(\n scaledSpacePosition,\n magnitude,\n directionScratch\n );\n\n // For the purpose of this computation, points below the ellipsoid are consider to be on it instead.\n magnitudeSquared = Math.max(1.0, magnitudeSquared);\n magnitude = Math.max(1.0, magnitude);\n\n const cosAlpha = Cartesian3.dot(direction, scaledSpaceDirectionToPoint);\n const sinAlpha = Cartesian3.magnitude(\n Cartesian3.cross(direction, scaledSpaceDirectionToPoint, direction)\n );\n const cosBeta = 1.0 / magnitude;\n const sinBeta = Math.sqrt(magnitudeSquared - 1.0) * cosBeta;\n\n return 1.0 / (cosAlpha * cosBeta - sinAlpha * sinBeta);\n}\n\nfunction magnitudeToPoint(\n scaledSpaceDirectionToPoint,\n resultMagnitude,\n result\n) {\n // The horizon culling point is undefined if there were no positions from which to compute it,\n // the directionToPoint is pointing opposite all of the positions, or if we computed NaN or infinity.\n if (\n resultMagnitude <= 0.0 ||\n resultMagnitude === 1.0 / 0.0 ||\n resultMagnitude !== resultMagnitude\n ) {\n return undefined;\n }\n\n return Cartesian3.multiplyByScalar(\n scaledSpaceDirectionToPoint,\n resultMagnitude,\n result\n );\n}\n\nconst directionToPointScratch = new Cartesian3();\n\nfunction computeScaledSpaceDirectionToPoint(ellipsoid, directionToPoint) {\n if (Cartesian3.equals(directionToPoint, Cartesian3.ZERO)) {\n return directionToPoint;\n }\n\n ellipsoid.transformPositionToScaledSpace(\n directionToPoint,\n directionToPointScratch\n );\n return Cartesian3.normalize(directionToPointScratch, directionToPointScratch);\n}\nexport default EllipsoidalOccluder;\n","import Cartesian3 from \"./Cartesian3.js\";\n\n/**\n * @private\n */\nconst TerrainExaggeration = {};\n\n/**\n * Scales a height relative to an offset.\n *\n * @param {Number} height The height.\n * @param {Number} scale A scalar used to exaggerate the terrain. If the value is 1.0 there will be no effect.\n * @param {Number} relativeHeight The height relative to which terrain is exaggerated. If the value is 0.0 terrain will be exaggerated relative to the ellipsoid surface.\n */\nTerrainExaggeration.getHeight = function (height, scale, relativeHeight) {\n return (height - relativeHeight) * scale + relativeHeight;\n};\n\nconst scratchCartographic = new Cartesian3();\n\n/**\n * Scales a position by exaggeration.\n */\nTerrainExaggeration.getPosition = function (\n position,\n ellipsoid,\n terrainExaggeration,\n terrainExaggerationRelativeHeight,\n result\n) {\n const cartographic = ellipsoid.cartesianToCartographic(\n position,\n scratchCartographic\n );\n const newHeight = TerrainExaggeration.getHeight(\n cartographic.height,\n terrainExaggeration,\n terrainExaggerationRelativeHeight\n );\n return Cartesian3.fromRadians(\n cartographic.longitude,\n cartographic.latitude,\n newHeight,\n ellipsoid,\n result\n );\n};\n\nexport default TerrainExaggeration;\n","/**\n * This enumerated type is used to determine how the vertices of the terrain mesh are compressed.\n *\n * @enum {Number}\n *\n * @private\n */\nconst TerrainQuantization = {\n /**\n * The vertices are not compressed.\n *\n * @type {Number}\n * @constant\n */\n NONE: 0,\n\n /**\n * The vertices are compressed to 12 bits.\n *\n * @type {Number}\n * @constant\n */\n BITS12: 1,\n};\nexport default Object.freeze(TerrainQuantization);\n","import AttributeCompression from \"./AttributeCompression.js\";\nimport Cartesian2 from \"./Cartesian2.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport ComponentDatatype from \"./ComponentDatatype.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix4 from \"./Matrix4.js\";\nimport TerrainExaggeration from \"./TerrainExaggeration.js\";\nimport TerrainQuantization from \"./TerrainQuantization.js\";\n\nconst cartesian3Scratch = new Cartesian3();\nconst cartesian3DimScratch = new Cartesian3();\nconst cartesian2Scratch = new Cartesian2();\nconst matrix4Scratch = new Matrix4();\nconst matrix4Scratch2 = new Matrix4();\n\nconst SHIFT_LEFT_12 = Math.pow(2.0, 12.0);\n\n/**\n * Data used to quantize and pack the terrain mesh. The position can be unpacked for picking and all attributes\n * are unpacked in the vertex shader.\n *\n * @alias TerrainEncoding\n * @constructor\n *\n * @param {Cartesian3} center The center point of the vertices.\n * @param {AxisAlignedBoundingBox} axisAlignedBoundingBox The bounds of the tile in the east-north-up coordinates at the tiles center.\n * @param {Number} minimumHeight The minimum height.\n * @param {Number} maximumHeight The maximum height.\n * @param {Matrix4} fromENU The east-north-up to fixed frame matrix at the center of the terrain mesh.\n * @param {Boolean} hasVertexNormals If the mesh has vertex normals.\n * @param {Boolean} [hasWebMercatorT=false] true if the terrain data includes a Web Mercator texture coordinate; otherwise, false.\n * @param {Boolean} [hasGeodeticSurfaceNormals=false] true if the terrain data includes geodetic surface normals; otherwise, false.\n * @param {Number} [exaggeration=1.0] A scalar used to exaggerate terrain.\n * @param {Number} [exaggerationRelativeHeight=0.0] The relative height from which terrain is exaggerated.\n *\n * @private\n */\nfunction TerrainEncoding(\n center,\n axisAlignedBoundingBox,\n minimumHeight,\n maximumHeight,\n fromENU,\n hasVertexNormals,\n hasWebMercatorT,\n hasGeodeticSurfaceNormals,\n exaggeration,\n exaggerationRelativeHeight\n) {\n let quantization = TerrainQuantization.NONE;\n let toENU;\n let matrix;\n\n if (\n defined(axisAlignedBoundingBox) &&\n defined(minimumHeight) &&\n defined(maximumHeight) &&\n defined(fromENU)\n ) {\n const minimum = axisAlignedBoundingBox.minimum;\n const maximum = axisAlignedBoundingBox.maximum;\n\n const dimensions = Cartesian3.subtract(\n maximum,\n minimum,\n cartesian3DimScratch\n );\n const hDim = maximumHeight - minimumHeight;\n const maxDim = Math.max(Cartesian3.maximumComponent(dimensions), hDim);\n\n if (maxDim < SHIFT_LEFT_12 - 1.0) {\n quantization = TerrainQuantization.BITS12;\n } else {\n quantization = TerrainQuantization.NONE;\n }\n\n toENU = Matrix4.inverseTransformation(fromENU, new Matrix4());\n\n const translation = Cartesian3.negate(minimum, cartesian3Scratch);\n Matrix4.multiply(\n Matrix4.fromTranslation(translation, matrix4Scratch),\n toENU,\n toENU\n );\n\n const scale = cartesian3Scratch;\n scale.x = 1.0 / dimensions.x;\n scale.y = 1.0 / dimensions.y;\n scale.z = 1.0 / dimensions.z;\n Matrix4.multiply(Matrix4.fromScale(scale, matrix4Scratch), toENU, toENU);\n\n matrix = Matrix4.clone(fromENU);\n Matrix4.setTranslation(matrix, Cartesian3.ZERO, matrix);\n\n fromENU = Matrix4.clone(fromENU, new Matrix4());\n\n const translationMatrix = Matrix4.fromTranslation(minimum, matrix4Scratch);\n const scaleMatrix = Matrix4.fromScale(dimensions, matrix4Scratch2);\n const st = Matrix4.multiply(translationMatrix, scaleMatrix, matrix4Scratch);\n\n Matrix4.multiply(fromENU, st, fromENU);\n Matrix4.multiply(matrix, st, matrix);\n }\n\n /**\n * How the vertices of the mesh were compressed.\n * @type {TerrainQuantization}\n */\n this.quantization = quantization;\n\n /**\n * The minimum height of the tile including the skirts.\n * @type {Number}\n */\n this.minimumHeight = minimumHeight;\n\n /**\n * The maximum height of the tile.\n * @type {Number}\n */\n this.maximumHeight = maximumHeight;\n\n /**\n * The center of the tile.\n * @type {Cartesian3}\n */\n this.center = Cartesian3.clone(center);\n\n /**\n * A matrix that takes a vertex from the tile, transforms it to east-north-up at the center and scales\n * it so each component is in the [0, 1] range.\n * @type {Matrix4}\n */\n this.toScaledENU = toENU;\n\n /**\n * A matrix that restores a vertex transformed with toScaledENU back to the earth fixed reference frame\n * @type {Matrix4}\n */\n this.fromScaledENU = fromENU;\n\n /**\n * The matrix used to decompress the terrain vertices in the shader for RTE rendering.\n * @type {Matrix4}\n */\n this.matrix = matrix;\n\n /**\n * The terrain mesh contains normals.\n * @type {Boolean}\n */\n this.hasVertexNormals = hasVertexNormals;\n\n /**\n * The terrain mesh contains a vertical texture coordinate following the Web Mercator projection.\n * @type {Boolean}\n */\n this.hasWebMercatorT = defaultValue(hasWebMercatorT, false);\n\n /**\n * The terrain mesh contains geodetic surface normals, used for terrain exaggeration.\n * @type {Boolean}\n */\n this.hasGeodeticSurfaceNormals = defaultValue(\n hasGeodeticSurfaceNormals,\n false\n );\n\n /**\n * A scalar used to exaggerate terrain.\n * @type {Number}\n */\n this.exaggeration = defaultValue(exaggeration, 1.0);\n\n /**\n * The relative height from which terrain is exaggerated.\n */\n this.exaggerationRelativeHeight = defaultValue(\n exaggerationRelativeHeight,\n 0.0\n );\n\n /**\n * The number of components in each vertex. This value can differ with different quantizations.\n * @type {Number}\n */\n this.stride = 0;\n\n this._offsetGeodeticSurfaceNormal = 0;\n this._offsetVertexNormal = 0;\n\n // Calculate the stride and offsets declared above\n this._calculateStrideAndOffsets();\n}\n\nTerrainEncoding.prototype.encode = function (\n vertexBuffer,\n bufferIndex,\n position,\n uv,\n height,\n normalToPack,\n webMercatorT,\n geodeticSurfaceNormal\n) {\n const u = uv.x;\n const v = uv.y;\n\n if (this.quantization === TerrainQuantization.BITS12) {\n position = Matrix4.multiplyByPoint(\n this.toScaledENU,\n position,\n cartesian3Scratch\n );\n\n position.x = CesiumMath.clamp(position.x, 0.0, 1.0);\n position.y = CesiumMath.clamp(position.y, 0.0, 1.0);\n position.z = CesiumMath.clamp(position.z, 0.0, 1.0);\n\n const hDim = this.maximumHeight - this.minimumHeight;\n const h = CesiumMath.clamp((height - this.minimumHeight) / hDim, 0.0, 1.0);\n\n Cartesian2.fromElements(position.x, position.y, cartesian2Scratch);\n const compressed0 = AttributeCompression.compressTextureCoordinates(\n cartesian2Scratch\n );\n\n Cartesian2.fromElements(position.z, h, cartesian2Scratch);\n const compressed1 = AttributeCompression.compressTextureCoordinates(\n cartesian2Scratch\n );\n\n Cartesian2.fromElements(u, v, cartesian2Scratch);\n const compressed2 = AttributeCompression.compressTextureCoordinates(\n cartesian2Scratch\n );\n\n vertexBuffer[bufferIndex++] = compressed0;\n vertexBuffer[bufferIndex++] = compressed1;\n vertexBuffer[bufferIndex++] = compressed2;\n\n if (this.hasWebMercatorT) {\n Cartesian2.fromElements(webMercatorT, 0.0, cartesian2Scratch);\n const compressed3 = AttributeCompression.compressTextureCoordinates(\n cartesian2Scratch\n );\n vertexBuffer[bufferIndex++] = compressed3;\n }\n } else {\n Cartesian3.subtract(position, this.center, cartesian3Scratch);\n\n vertexBuffer[bufferIndex++] = cartesian3Scratch.x;\n vertexBuffer[bufferIndex++] = cartesian3Scratch.y;\n vertexBuffer[bufferIndex++] = cartesian3Scratch.z;\n vertexBuffer[bufferIndex++] = height;\n vertexBuffer[bufferIndex++] = u;\n vertexBuffer[bufferIndex++] = v;\n\n if (this.hasWebMercatorT) {\n vertexBuffer[bufferIndex++] = webMercatorT;\n }\n }\n\n if (this.hasVertexNormals) {\n vertexBuffer[bufferIndex++] = AttributeCompression.octPackFloat(\n normalToPack\n );\n }\n\n if (this.hasGeodeticSurfaceNormals) {\n vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.x;\n vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.y;\n vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.z;\n }\n\n return bufferIndex;\n};\n\nconst scratchPosition = new Cartesian3();\nconst scratchGeodeticSurfaceNormal = new Cartesian3();\n\nTerrainEncoding.prototype.addGeodeticSurfaceNormals = function (\n oldBuffer,\n newBuffer,\n ellipsoid\n) {\n if (this.hasGeodeticSurfaceNormals) {\n return;\n }\n\n const oldStride = this.stride;\n const vertexCount = oldBuffer.length / oldStride;\n this.hasGeodeticSurfaceNormals = true;\n this._calculateStrideAndOffsets();\n const newStride = this.stride;\n\n for (let index = 0; index < vertexCount; index++) {\n for (let offset = 0; offset < oldStride; offset++) {\n const oldIndex = index * oldStride + offset;\n const newIndex = index * newStride + offset;\n newBuffer[newIndex] = oldBuffer[oldIndex];\n }\n const position = this.decodePosition(newBuffer, index, scratchPosition);\n const geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(\n position,\n scratchGeodeticSurfaceNormal\n );\n\n const bufferIndex = index * newStride + this._offsetGeodeticSurfaceNormal;\n newBuffer[bufferIndex] = geodeticSurfaceNormal.x;\n newBuffer[bufferIndex + 1] = geodeticSurfaceNormal.y;\n newBuffer[bufferIndex + 2] = geodeticSurfaceNormal.z;\n }\n};\n\nTerrainEncoding.prototype.removeGeodeticSurfaceNormals = function (\n oldBuffer,\n newBuffer\n) {\n if (!this.hasGeodeticSurfaceNormals) {\n return;\n }\n\n const oldStride = this.stride;\n const vertexCount = oldBuffer.length / oldStride;\n this.hasGeodeticSurfaceNormals = false;\n this._calculateStrideAndOffsets();\n const newStride = this.stride;\n\n for (let index = 0; index < vertexCount; index++) {\n for (let offset = 0; offset < newStride; offset++) {\n const oldIndex = index * oldStride + offset;\n const newIndex = index * newStride + offset;\n newBuffer[newIndex] = oldBuffer[oldIndex];\n }\n }\n};\n\nTerrainEncoding.prototype.decodePosition = function (buffer, index, result) {\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n index *= this.stride;\n\n if (this.quantization === TerrainQuantization.BITS12) {\n const xy = AttributeCompression.decompressTextureCoordinates(\n buffer[index],\n cartesian2Scratch\n );\n result.x = xy.x;\n result.y = xy.y;\n\n const zh = AttributeCompression.decompressTextureCoordinates(\n buffer[index + 1],\n cartesian2Scratch\n );\n result.z = zh.x;\n\n return Matrix4.multiplyByPoint(this.fromScaledENU, result, result);\n }\n\n result.x = buffer[index];\n result.y = buffer[index + 1];\n result.z = buffer[index + 2];\n return Cartesian3.add(result, this.center, result);\n};\n\nTerrainEncoding.prototype.getExaggeratedPosition = function (\n buffer,\n index,\n result\n) {\n result = this.decodePosition(buffer, index, result);\n\n const exaggeration = this.exaggeration;\n const exaggerationRelativeHeight = this.exaggerationRelativeHeight;\n const hasExaggeration = exaggeration !== 1.0;\n if (hasExaggeration && this.hasGeodeticSurfaceNormals) {\n const geodeticSurfaceNormal = this.decodeGeodeticSurfaceNormal(\n buffer,\n index,\n scratchGeodeticSurfaceNormal\n );\n const rawHeight = this.decodeHeight(buffer, index);\n const heightDifference =\n TerrainExaggeration.getHeight(\n rawHeight,\n exaggeration,\n exaggerationRelativeHeight\n ) - rawHeight;\n\n // some math is unrolled for better performance\n result.x += geodeticSurfaceNormal.x * heightDifference;\n result.y += geodeticSurfaceNormal.y * heightDifference;\n result.z += geodeticSurfaceNormal.z * heightDifference;\n }\n\n return result;\n};\n\nTerrainEncoding.prototype.decodeTextureCoordinates = function (\n buffer,\n index,\n result\n) {\n if (!defined(result)) {\n result = new Cartesian2();\n }\n\n index *= this.stride;\n\n if (this.quantization === TerrainQuantization.BITS12) {\n return AttributeCompression.decompressTextureCoordinates(\n buffer[index + 2],\n result\n );\n }\n\n return Cartesian2.fromElements(buffer[index + 4], buffer[index + 5], result);\n};\n\nTerrainEncoding.prototype.decodeHeight = function (buffer, index) {\n index *= this.stride;\n\n if (this.quantization === TerrainQuantization.BITS12) {\n const zh = AttributeCompression.decompressTextureCoordinates(\n buffer[index + 1],\n cartesian2Scratch\n );\n return (\n zh.y * (this.maximumHeight - this.minimumHeight) + this.minimumHeight\n );\n }\n\n return buffer[index + 3];\n};\n\nTerrainEncoding.prototype.decodeWebMercatorT = function (buffer, index) {\n index *= this.stride;\n\n if (this.quantization === TerrainQuantization.BITS12) {\n return AttributeCompression.decompressTextureCoordinates(\n buffer[index + 3],\n cartesian2Scratch\n ).x;\n }\n\n return buffer[index + 6];\n};\n\nTerrainEncoding.prototype.getOctEncodedNormal = function (\n buffer,\n index,\n result\n) {\n index = index * this.stride + this._offsetVertexNormal;\n\n const temp = buffer[index] / 256.0;\n const x = Math.floor(temp);\n const y = (temp - x) * 256.0;\n\n return Cartesian2.fromElements(x, y, result);\n};\n\nTerrainEncoding.prototype.decodeGeodeticSurfaceNormal = function (\n buffer,\n index,\n result\n) {\n index = index * this.stride + this._offsetGeodeticSurfaceNormal;\n\n result.x = buffer[index];\n result.y = buffer[index + 1];\n result.z = buffer[index + 2];\n return result;\n};\n\nTerrainEncoding.prototype._calculateStrideAndOffsets = function () {\n let vertexStride = 0;\n\n switch (this.quantization) {\n case TerrainQuantization.BITS12:\n vertexStride += 3;\n break;\n default:\n vertexStride += 6;\n }\n if (this.hasWebMercatorT) {\n vertexStride += 1;\n }\n if (this.hasVertexNormals) {\n this._offsetVertexNormal = vertexStride;\n vertexStride += 1;\n }\n if (this.hasGeodeticSurfaceNormals) {\n this._offsetGeodeticSurfaceNormal = vertexStride;\n vertexStride += 3;\n }\n\n this.stride = vertexStride;\n};\n\nconst attributesIndicesNone = {\n position3DAndHeight: 0,\n textureCoordAndEncodedNormals: 1,\n geodeticSurfaceNormal: 2,\n};\nconst attributesIndicesBits12 = {\n compressed0: 0,\n compressed1: 1,\n geodeticSurfaceNormal: 2,\n};\n\nTerrainEncoding.prototype.getAttributes = function (buffer) {\n const datatype = ComponentDatatype.FLOAT;\n const sizeInBytes = ComponentDatatype.getSizeInBytes(datatype);\n const strideInBytes = this.stride * sizeInBytes;\n let offsetInBytes = 0;\n\n const attributes = [];\n function addAttribute(index, componentsPerAttribute) {\n attributes.push({\n index: index,\n vertexBuffer: buffer,\n componentDatatype: datatype,\n componentsPerAttribute: componentsPerAttribute,\n offsetInBytes: offsetInBytes,\n strideInBytes: strideInBytes,\n });\n offsetInBytes += componentsPerAttribute * sizeInBytes;\n }\n\n if (this.quantization === TerrainQuantization.NONE) {\n addAttribute(attributesIndicesNone.position3DAndHeight, 4);\n\n let componentsTexCoordAndNormals = 2;\n componentsTexCoordAndNormals += this.hasWebMercatorT ? 1 : 0;\n componentsTexCoordAndNormals += this.hasVertexNormals ? 1 : 0;\n addAttribute(\n attributesIndicesNone.textureCoordAndEncodedNormals,\n componentsTexCoordAndNormals\n );\n\n if (this.hasGeodeticSurfaceNormals) {\n addAttribute(attributesIndicesNone.geodeticSurfaceNormal, 3);\n }\n } else {\n // When there is no webMercatorT or vertex normals, the attribute only needs 3 components: x/y, z/h, u/v.\n // WebMercatorT and vertex normals each take up one component, so if only one of them is present the first\n // attribute gets a 4th component. If both are present, we need an additional attribute that has 1 component.\n const usingAttribute0Component4 =\n this.hasWebMercatorT || this.hasVertexNormals;\n const usingAttribute1Component1 =\n this.hasWebMercatorT && this.hasVertexNormals;\n addAttribute(\n attributesIndicesBits12.compressed0,\n usingAttribute0Component4 ? 4 : 3\n );\n\n if (usingAttribute1Component1) {\n addAttribute(attributesIndicesBits12.compressed1, 1);\n }\n\n if (this.hasGeodeticSurfaceNormals) {\n addAttribute(attributesIndicesBits12.geodeticSurfaceNormal, 3);\n }\n }\n\n return attributes;\n};\n\nTerrainEncoding.prototype.getAttributeLocations = function () {\n if (this.quantization === TerrainQuantization.NONE) {\n return attributesIndicesNone;\n }\n return attributesIndicesBits12;\n};\n\nTerrainEncoding.clone = function (encoding, result) {\n if (!defined(encoding)) {\n return undefined;\n }\n if (!defined(result)) {\n result = new TerrainEncoding();\n }\n\n result.quantization = encoding.quantization;\n result.minimumHeight = encoding.minimumHeight;\n result.maximumHeight = encoding.maximumHeight;\n result.center = Cartesian3.clone(encoding.center);\n result.toScaledENU = Matrix4.clone(encoding.toScaledENU);\n result.fromScaledENU = Matrix4.clone(encoding.fromScaledENU);\n result.matrix = Matrix4.clone(encoding.matrix);\n result.hasVertexNormals = encoding.hasVertexNormals;\n result.hasWebMercatorT = encoding.hasWebMercatorT;\n result.hasGeodeticSurfaceNormals = encoding.hasGeodeticSurfaceNormals;\n result.exaggeration = encoding.exaggeration;\n result.exaggerationRelativeHeight = encoding.exaggerationRelativeHeight;\n\n result._calculateStrideAndOffsets();\n\n return result;\n};\nexport default TerrainEncoding;\n"],"names":["Check","Cartesian3","defined","Ellipsoid","Rectangle","BoundingSphere","defaultValue","Cartesian2","Matrix4","TerrainQuantization","CesiumMath","AttributeCompression","ComponentDatatype"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAQA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS,mBAAmB,CAAC,SAAS,EAAE,cAAc,EAAE;EACxD;EACA,EAAEA,kBAAK,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;EAC9C;AACA;EACA,EAAE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;EAC9B,EAAE,IAAI,CAAC,eAAe,GAAG,IAAIC,kBAAU,EAAE,CAAC;EAC1C,EAAE,IAAI,CAAC,4BAA4B,GAAG,IAAIA,kBAAU,EAAE,CAAC;EACvD,EAAE,IAAI,CAAC,mCAAmC,GAAG,GAAG,CAAC;AACjD;EACA;EACA,EAAE,IAAIC,YAAO,CAAC,cAAc,CAAC,EAAE;EAC/B,IAAI,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;EACzC,GAAG;EACH,CAAC;AACD;EACA,MAAM,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,SAAS,EAAE;EACvD;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,EAAE;EACb,IAAI,GAAG,EAAE,YAAY;EACrB,MAAM,OAAO,IAAI,CAAC,UAAU,CAAC;EAC7B,KAAK;EACL,GAAG;EACH;EACA;EACA;EACA;EACA;EACA,EAAE,cAAc,EAAE;EAClB,IAAI,GAAG,EAAE,YAAY;EACrB,MAAM,OAAO,IAAI,CAAC,eAAe,CAAC;EAClC,KAAK;EACL,IAAI,GAAG,EAAE,UAAU,cAAc,EAAE;EACnC;EACA,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;EACxC,MAAM,MAAM,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