/** * 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 * * 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-2a4f2d00","./Check-e5651467","./freezeObject-a51e076f","./defaultValue-29c9b1af","./Math-7782f09e","./Cartesian2-ba70b51f","./defineProperties-c817531e","./Transforms-5119c07b","./RuntimeError-51c34ab4","./WebGLConstants-90dbfe2f","./ComponentDatatype-418b1c61","./GeometryAttribute-8bc1900e","./when-1faa3867","./GeometryAttributes-f8548d3f","./IndexDatatype-2bcfc06b","./createTaskProcessorWorker","./GeometryOffsetAttribute-fa4e7a11","./VertexFormat-e2e35139","./BoxGeometry-303fc346","./CylinderGeometryLibrary-f35c6b75","./CylinderGeometry-b2227fa7","./EllipsoidGeometry-d739b425","./Color-e0436000"],function(F,e,t,n,r,R,a,P,i,o,s,d,f,c,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),o=P.Matrix4.unpack(e,n,C.modelMatrix);P.Matrix4.multiplyByScale(o,i,o);var s=C.boundingVolume;return R.Cartesian3.clone(R.Cartesian3.ZERO,s.center),s.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 o=C.boundingVolume;return R.Cartesian3.clone(R.Cartesian3.ZERO,o.center),o.radius=1,C}var T=new R.Cartesian3;function Y(e,t,n,r,a){if(F.defined(t)){for(var i=n.length,o=r.attributes.position.values,s=r.indices,d=e.positions,f=e.vertexBatchIds,c=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