< Summary

Information
Class: GridForge.Grids.ObstacleClearEventInfo
Assembly: GridForge
File(s): /home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/ObstacleClearEventInfo.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 42
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
get_GridIndex()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/ObstacleClearEventInfo.cs

#LineLine coverage
 1using GridForge.Spatial;
 2
 3namespace GridForge.Grids;
 4
 5/// <summary>
 6/// Immutable snapshot describing a bulk obstacle clear operation on a voxel.
 7/// </summary>
 8public readonly struct ObstacleClearEventInfo
 9{
 10    /// <summary>
 11    /// The voxel that had its obstacles cleared.
 12    /// </summary>
 13    public readonly WorldVoxelIndex VoxelIndex;
 14
 15    /// <summary>
 16    /// The number of obstacles removed by the clear operation.
 17    /// </summary>
 18    public readonly byte ClearedObstacleCount;
 19
 20    /// <summary>
 21    /// The grid version recorded after the clear operation completes.
 22    /// </summary>
 23    public readonly uint GridVersion;
 24
 25    /// <summary>
 26    /// The grid index containing <see cref="VoxelIndex"/>.
 27    /// </summary>
 128    public readonly ushort GridIndex => VoxelIndex.GridIndex;
 29
 30    /// <summary>
 31    /// Initializes a new immutable obstacle clear snapshot.
 32    /// </summary>
 33    public ObstacleClearEventInfo(
 34        WorldVoxelIndex voxelIndex,
 35        byte clearedObstacleCount,
 36        uint gridVersion)
 37    {
 52338        VoxelIndex = voxelIndex;
 52339        ClearedObstacleCount = clearedObstacleCount;
 52340        GridVersion = gridVersion;
 52341    }
 42}