/** * 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-60b00257","./Check-4274a1fd","./Math-9d37f659","./Cartesian2-2951f601","./Transforms-53ff6d12","./RuntimeError-027c380a","./WebGLConstants-779bf0bc","./ComponentDatatype-a29c6075","./GeometryAttribute-2f728681","./GeometryAttributes-130e4d69","./IndexDatatype-527cbd94","./createTaskProcessorWorker","./GeometryOffsetAttribute-8756c94a","./VertexFormat-6af5bab1","./BoxGeometry-d455b6dd","./CylinderGeometryLibrary-4f028ebf","./CylinderGeometry-268e0ea7","./EllipsoidGeometry-a1c1e12f","./Color-9e90e2b0"],function(D,e,t,P,q,n,r,a,i,o,W,d,s,c,_,f,N,Y,S){"use strict";function T(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var l=new P.Cartesian3,u=q.Matrix4.packedLength+P.Cartesian3.packedLength,h=q.Matrix4.packedLength+2,b=q.Matrix4.packedLength+P.Cartesian3.packedLength,p=P.Cartesian3.packedLength+1,y={modelMatrix:new q.Matrix4,boundingVolume:new q.BoundingSphere};function j(e,t){var n=t*u,r=P.Cartesian3.unpack(e,n,l);n+=P.Cartesian3.packedLength;var a=q.Matrix4.unpack(e,n,y.modelMatrix);q.Matrix4.multiplyByScale(a,r,a);var i=y.boundingVolume;return P.Cartesian3.clone(P.Cartesian3.ZERO,i.center),i.radius=Math.sqrt(3),y}function z(e,t){var n=t*h,r=e[n++],a=e[n++],i=P.Cartesian3.fromElements(r,r,a,l),o=q.Matrix4.unpack(e,n,y.modelMatrix);q.Matrix4.multiplyByScale(o,i,o);var d=y.boundingVolume;return P.Cartesian3.clone(P.Cartesian3.ZERO,d.center),d.radius=Math.sqrt(2),y}function H(e,t){var n=t*b,r=P.Cartesian3.unpack(e,n,l);n+=P.Cartesian3.packedLength;var a=q.Matrix4.unpack(e,n,y.modelMatrix);q.Matrix4.multiplyByScale(a,r,a);var i=y.boundingVolume;return P.Cartesian3.clone(P.Cartesian3.ZERO,i.center),i.radius=1,y}function J(e,t){var n=t*p,r=e[n++],a=P.Cartesian3.unpack(e,n,l),i=q.Matrix4.fromTranslation(a,y.modelMatrix);q.Matrix4.multiplyByUniformScale(i,r,i);var o=y.boundingVolume;return P.Cartesian3.clone(P.Cartesian3.ZERO,o.center),o.radius=1,y}var V=new P.Cartesian3;function K(e,t,n,r,a){if(D.defined(t)){for(var i=n.length,o=r.attributes.position.values,d=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