Empty3DTileContent.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. import defineProperties from '../Core/defineProperties.js';
  2. import destroyObject from '../Core/destroyObject.js';
  3. /**
  4. * Represents empty content for tiles in a
  5. * {@link https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification|3D Tiles} tileset that
  6. * do not have content, e.g., because they are used to optimize hierarchical culling.
  7. * <p>
  8. * Implements the {@link Cesium3DTileContent} interface.
  9. * </p>
  10. *
  11. * @alias Empty3DTileContent
  12. * @constructor
  13. *
  14. * @private
  15. */
  16. function Empty3DTileContent(tileset, tile) {
  17. this._tileset = tileset;
  18. this._tile = tile;
  19. this.featurePropertiesDirty = false;
  20. }
  21. defineProperties(Empty3DTileContent.prototype, {
  22. featuresLength : {
  23. get : function() {
  24. return 0;
  25. }
  26. },
  27. pointsLength : {
  28. get : function() {
  29. return 0;
  30. }
  31. },
  32. trianglesLength : {
  33. get : function() {
  34. return 0;
  35. }
  36. },
  37. geometryByteLength : {
  38. get : function() {
  39. return 0;
  40. }
  41. },
  42. texturesByteLength : {
  43. get : function() {
  44. return 0;
  45. }
  46. },
  47. batchTableByteLength : {
  48. get : function() {
  49. return 0;
  50. }
  51. },
  52. innerContents : {
  53. get : function() {
  54. return undefined;
  55. }
  56. },
  57. readyPromise : {
  58. get : function() {
  59. return undefined;
  60. }
  61. },
  62. tileset : {
  63. get : function() {
  64. return this._tileset;
  65. }
  66. },
  67. tile : {
  68. get : function() {
  69. return this._tile;
  70. }
  71. },
  72. url: {
  73. get: function() {
  74. return undefined;
  75. }
  76. },
  77. batchTable : {
  78. get : function() {
  79. return undefined;
  80. }
  81. }
  82. });
  83. /**
  84. * Part of the {@link Cesium3DTileContent} interface. <code>Empty3DTileContent</code>
  85. * always returns <code>false</code> since a tile of this type does not have any features.
  86. */
  87. Empty3DTileContent.prototype.hasProperty = function(batchId, name) {
  88. return false;
  89. };
  90. /**
  91. * Part of the {@link Cesium3DTileContent} interface. <code>Empty3DTileContent</code>
  92. * always returns <code>undefined</code> since a tile of this type does not have any features.
  93. */
  94. Empty3DTileContent.prototype.getFeature = function(batchId) {
  95. return undefined;
  96. };
  97. Empty3DTileContent.prototype.applyDebugSettings = function(enabled, color) {
  98. };
  99. Empty3DTileContent.prototype.applyStyle = function(style) {
  100. };
  101. Empty3DTileContent.prototype.update = function(tileset, frameState) {
  102. };
  103. Empty3DTileContent.prototype.isDestroyed = function() {
  104. return false;
  105. };
  106. Empty3DTileContent.prototype.destroy = function() {
  107. return destroyObject(this);
  108. };
  109. export default Empty3DTileContent;