数字孪生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
15 KiB

10 months ago
define(["./when-cbf8cd21","./Check-35e1a91d","./Math-6a1814d8","./Cartesian2-c451a606","./Transforms-e4be2a30","./RuntimeError-f4c64df1","./WebGLConstants-95ceb4e9","./ComponentDatatype-7ee14e67","./GeometryAttribute-6f280ece","./GeometryAttributes-90846c5f","./AttributeCompression-bb3dc748","./GeometryPipeline-21a841db","./EncodedCartesian3-4930ae29","./IndexDatatype-354a5ea3","./IntersectionTests-8371bf29","./Plane-929e0674","./GeometryOffsetAttribute-84f7eff3","./VertexFormat-cc24f342","./GeometryInstance-3fa7d9ab","./arrayRemoveDuplicates-4dfa28d2","./BoundingRectangle-98202e82","./EllipsoidTangentPlane-af8ae194","./ArcType-2b58731c","./EllipsoidRhumbLine-8c93f67a","./PolygonPipeline-8cd894f7","./PolygonGeometryLibrary-b5f313e5","./EllipsoidGeodesic-19b1a191"],function(Y,e,U,j,Q,t,r,q,K,a,o,D,i,L,n,s,Z,v,N,l,u,H,c,p,R,M,y){"use strict";var m=new j.Cartographic,g=new j.Cartographic;function J(e,t,r,a){var o=a.cartesianToCartographic(e,m).height,i=a.cartesianToCartographic(t,g);i.height=o,a.cartographicToCartesian(i,t);var n=a.cartesianToCartographic(r,g);n.height=o-100,a.cartographicToCartesian(n,r)}var S=new u.BoundingRectangle,X=new j.Cartesian3,$=new j.Cartesian3,ee=new j.Cartesian3,te=new j.Cartesian3,re=new j.Cartesian3,ae=new j.Cartesian3,oe=new j.Cartesian3,ie=new j.Cartesian3,ne=new j.Cartesian3,se=new j.Cartesian2,le=new j.Cartesian2,ue=new j.Cartesian3,pe=new Q.Quaternion,ce=new Q.Matrix3,ye=new Q.Matrix3;function B(e){var t=e.vertexFormat,r=e.geometry,a=e.shadowVolume,o=r.attributes.position.values,i=o.length,n=e.wall,s=e.top||n,l=e.bottom||n;if(t.st||t.normal||t.tangent||t.bitangent||a){var u=e.boundingRectangle,p=e.tangentPlane,c=e.ellipsoid,y=e.stRotation,m=e.perPositionHeight,g=se;g.x=u.x,g.y=u.y;var d,h=t.st?new Float32Array(i/3*2):void 0;t.normal&&(d=m&&s&&!n?r.attributes.normal.values:new Float32Array(i));var f=t.tangent?new Float32Array(i):void 0,v=t.bitangent?new Float32Array(i):void 0,b=a?new Float32Array(i):void 0,_=0,P=0,C=$,w=ee,x=te,T=!0,I=ce,A=ye;if(0!==y){var E=Q.Quaternion.fromAxisAngle(p._plane.normal,y,pe);I=Q.Matrix3.fromQuaternion(E,I),E=Q.Quaternion.fromAxisAngle(p._plane.normal,-y,pe),A=Q.Matrix3.fromQuaternion(E,A)}else I=Q.Matrix3.clone(Q.Matrix3.IDENTITY,I),A=Q.Matrix3.clone(Q.Matrix3.IDENTITY,A);var G=0,O=0;s&&l&&(G=i/2,O=i/3,i/=2);for(var V=0;V<i;V+=3){var F=j.Cartesian3.fromArray(o,V,ue);if(t.st){var D=Q.Matrix3.multiplyByVector(I,F,X);D=c.scaleToGeodeticSurface(D,D);var L=p.projectPointOntoPlane(D,le);j.Cartesian2.subtract(L,g,L);var N=U.CesiumMath.clamp(L.x/u.width,0,1),H=U.CesiumMath.clamp(L.y/u.height,0,1);l&&(h[_+O]=N,h[_+1+O]=H),s&&(h[_]=N,h[_+1]=H),_+=2}if(t.normal||t.tangent||t.bitangent||a){var R=P+1,M=P+2;if(n){if(V+3<i){var S=j.Cartesian3.fromArray(o,V+3,re);if(T){var B=j.Cartesian3.fromArray(o,V+i,ae);m&&J(F,S,B,c),j.Cartesian3.subtract(S,F,S),j.Cartesian3.subtract(B,F,B),C=j.Cartesian3.normalize(j.Cartesian3.cross(B,S,C),C),T=!1}j.Cartesian3.equalsEpsilon(S,F,U.CesiumMath.EPSILON10)&&(T=!0)}(t.tangent||t.bitangent)&&(x=c.geodeticSurfaceNormal(F,x),t.tangent&&(w=j.Cartesian3.normalize(j.Cartesian3.cross(x,C,w),w)))}else C=c.geodeticSurfaceNormal(F,C),(t.tangent||t.bitangent)&&(m&&(oe=j.Cartesian3.fromArray(d,P,oe),ie=j.Cartesian3.cross(j.Cartesian3.UNIT_Z,oe,ie),ie=j.Cartesian3.normalize(Q.Matrix3.multiplyByVector(A,ie,ie),ie),t.bitangent&&(ne=j.Cartesian3.normalize(j.Cartesian3.cross(oe,ie,ne),ne))),w=j.Cartesian3.cross(j.Cartesian3.UNIT_Z,C,w),w=j.Cartesian3.normalize(Q.Matrix3.multiplyByVector(A,w,w),w),t.bitangent&&(x=j.Cartesian3.normalize(j.Cartesian3.cross(C,w,x),x)));t.normal&&(e.wall?(d[P+G]=C.x,d[R+G]=C.y,d[M+G]=C.z):l&&(d[P+G]=-C.x,d[R+G]=-C.y,d[M+G]=-C.z),(s&&!m||n)&&(d[P]=C.x,d[R]=C.y,d[M]=C.z)),a&&(n&&(C=c.geodeticSurfaceNormal(F,C)),b[P+G]=-C.x,b[R+G]=-C.y,b[M+G]=-C.z),t.tangent&&(e.wall?(f[P+G]=w.x,f[R+G]=w.y,f[M+G]=w.z):l&&(f[P+G]=-w.x,f[R+G]=-w.y,f[M+G]=-w.z),s&&(m?(f[P]=ie.x,f[R]=ie.y,f[M]=ie.z):(f[P]=w.x,f[R]=w.y,f[M]=w.z))),t.bitangent&&(l&&(v[P+G]=x.x,v[R+G]=x.y,v[M+G]=x.z),s&&(m?(v[P]=ne.x,v[R]=ne.y,v[M]=ne.z):(v[P]=x.x,v[R]=x.y,v[M]=x.z))),P+