Source: DataSources/DynamicGeometryUpdater.js

  1. /*global define*/
  2. define([
  3. '../Core/DeveloperError'
  4. ], function(
  5. DeveloperError) {
  6. 'use strict';
  7. /**
  8. * Defines the interface for a dynamic geometry updater. A DynamicGeometryUpdater
  9. * is responsible for handling visualization of a specific type of geometry
  10. * that needs to be recomputed based on simulation time.
  11. * This object is never used directly by client code, but is instead created by
  12. * {@link GeometryUpdater} implementations which contain dynamic geometry.
  13. *
  14. * This type defines an interface and cannot be instantiated directly.
  15. *
  16. * @alias DynamicGeometryUpdater
  17. * @constructor
  18. */
  19. function DynamicGeometryUpdater() {
  20. DeveloperError.throwInstantiationError();
  21. }
  22. /**
  23. * Updates the geometry to the specified time.
  24. * @memberof DynamicGeometryUpdater
  25. * @function
  26. *
  27. * @param {JulianDate} time The current time.
  28. */
  29. DynamicGeometryUpdater.prototype.update = DeveloperError.throwInstantiationError;
  30. /**
  31. * Computes a bounding sphere which encloses the visualization produced for the specified entity.
  32. * The bounding sphere is in the fixed frame of the scene's globe.
  33. * @function
  34. *
  35. * @param {Entity} entity The entity whose bounding sphere to compute.
  36. * @param {BoundingSphere} result The bounding sphere onto which to store the result.
  37. * @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
  38. * BoundingSphereState.PENDING if the result is still being computed, or
  39. * BoundingSphereState.FAILED if the entity has no visualization in the current scene.
  40. * @private
  41. */
  42. DynamicGeometryUpdater.prototype.getBoundingSphere = DeveloperError.throwInstantiationError;
  43. /**
  44. * Returns true if this object was destroyed; otherwise, false.
  45. * @memberof DynamicGeometryUpdater
  46. * @function
  47. *
  48. * @returns {Boolean} True if this object was destroyed; otherwise, false.
  49. */
  50. DynamicGeometryUpdater.prototype.isDestroyed = DeveloperError.throwInstantiationError;
  51. /**
  52. * Destroys and resources used by the object. Once an object is destroyed, it should not be used.
  53. * @memberof DynamicGeometryUpdater
  54. * @function
  55. *
  56. * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
  57. */
  58. DynamicGeometryUpdater.prototype.destroy = DeveloperError.throwInstantiationError;
  59. return DynamicGeometryUpdater;
  60. });