/** * Cesium - https://github.com/CesiumGS/cesium * * Copyright 2011-2020 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/master/LICENSE.md for full licensing details. */ define(["./when-8d13db60","./Check-70bec281","./Math-61ede240","./Cartographic-f27b0939","./Cartesian2-09435a6c","./BoundingSphere-c409f092","./Cartesian4-5af5bb24","./RuntimeError-ba10bc3e","./WebGLConstants-4c11ee5f","./ComponentDatatype-5862616f","./GeometryAttribute-2243653a","./PrimitiveType-97893bc7","./FeatureDetection-7bd32c34","./Transforms-1509c877","./buildModuleUrl-392763e2","./GeometryAttributes-aacecde6","./AttributeCompression-75ce15eb","./GeometryPipeline-8e55e413","./EncodedCartesian3-87cd0c1f","./IndexDatatype-9435b55f","./IntersectionTests-dbfba52c","./Plane-2bcb9154","./VertexFormat-fe4db402","./GeometryInstance-9ddb8c73","./arrayRemoveDuplicates-2869246d","./BoundingRectangle-3d4f3d01","./EllipsoidTangentPlane-9c25b2da","./OrientedBoundingBox-7b25e901","./CoplanarPolygonGeometryLibrary-051a16f8","./ArcType-66bc286a","./EllipsoidRhumbLine-6ca4b1e6","./earcut-2.2.1-b404d9e6","./PolygonPipeline-cc78b34e","./PolygonGeometryLibrary-ec05daff"],function(s,p,V,R,M,I,e,t,a,H,B,O,n,S,r,z,o,w,i,N,l,c,y,A,F,u,d,m,G,g,b,h,Q,L){var j=new R.Cartesian3,E=new u.BoundingRectangle,U=new M.Cartesian2,Y=new M.Cartesian2,T=new R.Cartesian3,k=new R.Cartesian3,D=new R.Cartesian3,_=new R.Cartesian3,q=new R.Cartesian3,J=new R.Cartesian3,W=new S.Quaternion,Z=new I.Matrix3,K=new I.Matrix3,X=new R.Cartesian3;function $(e,t,a,n,r,o,i,l){var s=e.positions,p=Q.PolygonPipeline.triangulate(e.positions2D,e.holes);p.length<3&&(p=[0,1,2]);var c=N.IndexDatatype.createTypedArray(s.length,p.length);c.set(p);var y=Z;if(0!==n){var u=S.Quaternion.fromAxisAngle(o,n,W);if(y=I.Matrix3.fromQuaternion(u,y),t.tangent||t.bitangent){u=S.Quaternion.fromAxisAngle(o,-n,W);var d=I.Matrix3.fromQuaternion(u,K);i=R.Cartesian3.normalize(I.Matrix3.multiplyByVector(d,i,i),i),t.bitangent&&(l=R.Cartesian3.normalize(R.Cartesian3.cross(o,i,l),l))}}else y=I.Matrix3.clone(I.Matrix3.IDENTITY,y);var m=Y;t.st&&(m.x=a.x,m.y=a.y);for(var g=s.length,b=3*g,h=new Float64Array(b),v=t.normal?new Float32Array(b):void 0,f=t.tangent?new Float32Array(b):void 0,C=t.bitangent?new Float32Array(b):void 0,x=t.st?new Float32Array(2*g):void 0,P=0,w=0,A=0,F=0,G=0,L=0;L