TileBoundingVolume.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. * @see TileBoundingRegion
  7. * @see TileBoundingSphere
  8. * @see TileOrientedBoundingBox
  9. *
  10. * @private
  11. */
  12. function TileBoundingVolume() {
  13. }
  14. /**
  15. * The underlying bounding volume.
  16. *
  17. * @memberof TileBoundingVolume.prototype
  18. *
  19. * @type {Object}
  20. * @readonly
  21. */
  22. TileBoundingVolume.prototype.boundingVolume = undefined;
  23. /**
  24. * The underlying bounding sphere.
  25. *
  26. * @memberof TileBoundingVolume.prototype
  27. *
  28. * @type {BoundingSphere}
  29. * @readonly
  30. */
  31. TileBoundingVolume.prototype.boundingSphere = undefined;
  32. /**
  33. * Calculates the distance between the tile and the camera.
  34. *
  35. * @param {FrameState} frameState The frame state.
  36. * @return {Number} The distance between the tile and the camera, in meters.
  37. * Returns 0.0 if the camera is inside the tile.
  38. */
  39. TileBoundingVolume.prototype.distanceToCamera = function(frameState) {
  40. DeveloperError.throwInstantiationError();
  41. };
  42. /**
  43. * Determines which side of a plane this volume is located.
  44. *
  45. * @param {Plane} plane The plane to test against.
  46. * @returns {Intersect} {@link Intersect.INSIDE} if the entire volume is on the side of the plane
  47. * the normal is pointing, {@link Intersect.OUTSIDE} if the entire volume is
  48. * on the opposite side, and {@link Intersect.INTERSECTING} if the volume
  49. * intersects the plane.
  50. */
  51. TileBoundingVolume.prototype.intersectPlane = function(plane) {
  52. DeveloperError.throwInstantiationError();
  53. };
  54. /**
  55. * Creates a debug primitive that shows the outline of the tile bounding
  56. * volume.
  57. *
  58. * @param {Color} color The desired color of the primitive's mesh
  59. * @return {Primitive}
  60. */
  61. TileBoundingVolume.prototype.createDebugVolume = function(color) {
  62. DeveloperError.throwInstantiationError();
  63. };
  64. export default TileBoundingVolume;