/** * Cesium - https://github.com/AnalyticalGraphicsInc/cesium * * Copyright 2011-2017 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 * * * 该版本修改了部分代码,主要是汉化、优化功能、添加接口 等 by 火星科技 http://marsgis.cn * 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/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details. */ define(["./defined-b9ff0e39","./Check-e6691f86","./freezeObject-2d5b18ce","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5","./Transforms-a140c8a7","./RuntimeError-d5522ee3","./WebGLConstants-554ddbe2","./ComponentDatatype-569c1e3e","./GeometryAttribute-928dddaf","./when-c208a7cf","./GeometryAttributes-c3465b51","./AttributeCompression-4cb3e905","./GeometryPipeline-7ade6afd","./EncodedCartesian3-e4976669","./IndexDatatype-7119db15","./IntersectionTests-260c9bf6","./Plane-b9a516bb","./GeometryOffsetAttribute-0abfa3f6","./VertexFormat-b4c6d1c2","./GeometryInstance-8132300c","./arrayRemoveDuplicates-1efed288","./BoundingRectangle-4f0d0f6e","./EllipsoidTangentPlane-9b89fc6c","./ArcType-c72d871a","./EllipsoidRhumbLine-fb5cc30d","./PolygonPipeline-7e1a6f3b","./PolygonGeometryLibrary-5b8854a5","./EllipsoidGeodesic-b8e7c0c6"],function(Y,e,t,b,U,j,r,Q,a,o,q,K,i,n,s,D,l,L,u,c,Z,v,N,p,y,H,m,d,R,M,g){"use strict";var h=new j.Cartographic,f=new j.Cartographic;function J(e,t,r,a){var o=a.cartesianToCartographic(e,h).height,i=a.cartesianToCartographic(t,f);i.height=o,a.cartographicToCartesian(i,t);var n=a.cartesianToCartographic(r,f);n.height=o-100,a.cartographicToCartesian(n,r)}var S=new y.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,d=se;d.x=u.x,d.y=u.y;var g,h=t.st?new Float32Array(i/3*2):void 0;t.normal&&(g=m&&s&&!n?r.attributes.normal.values:new Float32Array(i));var f=t.tangent?new Float32Array(i):void 0,b=t.bitangent?new Float32Array(i):void 0,v=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;VC.eastOverIDL-C.westOverIDL&&(o.west=C.westOverIDL,o.east=C.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 T=new j.Cartographic;function I(e,t,r,a){for(var o=e.surfaceDistance,i=Math.ceil(o*t),n=0