/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.98 * * 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-fd3a3f4e","./BoundingRectangle-af4243d8","./Transforms-c9e418cb","./Matrix2-cf4c6e69","./ComponentDatatype-9b23164a","./CoplanarPolygonGeometryLibrary-8aced7d2","./defaultValue-50f7432c","./GeometryAttribute-b84ffce6","./GeometryAttributes-8bab1b25","./GeometryInstance-a6a77e5a","./GeometryPipeline-9c11a3d1","./IndexDatatype-ceed713e","./PolygonGeometryLibrary-7558e2c7","./PolygonPipeline-13f0bfa4","./VertexFormat-fa0c27e8","./combine-8462e002","./RuntimeError-48e1f06d","./WebGLConstants-58abc51a","./OrientedBoundingBox-ac687fc0","./EllipsoidTangentPlane-2597ceda","./AxisAlignedBoundingBox-ae9b3d82","./IntersectionTests-d662a125","./Plane-b9f0711b","./AttributeCompression-b4dfdf5f","./EncodedCartesian3-0b8c686b","./ArcType-24f44850","./EllipsoidRhumbLine-0cc30625"],(function(e,t,n,o,a,r,i,s,l,c,y,p,u,d,m,g,f,b,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,r,c,y,u,m,g,f){const b=e.positions;let C=d.PolygonPipeline.triangulate(e.positions2D,e.holes);C.length<3&&(C=[0,1,2]);const h=p.IndexDatatype.createTypedArray(b.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 a=o.Matrix3.fromQuaternion(e,O);g=o.Cartesian3.normalize(o.Matrix3.multiplyByVector(a,g,g),g),t.bitangent&&(f=o.Cartesian3.normalize(o.Cartesian3.cross(m,g,f),f))}}else x=o.Matrix3.clone(o.Matrix3.IDENTITY,x);const P=T;t.st&&(P.x=r.x,P.y=r.y);const A=b.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