< Summary

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

#LineLine coverage
 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
 8using GridForge.Grids;
 9using SwiftCollections;
 10
 11namespace GridForge;
 12
 13/// <summary>
 14/// Groups the matching voxels for one grid.
 15/// </summary>
 16/// <remarks>
 17/// Query iterators lend pooled <see cref="Voxels"/> lists until their enumeration
 18/// completes or is disposed. Consume them inside the enumeration, or copy the
 19/// contents into caller-owned storage before retaining results.
 20/// </remarks>
 21public readonly struct GridVoxelSet
 22{
 23    /// <summary>
 24    /// The grid containing the voxels from the resulting query
 25    /// </summary>
 26    public readonly VoxelGrid Grid;
 27
 28    /// <summary>
 29    /// A list of voxels that match the provided query
 30    /// </summary>
 31    public readonly SwiftList<Voxel> Voxels;
 32
 33    /// <summary>
 34    /// Initializes a new grouped grid query result.
 35    /// </summary>
 36    /// <param name="grid">The grid containing the matching voxels.</param>
 37    /// <param name="voxels">The matching voxels for the grid.</param>
 38    public GridVoxelSet(VoxelGrid grid, SwiftList<Voxel> voxels)
 39    {
 26740        Grid = grid;
 26741        Voxels = voxels;
 26742    }
 43}