TileBoundingVolume.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import DeveloperError from "../Core/DeveloperError.js";
  2. /**
  3. * Defines a bounding volume for a tile. This type describes an interface
  4. * and is not intended to be instantiated directly.
  5. *
  6. * @alias TileBoundingVolume
  7. * @constructor
  8. *
  9. * @see TileBoundingRegion
  10. * @see TileBoundingSphere
  11. * @see TileOrientedBoundingBox
  12. *
  13. * @private
  14. */
  15. function TileBoundingVolume() {}
  16. /**
  17. * The underlying bounding volume.
  18. *
  19. * @type {object}
  20. * @readonly
  21. */
  22. TileBoundingVolume.prototype.boundingVolume = undefined;
  23. /**
  24. * The underlying bounding sphere.
  25. *
  26. * @type {BoundingSphere}
  27. * @readonly
  28. */
  29. TileBoundingVolume.prototype.boundingSphere = undefined;
  30. /**
  31. * Calculates the distance between the tile and the camera.
  32. *
  33. * @param {FrameState} frameState The frame state.
  34. * @return {number} The distance between the tile and the camera, in meters.
  35. * Returns 0.0 if the camera is inside the tile.
  36. */
  37. TileBoundingVolume.prototype.distanceToCamera = function (frameState) {
  38. DeveloperError.throwInstantiationError();
  39. };
  40. /**
  41. * Determines which side of a plane this volume is located.
  42. *
  43. * @param {Plane} plane The plane to test against.
  44. * @returns {Intersect} {@link Intersect.INSIDE} if the entire volume is on the side of the plane
  45. * the normal is pointing, {@link Intersect.OUTSIDE} if the entire volume is
  46. * on the opposite side, and {@link Intersect.INTERSECTING} if the volume
  47. * intersects the plane.
  48. */
  49. TileBoundingVolume.prototype.intersectPlane = function (plane) {
  50. DeveloperError.throwInstantiationError();
  51. };
  52. /**
  53. * Creates a debug primitive that shows the outline of the tile bounding
  54. * volume.
  55. *
  56. * @param {Color} color The desired color of the primitive's mesh
  57. * @return {Primitive}
  58. */
  59. TileBoundingVolume.prototype.createDebugVolume = function (color) {
  60. DeveloperError.throwInstantiationError();
  61. };
  62. export default TileBoundingVolume;