/** * 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","./VertexFormat-b4c6d1c2","./GeometryInstance-8132300c","./arrayRemoveDuplicates-1efed288","./BoundingRectangle-4f0d0f6e","./EllipsoidTangentPlane-9b89fc6c","./OrientedBoundingBox-02ee9dcd","./CoplanarPolygonGeometryLibrary-ec40338d","./ArcType-c72d871a","./EllipsoidRhumbLine-fb5cc30d","./PolygonPipeline-7e1a6f3b","./PolygonGeometryLibrary-5b8854a5"],function(s,e,t,p,k,R,a,I,n,r,M,H,o,B,i,w,l,O,c,y,u,A,F,m,d,g,G,b,f,z,L){"use strict";var S=new R.Cartesian3,E=new m.BoundingRectangle,N=new R.Cartesian2,Q=new R.Cartesian2,T=new R.Cartesian3,D=new R.Cartesian3,V=new R.Cartesian3,_=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 c=O.IndexDatatype.createTypedArray(s.length,p.length);c.set(p);var y=q;if(0!==n){var u=I.Quaternion.fromAxisAngle(o,n,Y);if(y=I.Matrix3.fromQuaternion(u,y),t.tangent||t.bitangent){u=I.Quaternion.fromAxisAngle(o,-n,Y);var m=I.Matrix3.fromQuaternion(u,J);i=R.Cartesian3.normalize(I.Matrix3.multiplyByVector(m,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 d=Q;t.st&&(d.x=a.x,d.y=a.y);for(var g=s.length,b=3*g,f=new Float64Array(b),v=t.normal?new Float32Array(b):void 0,h=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