/** * 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-8d13db60","./Check-70bec281","./Math-61ede240","./Cartographic-f27b0939","./Cartesian2-09435a6c","./BoundingSphere-c409f092","./Cartesian4-5af5bb24","./RuntimeError-ba10bc3e","./WebGLConstants-4c11ee5f","./ComponentDatatype-5862616f","./GeometryAttribute-2243653a","./PrimitiveType-97893bc7","./FeatureDetection-7bd32c34","./Transforms-1509c877","./buildModuleUrl-392763e2","./GeometryAttributes-aacecde6","./IndexDatatype-9435b55f","./createTaskProcessorWorker","./arrayFill-9766fb2e","./GeometryOffsetAttribute-999fc023","./VertexFormat-fe4db402","./BoxGeometry-92274cfb","./CylinderGeometryLibrary-8c0fda9f","./CylinderGeometry-dc527951","./EllipsoidGeometry-d710e362","./Color-69f1845f"],function(P,e,t,Z,r,q,n,a,i,o,d,s,c,f,l,u,W,h,b,p,y,_,g,N,Y,S){function F(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var x=new Z.Cartesian3,v=q.Matrix4.packedLength+Z.Cartesian3.packedLength,C=q.Matrix4.packedLength+2,m=q.Matrix4.packedLength+Z.Cartesian3.packedLength,I=Z.Cartesian3.packedLength+1,k={modelMatrix:new q.Matrix4,boundingVolume:new q.BoundingSphere};function j(e,t){var r=t*v,n=Z.Cartesian3.unpack(e,r,x);r+=Z.Cartesian3.packedLength;var a=q.Matrix4.unpack(e,r,k.modelMatrix);q.Matrix4.multiplyByScale(a,n,a);var i=k.boundingVolume;return Z.Cartesian3.clone(Z.Cartesian3.ZERO,i.center),i.radius=Math.sqrt(3),k}function z(e,t){var r=t*C,n=e[r++],a=e[r++],i=Z.Cartesian3.fromElements(n,n,a,x),o=q.Matrix4.unpack(e,r,k.modelMatrix);q.Matrix4.multiplyByScale(o,i,o);var d=k.boundingVolume;return Z.Cartesian3.clone(Z.Cartesian3.ZERO,d.center),d.radius=Math.sqrt(2),k}function H(e,t){var r=t*m,n=Z.Cartesian3.unpack(e,r,x);r+=Z.Cartesian3.packedLength;var a=q.Matrix4.unpack(e,r,k.modelMatrix);q.Matrix4.multiplyByScale(a,n,a);var i=k.boundingVolume;return Z.Cartesian3.clone(Z.Cartesian3.ZERO,i.center),i.radius=1,k}function J(e,t){var r=t*I,n=e[r++],a=Z.Cartesian3.unpack(e,r,x),i=q.Matrix4.fromTranslation(a,k.modelMatrix);q.Matrix4.multiplyByUniformScale(i,n,i);var o=k.boundingVolume;return Z.Cartesian3.clone(Z.Cartesian3.ZERO,o.center),o.radius=1,k}var T=new Z.Cartesian3;function K(e,t,r,n,a){if(P.defined(t)){for(var i=r.length,o=n.attributes.position.values,d=n.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,g=e.modelMatrix,x=e.center,v=e.positionOffset,C=e.batchIdIndex,m=e.indexOffset,I=e.batchedIndicesOffset,k=0;k