Agriculture-front-end/public/Cesium/Workers/Matrix3-81054f0f.js

2 lines
23 KiB
JavaScript
Raw Normal View History

2023-04-23 09:41:12 +08:00
define(["exports","./defaultValue-f6d5e6da","./Math-2ce22ee9"],(function(e,t,n){"use strict";function i(e,n,i){this.x=t.defaultValue(e,0),this.y=t.defaultValue(n,0),this.z=t.defaultValue(i,0)}i.fromSpherical=function(e,n){t.defined(n)||(n=new i);const r=e.clock,a=e.cone,o=t.defaultValue(e.magnitude,1),u=o*Math.sin(a);return n.x=u*Math.cos(r),n.y=u*Math.sin(r),n.z=o*Math.cos(a),n},i.fromElements=function(e,n,r,a){return t.defined(a)?(a.x=e,a.y=n,a.z=r,a):new i(e,n,r)},i.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n):new i(e.x,e.y,e.z)},i.fromCartesian4=i.clone,i.packedLength=3,i.pack=function(e,n,i){return i=t.defaultValue(i,0),n[i++]=e.x,n[i++]=e.y,n[i]=e.z,n},i.unpack=function(e,n,r){return n=t.defaultValue(n,0),t.defined(r)||(r=new i),r.x=e[n++],r.y=e[n++],r.z=e[n],r},i.packArray=function(e,n){const r=e.length,a=3*r;t.defined(n)?(Array.isArray(n)||n.length===a)&&n.length!==a&&(n.length=a):n=new Array(a);for(let t=0;t<r;++t)i.pack(e[t],n,3*t);return n},i.unpackArray=function(e,n){const r=e.length;t.defined(n)?n.length=r/3:n=new Array(r/3);for(let t=0;t<r;t+=3){const r=t/3;n[r]=i.unpack(e,t,n[r])}return n},i.fromArray=i.unpack,i.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},i.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},i.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n},i.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n},i.clamp=function(e,t,i,r){const a=n.CesiumMath.clamp(e.x,t.x,i.x),o=n.CesiumMath.clamp(e.y,t.y,i.y),u=n.CesiumMath.clamp(e.z,t.z,i.z);return r.x=a,r.y=o,r.z=u,r},i.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},i.magnitude=function(e){return Math.sqrt(i.magnitudeSquared(e))};const r=new i;i.distance=function(e,t){return i.subtract(e,t,r),i.magnitude(r)},i.distanceSquared=function(e,t){return i.subtract(e,t,r),i.magnitudeSquared(r)},i.normalize=function(e,t){const n=i.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t},i.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},i.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n},i.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n},i.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n},i.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n},i.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},i.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},i.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},i.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};const a=new i;i.lerp=function(e,t,n,r){return i.multiplyByScalar(t,n,a),r=i.multiplyByScalar(e,1-n,r),i.add(a,r,r)};const o=new i,u=new i;i.angleBetween=function(e,t){i.normalize(e,o),i.normalize(t,u);const n=i.dot(o,u),r=i.magnitude(i.cross(o,u,o));return Math.atan2(r,n)};const c=new i;i.mostOrthogonalAxis=function(e,t){const n=i.normalize(e,c);return i.abs(n,n),t=n.x<=n.y?n.x<=n.z?i.clone(i.UNIT_X,t):i.clone(i.UNIT_Z,t):n.y<=n.z?i.clone(i.UNIT_Y,t):i.clone(i.UNIT_Z,t)},i.projectVector=function(e,t,n){const r=i.dot(e,t)/i.dot(t,t);return i.multiplyByScalar(t,r,n)},i.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z},i.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},i.equalsEpsilon=function(e,i,r,a){return e===i||t.defined(e)&&t.defined(i)&&n.CesiumMath.equalsEpsilon(e.x,i.x,r,a)&&n.CesiumMath.equalsEpsilon(e.y,i.y,r,a)&&n.CesiumMath.equalsEpsilon(e.z,i.z,r,a)},i.cross=function(e,t,n){const i=e.x,r=e.y,a=e.z,o=t.x,u=t.y,c=t.z,s=r*c-a*u,d=a*o-i*c,l=i*u-r*o;return n.x=s,n.y=d,n.z=l,n},i.midpoint=function(e,t,n){return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),n.z=.5*(e.z+t.z),n},i.fromDegrees=function(e,t,r,a,o){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),i.fromRadians(e,t,r,a,o)};let s=new i,d=new i;const l=new i(40680631590769,40680631590769,40408299984661.445);i.fromRadian