Source: render/SurfaceRenderable.js

  1. /*
  2. * Copyright 2003-2006, 2009, 2017, 2020 United States Government, as represented
  3. * by the Administrator of the National Aeronautics and Space Administration.
  4. * All rights reserved.
  5. *
  6. * The NASAWorldWind/WebWorldWind platform is licensed under the Apache License,
  7. * Version 2.0 (the "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License
  9. * at http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software distributed
  12. * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  13. * CONDITIONS OF ANY KIND, either express or implied. See the License for the
  14. * specific language governing permissions and limitations under the License.
  15. *
  16. * NASAWorldWind/WebWorldWind also contains the following 3rd party Open Source
  17. * software:
  18. *
  19. * ES6-Promise – under MIT License
  20. * libtess.js – SGI Free Software License B
  21. * Proj4 – under MIT License
  22. * JSZip – under MIT License
  23. *
  24. * A complete listing of 3rd Party software notices and licenses included in
  25. * WebWorldWind can be found in the WebWorldWind 3rd-party notices and licenses
  26. * PDF found in code directory.
  27. */
  28. /**
  29. * @exports SurfaceRenderable
  30. */
  31. define(['../util/Logger',
  32. '../error/UnsupportedOperationError'
  33. ],
  34. function (Logger,
  35. UnsupportedOperationError) {
  36. "use strict";
  37. /**
  38. * Applications must not call this constructor. It is an interface class and is not meant to be instantiated
  39. * directly.
  40. * @alias SurfaceRenderable
  41. * @constructor
  42. * @classdesc Represents a surface renderable.
  43. * This is an interface class and is not meant to be instantiated directly.
  44. */
  45. var SurfaceRenderable = function () {
  46. /**
  47. * This surface renderable's display name.
  48. * @type {String}
  49. * @default Renderable
  50. */
  51. this.displayName = "Renderable";
  52. /**
  53. * Indicates whether this surface renderable is enabled.
  54. * @type {Boolean}
  55. * @default true
  56. */
  57. this.enabled = true;
  58. throw new UnsupportedOperationError(
  59. Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceRenderable", "constructor", "abstractInvocation"));
  60. };
  61. /**
  62. * Renders this surface renderable.
  63. * @param {DrawContext} dc The current draw context.
  64. */
  65. SurfaceRenderable.prototype.renderSurface = function (dc) {
  66. throw new UnsupportedOperationError(
  67. Logger.logMessage(Logger.LEVEL_SEVERE, "SurfaceRenderable", "renderSurface", "abstractInvocation"));
  68. };
  69. return SurfaceRenderable;
  70. });