/** * 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","./IndexDatatype-7119db15","./createTaskProcessorWorker","./GeometryOffsetAttribute-0abfa3f6","./VertexFormat-b4c6d1c2","./BoxGeometry-38ae4e43","./CylinderGeometryLibrary-1a232241","./CylinderGeometry-df222427","./EllipsoidGeometry-2f8d1e66","./Color-38a83dd1"],function(F,e,t,n,r,R,a,P,i,d,o,s,c,f,Z,l,u,h,D,b,q,W,S){"use strict";function V(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var p=new R.Cartesian3,y=P.Matrix4.packedLength+R.Cartesian3.packedLength,x=P.Matrix4.packedLength+2,g=P.Matrix4.packedLength+R.Cartesian3.packedLength,v=R.Cartesian3.packedLength+1,C={modelMatrix:new P.Matrix4,boundingVolume:new P.BoundingSphere};function _(e,t){var n=t*y,r=R.Cartesian3.unpack(e,n,p);n+=R.Cartesian3.packedLength;var a=P.Matrix4.unpack(e,n,C.modelMatrix);P.Matrix4.multiplyByScale(a,r,a);var i=C.boundingVolume;return R.Cartesian3.clone(R.Cartesian3.ZERO,i.center),i.radius=Math.sqrt(3),C}function j(e,t){var n=t*x,r=e[n++],a=e[n++],i=R.Cartesian3.fromElements(r,r,a,p),d=P.Matrix4.unpack(e,n,C.modelMatrix);P.Matrix4.multiplyByScale(d,i,d);var o=C.boundingVolume;return R.Cartesian3.clone(R.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(2),C}function z(e,t){var n=t*g,r=R.Cartesian3.unpack(e,n,p);n+=R.Cartesian3.packedLength;var a=P.Matrix4.unpack(e,n,C.modelMatrix);P.Matrix4.multiplyByScale(a,r,a);var i=C.boundingVolume;return R.Cartesian3.clone(R.Cartesian3.ZERO,i.center),i.radius=1,C}function N(e,t){var n=t*v,r=e[n++],a=R.Cartesian3.unpack(e,n,p),i=P.Matrix4.fromTranslation(a,C.modelMatrix);P.Matrix4.multiplyByUniformScale(i,r,i);var d=C.boundingVolume;return R.Cartesian3.clone(R.Cartesian3.ZERO,d.center),d.radius=1,C}var T=new R.Cartesian3;function Y(e,t,n,r,a){if(F.defined(t)){for(var i=n.length,d=r.attributes.position.values,o=r.indices,s=e.positions,c=e.vertexBatchIds,f=e.indices,l=e.batchIds,u=e.batchTableColors,h=e.batchedIndices,b=e.indexOffsets,p=e.indexCounts,y=e.boundingVolumes,x=e.modelMatrix,g=e.center,v=e.positionOffset,C=e.batchIdIndex,m=e.indexOffset,I=e.batchedIndicesOffset,k=0;k