Agriculture-front-end/dist/Cesium/Workers/Cartesian2-47311507.js

2 lines
15 KiB
JavaScript
Raw Normal View History

2023-09-11 21:56:39 +08:00
define(["exports","./Cartographic-3309dd0d","./Check-7b2a090c","./when-b60132fc","./Math-119be1a3"],(function(e,t,a,n,i){"use strict";function r(e,a,r,u){a=n.defaultValue(a,0),r=n.defaultValue(r,0),u=n.defaultValue(u,0),i.CesiumMath.equalsEpsilon(u,6356752.314245179,i.CesiumMath.EPSILON10)&&(i.CesiumMath.Radius=u),e._radii=new t.Cartesian3(a,r,u),e._radiiSquared=new t.Cartesian3(a*a,r*r,u*u),e._radiiToTheFourth=new t.Cartesian3(a*a*a*a,r*r*r*r,u*u*u*u),e._oneOverRadii=new t.Cartesian3(0===a?0:1/a,0===r?0:1/r,0===u?0:1/u),e._oneOverRadiiSquared=new t.Cartesian3(0===a?0:1/(a*a),0===r?0:1/(r*r),0===u?0:1/(u*u)),e._minimumRadius=Math.min(a,r,u),e._maximumRadius=Math.max(a,r,u),e._centerToleranceSquared=i.CesiumMath.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function u(e,t,a){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,r(this,e,t,a)}Object.defineProperties(u.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),u.clone=function(e,a){if(n.defined(e)){var i=e._radii;return n.defined(a)?(t.Cartesian3.clone(i,a._radii),t.Cartesian3.clone(e._radiiSquared,a._radiiSquared),t.Cartesian3.clone(e._radiiToTheFourth,a._radiiToTheFourth),t.Cartesian3.clone(e._oneOverRadii,a._oneOverRadii),t.Cartesian3.clone(e._oneOverRadiiSquared,a._oneOverRadiiSquared),a._minimumRadius=e._minimumRadius,a._maximumRadius=e._maximumRadius,a._centerToleranceSquared=e._centerToleranceSquared,a):new u(i.x,i.y,i.z)}},u.fromCartesian3=function(e,t){return n.defined(t)||(t=new u),n.defined(e)?(r(t,e.x,e.y,e.z),t):t},u.WGS84=Object.freeze(new u(6378137,6378137,i.CesiumMath.Radius)),u.XIAN80=Object.freeze(new u(6378140,6378140,6356755.29)),u.CGCS2000=Object.freeze(new u(6378137,6378137,6356752.31)),u.UNIT_SPHERE=Object.freeze(new u(1,1,1)),u.MOON=Object.freeze(new u(i.CesiumMath.LUNAR_RADIUS,i.CesiumMath.LUNAR_RADIUS,i.CesiumMath.LUNAR_RADIUS)),u.prototype.clone=function(e){return u.clone(this,e)},u.packedLength=t.Cartesian3.packedLength,u.pack=function(e,a,i){return i=n.defaultValue(i,0),t.Cartesian3.pack(e._radii,a,i),a},u.unpack=function(e,a,i){a=n.defaultValue(a,0);var r=t.Cartesian3.unpack(e,a);return u.fromCartesian3(r,i)},u.prototype.geocentricSurfaceNormal=t.Cartesian3.normalize,u.prototype.geodeticSurfaceNormalCartographic=function(e,a){var i=e.longitude,r=e.latitude,u=Math.cos(r),o=u*Math.cos(i),s=u*Math.sin(i),d=Math.sin(r);return n.defined(a)||(a=new t.Cartesian3),a.x=o,a.y=s,a.z=d,t.Cartesian3.normalize(a,a)},u.prototype.geodeticSurfaceNormal=function(e,a){return n.defined(a)||(a=new t.Cartesian3),a=t.Cartesian3.multiplyComponents(e,this._oneOverRadiiSquared,a),t.Cartesian3.normalize(a,a)};var o=new t.Cartesian3,s=new t.Cartesian3;u.prototype.cartographicToCartesian=function(e,a){var i=o,r=s;this.geodeticSurfaceNormalCartographic(e,i),t.Cartesian3.multiplyComponents(this._radiiSquared,i,r);var u=Math.sqrt(t.Cartesian3.dot(i,r));return t.Cartesian3.divideByScalar(r,u,r),t.Cartesian3.multiplyByScalar(i,e.height,i),n.defined(a)||(a=new t.Cartesian3),t.Cartesian3.add(r,i,a)},u.prototype.cartographicArrayToCartesianArray=function(e,t){var a=e.length;n.defined(t)?t.length=a:t=new Array(a);for(var i=0;i<a;i++)t[i]=this.cartographicToCartesian(e[i],t[i]);return t};var d=new t.Cartesian3,h=new t.Cartesian3,c=new t.Cartesian3;function l(e,t,a,i){this.west=n.defaultValue(e,0),this.south=n.defaultValue(t,0),this.east=n.defaultValue(a,0),this.north=n.defaultValue(i,0)}u.prototype.cartesianToCartographic=function(e,a){var r=this.scaleToGeodet