Reference Source

src/plugins/StoreyViewsPlugin/Storey.js

  1. /**
  2. * @desc Information about an ````IfcBuildingStorey````.
  3. *
  4. * These are provided by a {@link StoreyViewsPlugin}.
  5. */
  6. class Storey {
  7.  
  8. /**
  9. * @private
  10. */
  11. constructor(plugin, modelAABB, storeyAABB, modelId, storeyId, numObjects) {
  12.  
  13. /**
  14. * The {@link StoreyViewsPlugin} this Storey belongs to.
  15. *
  16. * @property plugin
  17. * @type {StoreyViewsPlugin}
  18. */
  19. this.plugin = plugin;
  20.  
  21. /**
  22. * ID of the IfcBuildingStorey.
  23. *
  24. * This matches IDs of the IfcBuildingStorey's {@link MetaObject} and {@link Entity}.
  25. *
  26. * @property storeyId
  27. * @type {String}
  28. */
  29. this.storeyId = storeyId;
  30.  
  31. /**
  32. * ID of the model.
  33. *
  34. * This matches the ID of the {@link MetaModel} that contains the IfcBuildingStorey's {@link MetaObject}.
  35. *
  36. * @property modelId
  37. * @type {String|Number}
  38. */
  39. this.modelId = modelId;
  40.  
  41. /**
  42. * Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
  43. *
  44. * The boundary is a six-element Float64Array containing the min/max extents of the
  45. * axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
  46. *
  47. * @property storeyAABB
  48. * @type {Number[]}
  49. */
  50. this.storeyAABB = storeyAABB.slice();
  51.  
  52. /**
  53. * Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
  54. *
  55. * The boundary is a six-element Float64Array containing the min/max extents of the
  56. * axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
  57. *
  58. * @deprecated
  59. * @property storeyAABB
  60. * @type {Number[]}
  61. */
  62. this.aabb = this.storeyAABB;
  63.  
  64. /**
  65. * Axis-aligned World-space boundary of the {@link Entity}s that represent the model.
  66. *
  67. * The boundary is a six-element Float64Array containing the min/max extents of the
  68. * axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
  69. *
  70. * @property modelAABB
  71. * @type {Number[]}
  72. */
  73. this.modelAABB = modelAABB.slice();
  74.  
  75. /** Number of {@link Entity}s within the IfcBuildingStorey.
  76. *
  77. * @property numObjects
  78. * @type {Number}
  79. */
  80. this.numObjects = numObjects;
  81. }
  82. }
  83.  
  84. export {Storey};