智慧水务管理系统 - 精河县供水工程综合管理平台

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. // @ts-check
  2. import DeveloperError from "../Core/DeveloperError.js";
  3. /** @import Cartesian3 from "../Core/Cartesian3.js"; */
  4. /** @import Matrix4 from "../Core/Matrix4.js"; */
  5. /** @import MetadataComponentType from "./MetadataComponentType.js"; */
  6. /** @import MetadataType from "./MetadataType.js"; */
  7. /** @import TimeIntervalCollection from "../Core/TimeIntervalCollection.js"; */
  8. /** @import VoxelContent from "./VoxelContent.js"; */
  9. /** @import VoxelShapeType from "./VoxelShapeType.js"; */
  10. /**
  11. * Provides voxel data. Intended to be used with {@link VoxelPrimitive}.
  12. * This type describes an interface and is not intended to be instantiated directly.
  13. *
  14. * @see Cesium3DTilesVoxelProvider
  15. * @see VoxelPrimitive
  16. * @see VoxelShapeType
  17. *
  18. * @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
  19. */
  20. class VoxelProvider {
  21. constructor() {
  22. DeveloperError.throwInstantiationError();
  23. }
  24. /**
  25. * Requests the data for a given tile.
  26. *
  27. * @param {object} [options] Object with the following properties:
  28. * @param {number} [options.tileLevel=0] The tile's level.
  29. * @param {number} [options.tileX=0] The tile's X coordinate.
  30. * @param {number} [options.tileY=0] The tile's Y coordinate.
  31. * @param {number} [options.tileZ=0] The tile's Z coordinate.
  32. * @privateparam {number} [options.keyframe=0] The requested keyframe.
  33. * @returns {Promise<VoxelContent>|undefined} A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
  34. */
  35. requestData(options) {
  36. DeveloperError.throwInstantiationError();
  37. }
  38. /**
  39. * A transform from local space to global space.
  40. *
  41. * @type {Matrix4}
  42. * @default Matrix4.IDENTITY
  43. * @readonly
  44. * @constant
  45. */
  46. globalTransform;
  47. /**
  48. * A transform from shape space to local space.
  49. *
  50. * @type {Matrix4}
  51. * @default Matrix4.IDENTITY
  52. * @readonly
  53. * @constant
  54. */
  55. shapeTransform;
  56. /**
  57. * Gets the {@link VoxelShapeType}
  58. *
  59. * @type {VoxelShapeType}
  60. * @readonly
  61. * @constant
  62. */
  63. shape;
  64. /**
  65. * Gets the minimum bounds.
  66. * If undefined, the shape's default minimum bounds will be used instead.
  67. *
  68. * @type {Cartesian3|undefined}
  69. * @readonly
  70. * @constant
  71. */
  72. minBounds;
  73. /**
  74. * Gets the maximum bounds.
  75. * If undefined, the shape's default maximum bounds will be used instead.
  76. *
  77. * @type {Cartesian3|undefined}
  78. * @readonly
  79. * @constant
  80. */
  81. maxBounds;
  82. /**
  83. * Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
  84. *
  85. * @type {Cartesian3}
  86. * @readonly
  87. * @constant
  88. */
  89. dimensions;
  90. /**
  91. * Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
  92. *
  93. * @type {Cartesian3}
  94. * @default Cartesian3.ZERO
  95. * @readonly
  96. * @constant
  97. */
  98. paddingBefore;
  99. /**
  100. * Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
  101. *
  102. * @type {Cartesian3}
  103. * @default Cartesian3.ZERO
  104. * @readonly
  105. * @constant
  106. */
  107. paddingAfter;
  108. /**
  109. * Gets the metadata names.
  110. *
  111. * @type {string[]}
  112. * @readonly
  113. * @constant
  114. */
  115. names;
  116. /**
  117. * Gets the metadata types.
  118. *
  119. * @type {MetadataType[]}
  120. * @readonly
  121. * @constant
  122. */
  123. types;
  124. /**
  125. * Gets the metadata component types.
  126. *
  127. * @type {MetadataComponentType[]}
  128. * @readonly
  129. * @constant
  130. */
  131. componentTypes;
  132. /**
  133. * Gets the metadata minimum values.
  134. *
  135. * @type {number[][]|undefined}
  136. * @readonly
  137. * @constant
  138. */
  139. minimumValues;
  140. /**
  141. * Gets the metadata maximum values.
  142. *
  143. * @type {number[][]|undefined}
  144. * @readonly
  145. * @constant
  146. */
  147. maximumValues;
  148. /**
  149. * The maximum number of tiles that exist for this provider.
  150. * This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
  151. * If this value is not known it can be undefined.
  152. *
  153. * @type {number|undefined}
  154. * @readonly
  155. * @constant
  156. */
  157. maximumTileCount;
  158. /**
  159. * The number of levels of detail containing available tiles in the tileset.
  160. *
  161. * @type {number|undefined}
  162. * @readonly
  163. * @constant
  164. */
  165. availableLevels;
  166. /**
  167. * Gets the number of keyframes in the dataset.
  168. *
  169. * @type {number|undefined}
  170. * @readonly
  171. * @constant
  172. * @private
  173. */
  174. keyframeCount;
  175. /**
  176. * Gets the {@link TimeIntervalCollection} for the dataset,
  177. * or undefined if it doesn't have timestamps.
  178. *
  179. * @type {TimeIntervalCollection|undefined}
  180. * @readonly
  181. * @constant
  182. * @private
  183. */
  184. timeIntervalCollection;
  185. }
  186. export default VoxelProvider;