qa-prevention-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/Matrix4-4c545f70.js

2 lines
31 KiB
JavaScript
Raw Normal View History

2024-01-02 14:12:39 +08:00
define(["exports","./Cartesian3-e0307675","./Check-741c5f3c","./defaultValue-81eec7ed","./Math-e73894ab","./RuntimeError-26acdd3b"],(function(n,t,e,r,a,u){"use strict";function i(n,t,e,a,u,i,o,s,c){this[0]=r.defaultValue(n,0),this[1]=r.defaultValue(a,0),this[2]=r.defaultValue(o,0),this[3]=r.defaultValue(t,0),this[4]=r.defaultValue(u,0),this[5]=r.defaultValue(s,0),this[6]=r.defaultValue(e,0),this[7]=r.defaultValue(i,0),this[8]=r.defaultValue(c,0)}i.packedLength=9,i.pack=function(n,t,e){return e=r.defaultValue(e,0),t[e++]=n[0],t[e++]=n[1],t[e++]=n[2],t[e++]=n[3],t[e++]=n[4],t[e++]=n[5],t[e++]=n[6],t[e++]=n[7],t[e++]=n[8],t},i.unpack=function(n,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new i),e[0]=n[t++],e[1]=n[t++],e[2]=n[t++],e[3]=n[t++],e[4]=n[t++],e[5]=n[t++],e[6]=n[t++],e[7]=n[t++],e[8]=n[t++],e},i.packArray=function(n,t){const e=n.length,a=9*e;r.defined(t)?(Array.isArray(t)||t.length===a)&&t.length!==a&&(t.length=a):t=new Array(a);for(let r=0;r<e;++r)i.pack(n[r],t,9*r);return t},i.unpackArray=function(n,t){const e=n.length;r.defined(t)?t.length=e/9:t=new Array(e/9);for(let r=0;r<e;r+=9){const e=r/9;t[e]=i.unpack(n,r,t[e])}return t},i.clone=function(n,t){if(r.defined(n))return r.defined(t)?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t):new i(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])},i.fromArray=i.unpack,i.fromColumnMajorArray=function(n,t){return i.clone(n,t)},i.fromRowMajorArray=function(n,t){return r.defined(t)?(t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8],t):new i(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])},i.fromQuaternion=function(n,t){const e=n.x*n.x,a=n.x*n.y,u=n.x*n.z,o=n.x*n.w,s=n.y*n.y,c=n.y*n.z,l=n.y*n.w,f=n.z*n.z,y=n.z*n.w,d=n.w*n.w,h=e-s-f+d,m=2*(a-y),x=2*(u+l),w=2*(a+y),z=-e+s-f+d,M=2*(c-o),p=2*(u-l),C=2*(c+o),g=-e-s+f+d;return r.defined(t)?(t[0]=h,t[1]=w,t[2]=p,t[3]=m,t[4]=z,t[5]=C,t[6]=x,t[7]=M,t[8]=g,t):new i(h,m,x,w,z,M,p,C,g)},i.fromHeadingPitchRoll=function(n,t){const e=Math.cos(-n.pitch),a=Math.cos(-n.heading),u=Math.cos(n.roll),o=Math.sin(-n.pitch),s=Math.sin(-n.heading),c=Math.sin(n.roll),l=e*a,f=-u*s+c*o*a,y=c*s+u*o*a,d=e*s,h=u*a+c*o*s,m=-c*a+u*o*s,x=-o,w=c*e,z=u*e;return r.defined(t)?(t[0]=l,t[1]=d,t[2]=x,t[3]=f,t[4]=h,t[5]=w,t[6]=y,t[7]=m,t[8]=z,t):new i(l,f,y,d,h,m,x,w,z)},i.fromScale=function(n,t){return r.defined(t)?(t[0]=n.x,t[1]=0,t[2]=0,t[3]=0,t[4]=n.y,t[5]=0,t[6]=0,t[7]=0,t[8]=n.z,t):new i(n.x,0,0,0,n.y,0,0,0,n.z)},i.fromUniformScale=function(n,t){return r.defined(t)?(t[0]=n,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=n,t):new i(n,0,0,0,n,0,0,0,n)},i.fromCrossProduct=function(n,t){return r.defined(t)?(t[0]=0,t[1]=n.z,t[2]=-n.y,t[3]=-n.z,t[4]=0,t[5]=n.x,t[6]=n.y,t[7]=-n.x,t[8]=0,t):new i(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)},i.fromRotationX=function(n,t){const e=Math.cos(n),a=Math.sin(n);return r.defined(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=a,t[6]=0,t[7]=-a,t[8]=e,t):new i(1,0,0,0,e,-a,0,a,e)},i.fromRotationY=function(n,t){const e=Math.cos(n),a=Math.sin(n);return r.defined(t)?(t[0]=e,t[1]=0,t[2]=-a,t[3]=0,t[4]=1,t[5]=0,t[6]=a,t[7]=0,t[8]=e,t):new i(e,0,a,0,1,0,-a,0,e)},i.fromRotationZ=function(n,t){const e=Math.cos(n),a=Math.sin(n);return r.defined(t)?(t[0]=e,t[1]=a,t[2]=0,t[3]=-a,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new i(e,-a,0,a,e,0,0,0,1)},i.toArray=function(n,t){return r.defined(t)?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]},i.getElementIndex=function(n,t){return 3*n+t},i.getColumn=function(n,t,e){const r=3*t,a=n[r],u=n[r+1],i=n[r+2];return e.x=a,e.y=u,e.z=i,e},i.setColumn=function(n,t,e,r){const a=3*t;return(r=i.clone(n,r))[a]=e.x,r[a+1]=e.y,r[a+2]=e.z,r},i.getRow=function(n,t,e){const r=n[t],a=n[t+3],u=n[t+6];return e.x=r,e.y=a,e.z=u,e},i.setRow=function(n,t,e,r){return(r=i.clone(n,r))[t]=e.x,r[t+3]=e.y,r[t+6]=e.z,r};const o=new t.Cartesian3;i.setScale=function(n,t,e){const r=i.getScale(n,o),a=t.x/r.x,u=t.y/r.y,s=t.z/r.z;return e[0]=n[0]*a,e[1]=n[1]*a,e[2]=n[2]*