Home Reference Source

src/octree/world/WorldOctant.js

  1. import { Queue } from "../../core/Queue";
  2.  
  3. /**
  4. * A world octant.
  5. *
  6. * This octant serves as a volume data container. Its position is implicitly
  7. * defined by its key while its size is defined by the LOD grid in which it
  8. * resides. Additionally, it can store a queue of pending CSG operations.
  9. */
  10.  
  11. export class WorldOctant {
  12.  
  13. /**
  14. * Constructs a new world octant.
  15. */
  16.  
  17. constructor() {
  18.  
  19. /**
  20. * Hermite data.
  21. *
  22. * @type {HermiteData}
  23. */
  24.  
  25. this.data = null;
  26.  
  27. /**
  28. * A CSG operation queue.
  29. *
  30. * If this queue is not empty, the volume data has to be modified before it
  31. * can be contoured.
  32. *
  33. * @type {Queue}
  34. */
  35.  
  36. this.csg = new Queue();
  37.  
  38. /**
  39. * A generated isosurface mesh.
  40. *
  41. * @type {Isosurface}
  42. */
  43.  
  44. this.isosurface = null;
  45.  
  46. }
  47.  
  48. }