| | | 1 | | //======================================================================= |
| | | 2 | | // BlockageEventInfo.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2024–present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | using FixedMathSharp; |
| | | 9 | | |
| | | 10 | | namespace GridForge.Blockers; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Immutable snapshot describing a blocker application or removal. |
| | | 14 | | /// </summary> |
| | | 15 | | public readonly struct BlockageEventInfo |
| | | 16 | | { |
| | | 17 | | /// <summary> |
| | | 18 | | /// The world instance that produced this blocker event. |
| | | 19 | | /// </summary> |
| | | 20 | | public readonly int WorldSpawnToken; |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// The unique token representing the blocker coverage. |
| | | 24 | | /// </summary> |
| | | 25 | | public readonly BoundsKey BlockageToken; |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// The minimum bounds of the blocker coverage. |
| | | 29 | | /// </summary> |
| | | 30 | | public readonly Vector3d BoundsMin; |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// The maximum bounds of the blocker coverage. |
| | | 34 | | /// </summary> |
| | | 35 | | public readonly Vector3d BoundsMax; |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// Initializes a new immutable blockage snapshot. |
| | | 39 | | /// </summary> |
| | | 40 | | public BlockageEventInfo( |
| | | 41 | | int worldSpawnToken, |
| | | 42 | | BoundsKey blockageToken, |
| | | 43 | | Vector3d boundsMin, |
| | | 44 | | Vector3d boundsMax) |
| | | 45 | | { |
| | 27 | 46 | | WorldSpawnToken = worldSpawnToken; |
| | 27 | 47 | | BlockageToken = blockageToken; |
| | 27 | 48 | | BoundsMin = boundsMin; |
| | 27 | 49 | | BoundsMax = boundsMax; |
| | 27 | 50 | | } |
| | | 51 | | } |