Visualizer.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import DeveloperError from "../Core/DeveloperError.js";
  2. /**
  3. * Defines the interface for visualizers. Visualizers are plug-ins to
  4. * {@link DataSourceDisplay} that render data associated with
  5. * {@link DataSource} instances.
  6. * This object is an interface for documentation purposes and is not intended
  7. * to be instantiated directly.
  8. * @alias Visualizer
  9. * @constructor
  10. *
  11. * @see BillboardVisualizer
  12. * @see LabelVisualizer
  13. * @see ModelVisualizer
  14. * @see PathVisualizer
  15. * @see PointVisualizer
  16. * @see GeometryVisualizer
  17. */
  18. function Visualizer() {
  19. DeveloperError.throwInstantiationError();
  20. }
  21. /**
  22. * Updates the visualization to the provided time.
  23. * @function
  24. *
  25. * @param {JulianDate} time The time.
  26. *
  27. * @returns {Boolean} True if the display was updated to the provided time,
  28. * false if the visualizer is waiting for an asynchronous operation to
  29. * complete before data can be updated.
  30. */
  31. Visualizer.prototype.update = DeveloperError.throwInstantiationError;
  32. /**
  33. * Computes a bounding sphere which encloses the visualization produced for the specified entity.
  34. * The bounding sphere is in the fixed frame of the scene's globe.
  35. *
  36. * @param {Entity} entity The entity whose bounding sphere to compute.
  37. * @param {BoundingSphere} result The bounding sphere onto which to store the result.
  38. * @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
  39. * BoundingSphereState.PENDING if the result is still being computed, or
  40. * BoundingSphereState.FAILED if the entity has no visualization in the current scene.
  41. * @private
  42. */
  43. Visualizer.prototype.getBoundingSphere = DeveloperError.throwInstantiationError;
  44. /**
  45. * Returns true if this object was destroyed; otherwise, false.
  46. * @function
  47. *
  48. * @returns {Boolean} True if this object was destroyed; otherwise, false.
  49. */
  50. Visualizer.prototype.isDestroyed = DeveloperError.throwInstantiationError;
  51. /**
  52. * Removes all visualization and cleans up any resources associated with this instance.
  53. * @function
  54. */
  55. Visualizer.prototype.destroy = DeveloperError.throwInstantiationError;
  56. export default Visualizer;