| | | 1 | | //======================================================================= |
| | | 2 | | // GridVoxelSet.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 GridForge.Grids; |
| | | 9 | | using SwiftCollections; |
| | | 10 | | |
| | | 11 | | namespace GridForge; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Used to group query results on a grid to voxel level |
| | | 15 | | /// </summary> |
| | | 16 | | public readonly struct GridVoxelSet |
| | | 17 | | { |
| | | 18 | | /// <summary> |
| | | 19 | | /// The grid containing the voxels from the resulting query |
| | | 20 | | /// </summary> |
| | | 21 | | public readonly VoxelGrid Grid; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// A list of voxels that match the provided query |
| | | 25 | | /// </summary> |
| | | 26 | | public readonly SwiftList<Voxel> Voxels; |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Initializes a new grouped grid query result. |
| | | 30 | | /// </summary> |
| | | 31 | | /// <param name="grid">The grid containing the matching voxels.</param> |
| | | 32 | | /// <param name="voxels">The matching voxels for the grid.</param> |
| | | 33 | | public GridVoxelSet(VoxelGrid grid, SwiftList<Voxel> voxels) |
| | | 34 | | { |
| | 211 | 35 | | Grid = grid; |
| | 211 | 36 | | Voxels = voxels; |
| | 211 | 37 | | } |
| | | 38 | | } |