1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 08:28:36 -05:00
sdrangel/plugins/feature/map/Cesium/Workers/createCircleGeometry.js
2022-02-04 20:41:22 +00:00

2 lines
2.9 KiB
JavaScript

define(["./Matrix2-46444433","./RuntimeError-608565a6","./when-229515d6","./EllipseGeometry-fcbbcbac","./VertexFormat-7272aabd","./ComponentDatatype-692a36d3","./WebGLConstants-f63312fc","./GeometryOffsetAttribute-4f901209","./Transforms-ab7258fe","./combine-35b6d9cb","./EllipseGeometryLibrary-c06dcaf7","./GeometryAttribute-d3bef603","./GeometryAttributes-b253752a","./GeometryInstance-f781740f","./GeometryPipeline-dfaf2218","./AttributeCompression-95366034","./EncodedCartesian3-d9d33966","./IndexDatatype-7c683b18","./IntersectionTests-4cf437d5","./Plane-1f2a7880"],(function(e,t,i,r,o,n,s,l,a,d,m,c,u,p,y,_,G,x,h,f){"use strict";function g(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new r.EllipseGeometry(o),this._workerName="createCircleGeometry"}g.packedLength=r.EllipseGeometry.packedLength,g.pack=function(e,t,i){return r.EllipseGeometry.pack(e._ellipseGeometry,t,i)};const E=new r.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),b={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 o.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return g.unpack=function(t,n,s){const l=r.EllipseGeometry.unpack(t,n,E);return b.center=e.Cartesian3.clone(l._center,b.center),b.ellipsoid=e.Ellipsoid.clone(l._ellipsoid,b.ellipsoid),b.height=l._height,b.extrudedHeight=l._extrudedHeight,b.granularity=l._granularity,b.vertexFormat=o.VertexFormat.clone(l._vertexFormat,b.vertexFormat),b.stRotation=l._stRotation,b.shadowVolume=l._shadowVolume,i.defined(s)?(b.semiMajorAxis=l._semiMajorAxis,b.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new r.EllipseGeometry(b),s):(b.radius=l._semiMajorAxis,new g(b))},g.createGeometry=function(e){return r.EllipseGeometry.createGeometry(e._ellipseGeometry)},g.createShadowVolume=function(e,t,i){const r=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(r,n),l=i(r,n);return new g({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:s,height:l,vertexFormat:o.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(g.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(t,r){return i.defined(r)&&(t=g.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),g.createGeometry(t)}}));