26 lines
3.7 KiB
JavaScript
26 lines
3.7 KiB
JavaScript
/**
|
|
* @license
|
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
* Version 1.98
|
|
*
|
|
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details.
|
|
*/
|
|
define(["./Matrix2-cf4c6e69","./defaultValue-50f7432c","./EllipseGeometry-698b2523","./VertexFormat-fa0c27e8","./ComponentDatatype-9b23164a","./WebGLConstants-58abc51a","./RuntimeError-48e1f06d","./Transforms-c9e418cb","./combine-8462e002","./EllipseGeometryLibrary-65314113","./GeometryAttribute-b84ffce6","./GeometryAttributes-8bab1b25","./GeometryInstance-a6a77e5a","./GeometryOffsetAttribute-490bc2c9","./GeometryPipeline-9c11a3d1","./AttributeCompression-b4dfdf5f","./EncodedCartesian3-0b8c686b","./IndexDatatype-ceed713e","./IntersectionTests-d662a125","./Plane-b9f0711b"],(function(e,t,i,r,o,n,s,l,a,m,d,c,u,p,y,_,G,x,h,f){"use strict";function g(e){const r=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new i.EllipseGeometry(o),this._workerName="createCircleGeometry"}g.packedLength=i.EllipseGeometry.packedLength,g.pack=function(e,t,r){return i.EllipseGeometry.pack(e._ellipseGeometry,t,r)};const b=new i.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),E={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new r.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return g.unpack=function(o,n,s){const l=i.EllipseGeometry.unpack(o,n,b);return E.center=e.Cartesian3.clone(l._center,E.center),E.ellipsoid=e.Ellipsoid.clone(l._ellipsoid,E.ellipsoid),E.height=l._height,E.extrudedHeight=l._extrudedHeight,E.granularity=l._granularity,E.vertexFormat=r.VertexFormat.clone(l._vertexFormat,E.vertexFormat),E.stRotation=l._stRotation,E.shadowVolume=l._shadowVolume,t.defined(s)?(E.semiMajorAxis=l._semiMajorAxis,E.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new i.EllipseGeometry(E),s):(E.radius=l._semiMajorAxis,new g(E))},g.createGeometry=function(e){return i.EllipseGeometry.createGeometry(e._ellipseGeometry)},g.createShadowVolume=function(e,t,i){const o=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(o,n),l=i(o,n);return new g({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:o,extrudedHeight:s,height:l,vertexFormat:r.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(g.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(i,r){return t.defined(r)&&(i=g.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),g.createGeometry(i)}}));
|