/** * 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-a55a8a4c","./Check-bc1d37d9","./Math-73a8bd13","./Cartesian2-8c9f79ed","./Transforms-7a81c8c2","./RuntimeError-7c184ac0","./WebGLConstants-4c11ee5f","./ComponentDatatype-c2c50230","./GeometryAttribute-f9641809","./GeometryAttributes-1c7ce91d","./AttributeCompression-fbcb3321","./GeometryPipeline-24d3be03","./EncodedCartesian3-11d9c783","./IndexDatatype-486e7786","./IntersectionTests-3bb891b7","./Plane-a6a20716","./GeometryOffsetAttribute-9ecab91f","./VertexFormat-e1477d0a","./GeometryInstance-08f0b75f","./arrayRemoveDuplicates-9c727c83","./BoundingRectangle-e13a8907","./EllipsoidTangentPlane-7f2f6dd6","./ArcType-66bc286a","./EllipsoidRhumbLine-cddfa697","./PolygonPipeline-c12287cd","./PolygonGeometryLibrary-d8e15d2e","./EllipsoidGeodesic-4c7a7786"],function(Y,e,U,j,Q,t,r,q,K,a,o,D,i,L,n,s,Z,v,N,l,u,H,p,c,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,ce=new Q.Quaternion,pe=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,c=e.tangentPlane,p=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=pe,A=ye;if(0!==y){var E=Q.Quaternion.fromAxisAngle(c._plane.normal,y,ce);I=Q.Matrix3.fromQuaternion(E,I),E=Q.Quaternion.fromAxisAngle(c._plane.normal,-y,ce),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;Vf.eastOverIDL-f.westOverIDL&&(o.west=f.westOverIDL,o.east=f.eastOverIDL,o.east>U.CesiumMath.PI&&(o.east=o.east-U.CesiumMath.TWO_PI),o.west>U.CesiumMath.PI&&(o.west=o.west-U.CesiumMath.TWO_PI)),o}var P=new j.Cartographic;function C(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=0