数字孪生Web 后台dt( digital twin)2.0版本 统一命名格式
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
22 KiB

12 months ago
define(["exports","./when-cbf8cd21","./Check-35e1a91d","./Math-6a1814d8"],function(e,R,i,V){"use strict";function b(e,t,n){this.x=R.defaultValue(e,0),this.y=R.defaultValue(t,0),this.z=R.defaultValue(n,0)}b.fromSpherical=function(e,t){R.defined(t)||(t=new b);var n=e.clock,a=e.cone,r=R.defaultValue(e.magnitude,1),i=r*Math.sin(a);return t.x=i*Math.cos(n),t.y=i*Math.sin(n),t.z=r*Math.cos(a),t},b.fromElements=function(e,t,n,a){return R.defined(a)?(a.x=e,a.y=t,a.z=n,a):new b(e,t,n)},b.fromCartesian4=b.clone=function(e,t){if(R.defined(e))return R.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new b(e.x,e.y,e.z)},b.packedLength=3,b.pack=function(e,t,n){return n=R.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t},b.unpack=function(e,t,n){return t=R.defaultValue(t,0),R.defined(n)||(n=new b),n.x=e[t++],n.y=e[t++],n.z=e[t],n},b.packArray=function(e,t){var n=e.length,a=3*n;if(R.defined(t)){if(!Array.isArray(t)&&t.length!==a)throw new i.DeveloperError("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==a&&(t.length=a)}else t=new Array(a);for(var r=0;r<n;++r)b.pack(e[r],t,3*r);return t},b.unpackArray=function(e,t){var n=e.length;R.defined(t)?t.length=n/3:t=new Array(n/3);for(var a=0;a<n;a+=3){var r=a/3;t[r]=b.unpack(e,a,t[r])}return t},b.fromArray=b.unpack,b.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},b.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},b.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},b.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},b.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},b.magnitude=function(e){return Math.sqrt(b.magnitudeSquared(e))};var n=new b;b.distance=function(e,t){return b.subtract(e,t,n),b.magnitude(n)},b.distanceSquared=function(e,t){return b.subtract(e,t,n),b.magnitudeSquared(n)},b.normalize=function(e,t){var n=b.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t},b.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},b.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},b.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},b.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},b.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},b.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},b.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},b.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},b.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var r=new b;b.lerp=function(e,t,n,a){return b.multiplyByScalar(t,n,r),a=b.multiplyByScalar(e,1-n,a),b.add(r,a,a)};var u=new b,o=new b;b.angleBetween=function(e,t){b.normalize(e,u),b.normalize(t,o);var n=b.dot(u,o),a=b.magnitude(b.cross(u,o,u));return Math.atan2(a,n)};var a=new b;b.mostOrthogonalAxis=function(e,t){var n=b.normalize(e,a);return b.abs(n,n),t=n.x<=n.y?n.x<=n.z?b.clone(b.UNIT_X,t):b.clone(b.UNIT_Z,t):n.y<=n.z?b.clone(b.UNIT_Y,t):b.clone(b.UNIT_Z,t)},b.projectVector=function(e,t,n){var a=b.dot(e,t)/b.dot(t,t);return b.multiplyByScalar(t,a,n)},b.equals=function(e,t){return e===t||R.defined(e)&&R.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},b.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},b.equalsEpsilon=function(e,t,n,a){return e===t||R.defined(e)&&R.defined(t)&&V.CesiumMath.equalsEpsilon(e.x,t.x,n,a)&&V.CesiumMath.equalsEpsilon(e.y,t.y,n,a)&&V.CesiumMath.equalsEpsilon(e.z,t.z,n,a)},b.cross=function(e,t,n){var a=e.x,r=e.y,i=e.z,u=t.x,o=t.y,d=t.z,s=r*d-i*o,h=i*u-a*d,l=a*o-r*u;return n.x=s,n.y=h,n.z=l,n},b.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},b.fromDegrees=function(e,t,n,a,r){return e=V.CesiumMath.toRadians(e),t=V.CesiumMath.toRadians(t),b.fromRadians(e,t,n,a,r)};var d=new b,s=new b,h=new b(40680631590769,40680631590769,40408299984661.445);b.fromRadians=function(e,t,n,a,r){n=R.defaultValue(n,0);var i=R.defined(a)?a.radiiSquar