/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.98.1 * * Copyright 2011-2022 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ define(["./arrayRemoveDuplicates-235b23d8","./BoundingRectangle-ef4c3611","./Transforms-a48d25e5","./Matrix2-c339372d","./ComponentDatatype-1b227f17","./CoplanarPolygonGeometryLibrary-85aeca86","./defaultValue-65031fc5","./GeometryAttribute-5db26912","./GeometryAttributes-f9b563d6","./GeometryInstance-ee0e4b25","./GeometryPipeline-7e799ed5","./IndexDatatype-53de8b23","./PolygonGeometryLibrary-fdf44447","./PolygonPipeline-d06990ae","./VertexFormat-2b3ad79f","./combine-96aed74b","./RuntimeError-23f4777c","./WebGLConstants-f5c279b9","./OrientedBoundingBox-59c958d0","./EllipsoidTangentPlane-1f1eb3e6","./AxisAlignedBoundingBox-f07e0e43","./IntersectionTests-87344d12","./Plane-3d182a08","./AttributeCompression-9d180a12","./EncodedCartesian3-4e907eba","./ArcType-84fe1b78","./EllipsoidRhumbLine-0df6bb40"],(function(e,t,n,o,r,a,i,s,l,c,y,p,d,u,m,g,b,f,C,h,x,P,A,L,w,G,F){"use strict";const v=new o.Cartesian3,E=new t.BoundingRectangle,_=new o.Cartesian2,T=new o.Cartesian2,k=new o.Cartesian3,D=new o.Cartesian3,V=new o.Cartesian3,R=new o.Cartesian3,H=new o.Cartesian3,I=new o.Cartesian3,M=new n.Quaternion,B=new o.Matrix3,O=new o.Matrix3,z=new o.Cartesian3;function S(e,t,a,c,y,d,m,g,b){const f=e.positions;let C=u.PolygonPipeline.triangulate(e.positions2D,e.holes);C.length<3&&(C=[0,1,2]);const h=p.IndexDatatype.createTypedArray(f.length,C.length);h.set(C);let x=B;if(0!==c){let e=n.Quaternion.fromAxisAngle(m,c,M);if(x=o.Matrix3.fromQuaternion(e,x),t.tangent||t.bitangent){e=n.Quaternion.fromAxisAngle(m,-c,M);const r=o.Matrix3.fromQuaternion(e,O);g=o.Cartesian3.normalize(o.Matrix3.multiplyByVector(r,g,g),g),t.bitangent&&(b=o.Cartesian3.normalize(o.Cartesian3.cross(m,g,b),b))}}else x=o.Matrix3.clone(o.Matrix3.IDENTITY,x);const P=T;t.st&&(P.x=a.x,P.y=a.y);const A=f.length,L=3*A,w=new Float64Array(L),G=t.normal?new Float32Array(L):void 0,F=t.tangent?new Float32Array(L):void 0,E=t.bitangent?new Float32Array(L):void 0,k=t.st?new Float32Array(2*A):void 0;let D=0,V=0,R=0,H=0,I=0;for(let e=0;e