EllipseGeometryUpdater.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. /*global define*/
  2. define([
  3. '../Core/Color',
  4. '../Core/ColorGeometryInstanceAttribute',
  5. '../Core/defaultValue',
  6. '../Core/defined',
  7. '../Core/defineProperties',
  8. '../Core/destroyObject',
  9. '../Core/DeveloperError',
  10. '../Core/EllipseGeometry',
  11. '../Core/EllipseOutlineGeometry',
  12. '../Core/Event',
  13. '../Core/GeometryInstance',
  14. '../Core/Iso8601',
  15. '../Core/ShowGeometryInstanceAttribute',
  16. '../Scene/MaterialAppearance',
  17. '../Scene/PerInstanceColorAppearance',
  18. '../Scene/Primitive',
  19. './ColorMaterialProperty',
  20. './ConstantProperty',
  21. './MaterialProperty',
  22. './Property'
  23. ], function(
  24. Color,
  25. ColorGeometryInstanceAttribute,
  26. defaultValue,
  27. defined,
  28. defineProperties,
  29. destroyObject,
  30. DeveloperError,
  31. EllipseGeometry,
  32. EllipseOutlineGeometry,
  33. Event,
  34. GeometryInstance,
  35. Iso8601,
  36. ShowGeometryInstanceAttribute,
  37. MaterialAppearance,
  38. PerInstanceColorAppearance,
  39. Primitive,
  40. ColorMaterialProperty,
  41. ConstantProperty,
  42. MaterialProperty,
  43. Property) {
  44. "use strict";
  45. var defaultMaterial = ColorMaterialProperty.fromColor(Color.WHITE);
  46. var defaultShow = new ConstantProperty(true);
  47. var defaultFill = new ConstantProperty(true);
  48. var defaultOutline = new ConstantProperty(false);
  49. var defaultOutlineColor = new ConstantProperty(Color.BLACK);
  50. var scratchColor = new Color();
  51. var GeometryOptions = function(entity) {
  52. this.id = entity;
  53. this.vertexFormat = undefined;
  54. this.center = undefined;
  55. this.semiMajorAxis = undefined;
  56. this.semiMinorAxis = undefined;
  57. this.rotation = undefined;
  58. this.height = undefined;
  59. this.extrudedHeight = undefined;
  60. this.granularity = undefined;
  61. this.stRotation = undefined;
  62. this.numberOfVerticalLines = undefined;
  63. };
  64. /**
  65. * A {@link GeometryUpdater} for ellipses.
  66. * Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
  67. * @alias EllipseGeometryUpdater
  68. * @constructor
  69. *
  70. * @param {Entity} entity The entity containing the geometry to be visualized.
  71. * @param {Scene} scene The scene where visualization is taking place.
  72. */
  73. var EllipseGeometryUpdater = function(entity, scene) {
  74. //>>includeStart('debug', pragmas.debug);
  75. if (!defined(entity)) {
  76. throw new DeveloperError('entity is required');
  77. }
  78. if (!defined(scene)) {
  79. throw new DeveloperError('scene is required');
  80. }
  81. //>>includeEnd('debug');
  82. this._entity = entity;
  83. this._scene = scene;
  84. this._entitySubscription = entity.definitionChanged.addEventListener(EllipseGeometryUpdater.prototype._onEntityPropertyChanged, this);
  85. this._fillEnabled = false;
  86. this._isClosed = false;
  87. this._dynamic = false;
  88. this._outlineEnabled = false;
  89. this._geometryChanged = new Event();
  90. this._showProperty = undefined;
  91. this._materialProperty = undefined;
  92. this._hasConstantOutline = true;
  93. this._showOutlineProperty = undefined;
  94. this._outlineColorProperty = undefined;
  95. this._outlineWidth = 1.0;
  96. this._options = new GeometryOptions(entity);
  97. this._onEntityPropertyChanged(entity, 'ellipse', entity.ellipse, undefined);
  98. };
  99. defineProperties(EllipseGeometryUpdater, {
  100. /**
  101. * Gets the type of Appearance to use for simple color-based geometry.
  102. * @memberof EllipseGeometryUpdater
  103. * @type {Appearance}
  104. */
  105. perInstanceColorAppearanceType : {
  106. value : PerInstanceColorAppearance
  107. },
  108. /**
  109. * Gets the type of Appearance to use for material-based geometry.
  110. * @memberof EllipseGeometryUpdater
  111. * @type {Appearance}
  112. */
  113. materialAppearanceType : {
  114. value : MaterialAppearance
  115. }
  116. });
  117. defineProperties(EllipseGeometryUpdater.prototype, {
  118. /**
  119. * Gets the entity associated with this geometry.
  120. * @memberof EllipseGeometryUpdater.prototype
  121. *
  122. * @type {Entity}
  123. * @readonly
  124. */
  125. entity : {
  126. get : function() {
  127. return this._entity;
  128. }
  129. },
  130. /**
  131. * Gets a value indicating if the geometry has a fill component.
  132. * @memberof EllipseGeometryUpdater.prototype
  133. *
  134. * @type {Boolean}
  135. * @readonly
  136. */
  137. fillEnabled : {
  138. get : function() {
  139. return this._fillEnabled;
  140. }
  141. },
  142. /**
  143. * Gets a value indicating if fill visibility varies with simulation time.
  144. * @memberof EllipseGeometryUpdater.prototype
  145. *
  146. * @type {Boolean}
  147. * @readonly
  148. */
  149. hasConstantFill : {
  150. get : function() {
  151. return !this._fillEnabled ||
  152. (!defined(this._entity.availability) &&
  153. Property.isConstant(this._showProperty) &&
  154. Property.isConstant(this._fillProperty));
  155. }
  156. },
  157. /**
  158. * Gets the material property used to fill the geometry.
  159. * @memberof EllipseGeometryUpdater.prototype
  160. *
  161. * @type {MaterialProperty}
  162. * @readonly
  163. */
  164. fillMaterialProperty : {
  165. get : function() {
  166. return this._materialProperty;
  167. }
  168. },
  169. /**
  170. * Gets a value indicating if the geometry has an outline component.
  171. * @memberof EllipseGeometryUpdater.prototype
  172. *
  173. * @type {Boolean}
  174. * @readonly
  175. */
  176. outlineEnabled : {
  177. get : function() {
  178. return this._outlineEnabled;
  179. }
  180. },
  181. /**
  182. * Gets a value indicating if outline visibility varies with simulation time.
  183. * @memberof EllipseGeometryUpdater.prototype
  184. *
  185. * @type {Boolean}
  186. * @readonly
  187. */
  188. hasConstantOutline : {
  189. get : function() {
  190. return !this._outlineEnabled ||
  191. (!defined(this._entity.availability) &&
  192. Property.isConstant(this._showProperty) &&
  193. Property.isConstant(this._showOutlineProperty));
  194. }
  195. },
  196. /**
  197. * Gets the {@link Color} property for the geometry outline.
  198. * @memberof EllipseGeometryUpdater.prototype
  199. *
  200. * @type {Property}
  201. * @readonly
  202. */
  203. outlineColorProperty : {
  204. get : function() {
  205. return this._outlineColorProperty;
  206. }
  207. },
  208. /**
  209. * Gets the constant with of the geometry outline, in pixels.
  210. * This value is only valid if isDynamic is false.
  211. * @memberof EllipseGeometryUpdater.prototype
  212. *
  213. * @type {Number}
  214. * @readonly
  215. */
  216. outlineWidth : {
  217. get : function() {
  218. return this._outlineWidth;
  219. }
  220. },
  221. /**
  222. * Gets a value indicating if the geometry is time-varying.
  223. * If true, all visualization is delegated to the {@link DynamicGeometryUpdater}
  224. * returned by GeometryUpdater#createDynamicUpdater.
  225. * @memberof EllipseGeometryUpdater.prototype
  226. *
  227. * @type {Boolean}
  228. * @readonly
  229. */
  230. isDynamic : {
  231. get : function() {
  232. return this._dynamic;
  233. }
  234. },
  235. /**
  236. * Gets a value indicating if the geometry is closed.
  237. * This property is only valid for static geometry.
  238. * @memberof EllipseGeometryUpdater.prototype
  239. *
  240. * @type {Boolean}
  241. * @readonly
  242. */
  243. isClosed : {
  244. get : function() {
  245. return this._isClosed;
  246. }
  247. },
  248. /**
  249. * Gets an event that is raised whenever the public properties
  250. * of this updater change.
  251. * @memberof EllipseGeometryUpdater.prototype
  252. *
  253. * @type {Boolean}
  254. * @readonly
  255. */
  256. geometryChanged : {
  257. get : function() {
  258. return this._geometryChanged;
  259. }
  260. }
  261. });
  262. /**
  263. * Checks if the geometry is outlined at the provided time.
  264. *
  265. * @param {JulianDate} time The time for which to retrieve visibility.
  266. * @returns {Boolean} true if geometry is outlined at the provided time, false otherwise.
  267. */
  268. EllipseGeometryUpdater.prototype.isOutlineVisible = function(time) {
  269. var entity = this._entity;
  270. return this._outlineEnabled && entity.isAvailable(time) && this._showProperty.getValue(time) && this._showOutlineProperty.getValue(time);
  271. };
  272. /**
  273. * Checks if the geometry is filled at the provided time.
  274. *
  275. * @param {JulianDate} time The time for which to retrieve visibility.
  276. * @returns {Boolean} true if geometry is filled at the provided time, false otherwise.
  277. */
  278. EllipseGeometryUpdater.prototype.isFilled = function(time) {
  279. var entity = this._entity;
  280. return this._fillEnabled && entity.isAvailable(time) && this._showProperty.getValue(time) && this._fillProperty.getValue(time);
  281. };
  282. /**
  283. * Creates the geometry instance which represents the fill of the geometry.
  284. *
  285. * @param {JulianDate} time The time to use when retrieving initial attribute values.
  286. * @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
  287. *
  288. * @exception {DeveloperError} This instance does not represent a filled geometry.
  289. */
  290. EllipseGeometryUpdater.prototype.createFillGeometryInstance = function(time) {
  291. //>>includeStart('debug', pragmas.debug);
  292. if (!defined(time)) {
  293. throw new DeveloperError('time is required.');
  294. }
  295. if (!this._fillEnabled) {
  296. throw new DeveloperError('This instance does not represent a filled geometry.');
  297. }
  298. //>>includeEnd('debug');
  299. var entity = this._entity;
  300. var isAvailable = entity.isAvailable(time);
  301. var attributes;
  302. var color;
  303. var show = new ShowGeometryInstanceAttribute(isAvailable && this._showProperty.getValue(time) && this._fillProperty.getValue(time));
  304. if (this._materialProperty instanceof ColorMaterialProperty) {
  305. var currentColor = Color.WHITE;
  306. if (defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || isAvailable)) {
  307. currentColor = this._materialProperty.color.getValue(time);
  308. }
  309. color = ColorGeometryInstanceAttribute.fromColor(currentColor);
  310. attributes = {
  311. show : show,
  312. color : color
  313. };
  314. } else {
  315. attributes = {
  316. show : show
  317. };
  318. }
  319. return new GeometryInstance({
  320. id : entity,
  321. geometry : new EllipseGeometry(this._options),
  322. attributes : attributes
  323. });
  324. };
  325. /**
  326. * Creates the geometry instance which represents the outline of the geometry.
  327. *
  328. * @param {JulianDate} time The time to use when retrieving initial attribute values.
  329. * @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
  330. *
  331. * @exception {DeveloperError} This instance does not represent an outlined geometry.
  332. */
  333. EllipseGeometryUpdater.prototype.createOutlineGeometryInstance = function(time) {
  334. //>>includeStart('debug', pragmas.debug);
  335. if (!defined(time)) {
  336. throw new DeveloperError('time is required.');
  337. }
  338. if (!this._outlineEnabled) {
  339. throw new DeveloperError('This instance does not represent an outlined geometry.');
  340. }
  341. //>>includeEnd('debug');
  342. var entity = this._entity;
  343. var isAvailable = entity.isAvailable(time);
  344. var outlineColor = Property.getValueOrDefault(this._outlineColorProperty, time, Color.BLACK);
  345. return new GeometryInstance({
  346. id : entity,
  347. geometry : new EllipseOutlineGeometry(this._options),
  348. attributes : {
  349. show : new ShowGeometryInstanceAttribute(isAvailable && this._showProperty.getValue(time) && this._showOutlineProperty.getValue(time)),
  350. color : ColorGeometryInstanceAttribute.fromColor(outlineColor)
  351. }
  352. });
  353. };
  354. /**
  355. * Returns true if this object was destroyed; otherwise, false.
  356. *
  357. * @returns {Boolean} True if this object was destroyed; otherwise, false.
  358. */
  359. EllipseGeometryUpdater.prototype.isDestroyed = function() {
  360. return false;
  361. };
  362. /**
  363. * Destroys and resources used by the object. Once an object is destroyed, it should not be used.
  364. *
  365. * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
  366. */
  367. EllipseGeometryUpdater.prototype.destroy = function() {
  368. this._entitySubscription();
  369. destroyObject(this);
  370. };
  371. EllipseGeometryUpdater.prototype._onEntityPropertyChanged = function(entity, propertyName, newValue, oldValue) {
  372. if (!(propertyName === 'availability' || propertyName === 'position' || propertyName === 'ellipse')) {
  373. return;
  374. }
  375. var ellipse = this._entity.ellipse;
  376. if (!defined(ellipse)) {
  377. if (this._fillEnabled || this._outlineEnabled) {
  378. this._fillEnabled = false;
  379. this._outlineEnabled = false;
  380. this._geometryChanged.raiseEvent(this);
  381. }
  382. return;
  383. }
  384. var fillProperty = ellipse.fill;
  385. var fillEnabled = defined(fillProperty) && fillProperty.isConstant ? fillProperty.getValue(Iso8601.MINIMUM_VALUE) : true;
  386. var outlineProperty = ellipse.outline;
  387. var outlineEnabled = defined(outlineProperty);
  388. if (outlineEnabled && outlineProperty.isConstant) {
  389. outlineEnabled = outlineProperty.getValue(Iso8601.MINIMUM_VALUE);
  390. }
  391. if (!fillEnabled && !outlineEnabled) {
  392. if (this._fillEnabled || this._outlineEnabled) {
  393. this._fillEnabled = false;
  394. this._outlineEnabled = false;
  395. this._geometryChanged.raiseEvent(this);
  396. }
  397. return;
  398. }
  399. var position = this._entity.position;
  400. var semiMajorAxis = ellipse.semiMajorAxis;
  401. var semiMinorAxis = ellipse.semiMinorAxis;
  402. var show = ellipse.show;
  403. if ((defined(show) && show.isConstant && !show.getValue(Iso8601.MINIMUM_VALUE)) || //
  404. (!defined(position) || !defined(semiMajorAxis) || !defined(semiMinorAxis))) {
  405. if (this._fillEnabled || this._outlineEnabled) {
  406. this._fillEnabled = false;
  407. this._outlineEnabled = false;
  408. this._geometryChanged.raiseEvent(this);
  409. }
  410. return;
  411. }
  412. var material = defaultValue(ellipse.material, defaultMaterial);
  413. var isColorMaterial = material instanceof ColorMaterialProperty;
  414. this._materialProperty = material;
  415. this._fillProperty = defaultValue(fillProperty, defaultFill);
  416. this._showProperty = defaultValue(show, defaultShow);
  417. this._showOutlineProperty = defaultValue(ellipse.outline, defaultOutline);
  418. this._outlineColorProperty = outlineEnabled ? defaultValue(ellipse.outlineColor, defaultOutlineColor) : undefined;
  419. var rotation = ellipse.rotation;
  420. var height = ellipse.height;
  421. var extrudedHeight = ellipse.extrudedHeight;
  422. var granularity = ellipse.granularity;
  423. var stRotation = ellipse.stRotation;
  424. var outlineWidth = ellipse.outlineWidth;
  425. var numberOfVerticalLines = ellipse.numberOfVerticalLines;
  426. this._isClosed = defined(extrudedHeight);
  427. this._fillEnabled = fillEnabled;
  428. this._outlineEnabled = outlineEnabled;
  429. if (!position.isConstant || //
  430. !semiMajorAxis.isConstant || //
  431. !semiMinorAxis.isConstant || //
  432. !Property.isConstant(rotation) || //
  433. !Property.isConstant(height) || //
  434. !Property.isConstant(extrudedHeight) || //
  435. !Property.isConstant(granularity) || //
  436. !Property.isConstant(stRotation) || //
  437. !Property.isConstant(outlineWidth) || //
  438. !Property.isConstant(numberOfVerticalLines)) {
  439. if (!this._dynamic) {
  440. this._dynamic = true;
  441. this._geometryChanged.raiseEvent(this);
  442. }
  443. } else {
  444. var options = this._options;
  445. options.vertexFormat = isColorMaterial ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat;
  446. options.center = position.getValue(Iso8601.MINIMUM_VALUE, options.center);
  447. options.semiMajorAxis = semiMajorAxis.getValue(Iso8601.MINIMUM_VALUE, options.semiMajorAxis);
  448. options.semiMinorAxis = semiMinorAxis.getValue(Iso8601.MINIMUM_VALUE, options.semiMinorAxis);
  449. options.rotation = defined(rotation) ? rotation.getValue(Iso8601.MINIMUM_VALUE) : undefined;
  450. options.height = defined(height) ? height.getValue(Iso8601.MINIMUM_VALUE) : undefined;
  451. options.extrudedHeight = defined(extrudedHeight) ? extrudedHeight.getValue(Iso8601.MINIMUM_VALUE) : undefined;
  452. options.granularity = defined(granularity) ? granularity.getValue(Iso8601.MINIMUM_VALUE) : undefined;
  453. options.stRotation = defined(stRotation) ? stRotation.getValue(Iso8601.MINIMUM_VALUE) : undefined;
  454. options.numberOfVerticalLines = defined(numberOfVerticalLines) ? numberOfVerticalLines.getValue(Iso8601.MINIMUM_VALUE) : undefined;
  455. this._outlineWidth = defined(outlineWidth) ? outlineWidth.getValue(Iso8601.MINIMUM_VALUE) : 1.0;
  456. this._dynamic = false;
  457. this._geometryChanged.raiseEvent(this);
  458. }
  459. };
  460. /**
  461. * Creates the dynamic updater to be used when GeometryUpdater#isDynamic is true.
  462. *
  463. * @param {PrimitiveCollection} primitives The primitive collection to use.
  464. * @returns {DynamicGeometryUpdater} The dynamic updater used to update the geometry each frame.
  465. *
  466. * @exception {DeveloperError} This instance does not represent dynamic geometry.
  467. */
  468. EllipseGeometryUpdater.prototype.createDynamicUpdater = function(primitives) {
  469. //>>includeStart('debug', pragmas.debug);
  470. if (!this._dynamic) {
  471. throw new DeveloperError('This instance does not represent dynamic geometry.');
  472. }
  473. if (!defined(primitives)) {
  474. throw new DeveloperError('primitives is required.');
  475. }
  476. //>>includeEnd('debug');
  477. return new DynamicGeometryUpdater(primitives, this);
  478. };
  479. /**
  480. * @private
  481. */
  482. var DynamicGeometryUpdater = function(primitives, geometryUpdater) {
  483. this._primitives = primitives;
  484. this._primitive = undefined;
  485. this._outlinePrimitive = undefined;
  486. this._geometryUpdater = geometryUpdater;
  487. this._options = new GeometryOptions(geometryUpdater._entity);
  488. };
  489. DynamicGeometryUpdater.prototype.update = function(time) {
  490. //>>includeStart('debug', pragmas.debug);
  491. if (!defined(time)) {
  492. throw new DeveloperError('time is required.');
  493. }
  494. //>>includeEnd('debug');
  495. var primitives = this._primitives;
  496. primitives.removeAndDestroy(this._primitive);
  497. primitives.removeAndDestroy(this._outlinePrimitive);
  498. var geometryUpdater = this._geometryUpdater;
  499. var entity = geometryUpdater._entity;
  500. var ellipse = entity.ellipse;
  501. if (!entity.isAvailable(time) || !Property.getValueOrDefault(ellipse.show, time, true)) {
  502. return;
  503. }
  504. var options = this._options;
  505. var center = Property.getValueOrUndefined(entity.position, time, options.center);
  506. var semiMajorAxis = Property.getValueOrUndefined(ellipse.semiMajorAxis, time);
  507. var semiMinorAxis = Property.getValueOrUndefined(ellipse.semiMinorAxis, time);
  508. if (!defined(center) || !defined(semiMajorAxis) || !defined(semiMinorAxis)) {
  509. return;
  510. }
  511. options.center = center;
  512. options.semiMajorAxis = semiMajorAxis;
  513. options.semiMinorAxis = semiMinorAxis;
  514. options.rotation = Property.getValueOrUndefined(ellipse.rotation, time);
  515. options.height = Property.getValueOrUndefined(ellipse.height, time);
  516. options.extrudedHeight = Property.getValueOrUndefined(ellipse.extrudedHeight, time);
  517. options.granularity = Property.getValueOrUndefined(ellipse.granularity, time);
  518. options.stRotation = Property.getValueOrUndefined(ellipse.stRotation, time);
  519. options.numberOfVerticalLines = Property.getValueOrUndefined(ellipse.numberOfVerticalLines, time);
  520. if (Property.getValueOrDefault(ellipse.fill, time, true)) {
  521. var material = MaterialProperty.getValue(time, geometryUpdater.fillMaterialProperty, this._material);
  522. this._material = material;
  523. var appearance = new MaterialAppearance({
  524. material : material,
  525. translucent : material.isTranslucent(),
  526. closed : defined(options.extrudedHeight)
  527. });
  528. options.vertexFormat = appearance.vertexFormat;
  529. this._primitive = primitives.add(new Primitive({
  530. geometryInstances : new GeometryInstance({
  531. id : entity,
  532. geometry : new EllipseGeometry(options)
  533. }),
  534. appearance : appearance,
  535. asynchronous : false
  536. }));
  537. }
  538. if (Property.getValueOrDefault(ellipse.outline, time, false)) {
  539. options.vertexFormat = PerInstanceColorAppearance.VERTEX_FORMAT;
  540. var outlineColor = Property.getValueOrClonedDefault(ellipse.outlineColor, time, Color.BLACK, scratchColor);
  541. var outlineWidth = Property.getValueOrDefault(ellipse.outlineWidth, 1.0);
  542. var translucent = outlineColor.alpha !== 1.0;
  543. this._outlinePrimitive = primitives.add(new Primitive({
  544. geometryInstances : new GeometryInstance({
  545. id : entity,
  546. geometry : new EllipseOutlineGeometry(options),
  547. attributes : {
  548. color : ColorGeometryInstanceAttribute.fromColor(outlineColor)
  549. }
  550. }),
  551. appearance : new PerInstanceColorAppearance({
  552. flat : true,
  553. translucent : translucent,
  554. renderState : {
  555. lineWidth : geometryUpdater._scene.clampLineWidth(outlineWidth)
  556. }
  557. }),
  558. asynchronous : false
  559. }));
  560. }
  561. };
  562. DynamicGeometryUpdater.prototype.isDestroyed = function() {
  563. return false;
  564. };
  565. DynamicGeometryUpdater.prototype.destroy = function() {
  566. var primitives = this._primitives;
  567. primitives.removeAndDestroy(this._primitive);
  568. primitives.removeAndDestroy(this._outlinePrimitive);
  569. destroyObject(this);
  570. };
  571. return EllipseGeometryUpdater;
  572. });