/** * 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-60b00257","./Check-4274a1fd","./Math-9d37f659","./Cartesian2-2951f601","./Transforms-53ff6d12","./RuntimeError-027c380a","./WebGLConstants-779bf0bc","./ComponentDatatype-a29c6075","./GeometryAttribute-2f728681","./GeometryAttributes-130e4d69","./AttributeCompression-a0720a96","./GeometryPipeline-7b394c2b","./EncodedCartesian3-c262bebc","./IndexDatatype-527cbd94","./IntersectionTests-57fe18b2","./Plane-df4a621e","./VertexFormat-6af5bab1","./GeometryInstance-9e435e40","./arrayRemoveDuplicates-ac049603","./BoundingRectangle-762cb49e","./EllipsoidTangentPlane-f9b097b8","./OrientedBoundingBox-23288f54","./CoplanarPolygonGeometryLibrary-680f7588","./ArcType-a321d0d9","./EllipsoidRhumbLine-cbcd6a13","./PolygonPipeline-72c6abb2","./PolygonGeometryLibrary-a2bb8196"],function(s,e,V,R,I,t,a,M,H,B,n,w,r,O,o,i,p,A,F,l,y,c,G,m,u,z,L){"use strict";var S=new R.Cartesian3,E=new l.BoundingRectangle,N=new R.Cartesian2,Q=new R.Cartesian2,T=new R.Cartesian3,D=new R.Cartesian3,_=new R.Cartesian3,k=new R.Cartesian3,j=new R.Cartesian3,U=new R.Cartesian3,Y=new I.Quaternion,q=new I.Matrix3,J=new I.Matrix3,W=new R.Cartesian3;function Z(e,t,a,n,r,o,i,l){var s=e.positions,p=z.PolygonPipeline.triangulate(e.positions2D,e.holes);p.length<3&&(p=[0,1,2]);var y=O.IndexDatatype.createTypedArray(s.length,p.length);y.set(p);var c=q;if(0!==n){var m=I.Quaternion.fromAxisAngle(o,n,Y);if(c=I.Matrix3.fromQuaternion(m,c),t.tangent||t.bitangent){m=I.Quaternion.fromAxisAngle(o,-n,Y);var u=I.Matrix3.fromQuaternion(m,J);i=R.Cartesian3.normalize(I.Matrix3.multiplyByVector(u,i,i),i),t.bitangent&&(l=R.Cartesian3.normalize(R.Cartesian3.cross(o,i,l),l))}}else c=I.Matrix3.clone(I.Matrix3.IDENTITY,c);var d=Q;t.st&&(d.x=a.x,d.y=a.y);for(var g=s.length,b=3*g,v=new Float64Array(b),h=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