< Summary

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

File(s)

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

#LineLine coverage
 1//=======================================================================
 2// GridTraceScratch.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 SwiftCollections;
 9
 10namespace GridForge.Grids;
 11
 12/// <summary>
 13/// Reusable temporary storage for allocation-sensitive grid tracing and coverage operations.
 14/// </summary>
 15public sealed class GridTraceScratch
 16{
 17    internal SwiftHashSet<ushort> ProcessedGrids { get; } = new();
 18
 19    internal SwiftHashSet<Voxel> VoxelRedundancy { get; } = new();
 20
 21    /// <summary>
 22    /// Clears all temporary trace state while retaining allocated backing storage.
 23    /// </summary>
 24    public void Clear()
 25    {
 226        ProcessedGrids.Clear();
 227        VoxelRedundancy.Clear();
 228    }
 29}

Methods/Properties

Clear()