qd-changjing/public/static/Build/CesiumUnminified/Workers/createGroundPolylineGeometr...

1 line
127 KiB
Plaintext
Raw Normal View History

2022-07-05 16:56:29 +08:00
{"version":3,"file":"createGroundPolylineGeometry.js","sources":["../../../../Source/Core/GeographicTilingScheme.js","../../../../Source/Core/ApproximateTerrainHeights.js","../../../../Source/Core/GroundPolylineGeometry.js","../../../../Source/WorkersES6/createGroundPolylineGeometry.js"],"sourcesContent":["import Cartesian2 from \"./Cartesian2.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport Ellipsoid from \"./Ellipsoid.js\";\nimport GeographicProjection from \"./GeographicProjection.js\";\nimport CesiumMath from \"./Math.js\";\nimport Rectangle from \"./Rectangle.js\";\n\n/**\n * A tiling scheme for geometry referenced to a simple {@link GeographicProjection} where\n * longitude and latitude are directly mapped to X and Y. This projection is commonly\n * known as geographic, equirectangular, equidistant cylindrical, or plate carrée.\n *\n * @alias GeographicTilingScheme\n * @constructor\n *\n * @param {Object} [options] Object with the following properties:\n * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to\n * the WGS84 ellipsoid.\n * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the tiling scheme.\n * @param {Number} [options.numberOfLevelZeroTilesX=2] The number of tiles in the X direction at level zero of\n * the tile tree.\n * @param {Number} [options.numberOfLevelZeroTilesY=1] The number of tiles in the Y direction at level zero of\n * the tile tree.\n */\nfunction GeographicTilingScheme(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);\n this._rectangle = defaultValue(options.rectangle, Rectangle.MAX_VALUE);\n this._projection = new GeographicProjection(this._ellipsoid);\n this._numberOfLevelZeroTilesX = defaultValue(\n options.numberOfLevelZeroTilesX,\n 2\n );\n this._numberOfLevelZeroTilesY = defaultValue(\n options.numberOfLevelZeroTilesY,\n 1\n );\n}\n\nObject.defineProperties(GeographicTilingScheme.prototype, {\n /**\n * Gets the ellipsoid that is tiled by this tiling scheme.\n * @memberof GeographicTilingScheme.prototype\n * @type {Ellipsoid}\n */\n ellipsoid: {\n get: function () {\n return this._ellipsoid;\n },\n },\n\n /**\n * Gets the rectangle, in radians, covered by this tiling scheme.\n * @memberof GeographicTilingScheme.prototype\n * @type {Rectangle}\n */\n rectangle: {\n get: function () {\n return this._rectangle;\n },\n },\n\n /**\n * Gets the map projection used by this tiling scheme.\n * @memberof GeographicTilingScheme.prototype\n * @type {MapProjection}\n */\n projection: {\n get: function () {\n return this._projection;\n },\n },\n});\n\n/**\n * Gets the total number of tiles in the X direction at a specified level-of-detail.\n *\n * @param {Number} level The level-of-detail.\n * @returns {Number} The number of tiles in the X direction at the given level.\n */\nGeographicTilingScheme.prototype.getNumberOfXTilesAtLevel = function (level) {\n return this._numberOfLevelZeroTilesX << level;\n};\n\n/**\n * Gets the total number of tiles in the Y direction at a specified level-of-detail.\n *\n * @param {Number} level The level-of-detail.\n * @returns {Number} The number of tiles in the Y direction at the given level.\n */\nGeographicTilingScheme.prototype.getNumberOfYTilesAtLevel = function (level) {\n return this._numberOfLevelZeroTilesY << level;\n};\n\n/**\n * Transforms a rectangle specified in geodetic radians to the native coordinate system\n * of this tiling scheme.\n *\n * @param {Rectangle} rectangle The rectangle to transform.\n * @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance\n * should be created.\n * @returns {Rectangle} The specified 'result', or a new object containing the native rectangle if 'result'\n * is undefined.\n */\nGeogra