< Summary

Information
Class: GridForge.Grids.Topology.GridCoveredAddress
Assembly: GridForge
File(s): /home/runner/work/GridForge/GridForge/src/GridForge/Grids/Topology/GridCoveredAddress.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 41
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/GridForge/GridForge/src/GridForge/Grids/Topology/GridCoveredAddress.cs

#LineLine coverage
 1//=======================================================================
 2// GridCoveredAddress.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
 8using GridForge.Configuration;
 9using GridForge.Spatial;
 10
 11namespace GridForge.Grids.Topology;
 12
 13/// <summary>
 14/// Identifies one topology-local address covered by a query and its exact grid generation.
 15/// </summary>
 16public readonly struct GridCoveredAddress
 17{
 18    /// <summary>The durable normalized grid identity.</summary>
 19    public GridConfigurationKey ConfigurationKey { get; }
 20
 21    /// <summary>The recyclable world-local grid slot.</summary>
 22    public ushort GridIndex { get; }
 23
 24    /// <summary>The exact process-unique grid allocation identity.</summary>
 25    public long GridSpawnToken { get; }
 26
 27    /// <summary>The grid's last committed change sequence captured for this result.</summary>
 28    public ulong GridLastChangeSequence { get; }
 29
 30    /// <summary>The topology-local address, whether or not a physical voxel currently exists.</summary>
 31    public VoxelIndex VoxelIndex { get; }
 32
 33    internal GridCoveredAddress(GridCoveredAddressGeneration generation, VoxelIndex voxelIndex)
 34    {
 2635        ConfigurationKey = generation.ConfigurationKey;
 2636        GridIndex = generation.GridIndex;
 2637        GridSpawnToken = generation.GridSpawnToken;
 2638        GridLastChangeSequence = generation.GridLastChangeSequence;
 2639        VoxelIndex = voxelIndex;
 2640    }
 41}