| | | 1 | | //======================================================================= |
| | | 2 | | // GridTraceAddressCandidate.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.Spatial; |
| | | 9 | | |
| | | 10 | | namespace GridForge.Grids; |
| | | 11 | | |
| | | 12 | | internal readonly struct GridTraceAddressCandidate |
| | | 13 | | { |
| | | 14 | | public readonly VoxelGrid Grid; |
| | | 15 | | public readonly VoxelIndex Index; |
| | | 16 | | public readonly bool IsPhysicallyPresent; |
| | | 17 | | |
| | | 18 | | public GridTraceAddressCandidate(VoxelGrid grid, VoxelIndex index, bool isPhysicallyPresent) |
| | | 19 | | { |
| | 3363 | 20 | | Grid = grid; |
| | 3363 | 21 | | Index = index; |
| | 3363 | 22 | | IsPhysicallyPresent = isPhysicallyPresent; |
| | 3363 | 23 | | } |
| | | 24 | | |
| | | 25 | | public GridTraceAddressCandidate WithPhysicalPresence(bool isPhysicallyPresent) => |
| | 808 | 26 | | new GridTraceAddressCandidate(Grid, Index, isPhysicallyPresent); |
| | | 27 | | } |