< Summary

Information
Class: Trailblazer.Heightmaps.HeightmapSample
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Heightmaps/HeightmapSample.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 44
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/Trailblazer/Trailblazer/src/Trailblazer/Heightmaps/HeightmapSample.cs

#LineLine coverage
 1using FixedMathSharp;
 2
 3namespace Trailblazer.Heightmaps;
 4
 5/// <summary>
 6/// Result of a deterministic heightmap ground sample.
 7/// </summary>
 8public readonly struct HeightmapSample
 9{
 10    /// <summary>
 11    /// Name of the registered layer that supplied the sample.
 12    /// </summary>
 13    public string LayerName { get; }
 14
 15    /// <summary>
 16    /// World position used for the sample query.
 17    /// </summary>
 18    public Vector3d QueryPosition { get; }
 19
 20    /// <summary>
 21    /// Environment ground/contact Y resolved from the layer.
 22    /// </summary>
 23    public Fixed64 GroundY { get; }
 24
 25    /// <summary>
 26    /// Absolute distance between query contact Y and the sampled ground Y used for layer selection.
 27    /// </summary>
 28    public Fixed64 DistanceFromSelectionY { get; }
 29
 30    /// <summary>
 31    /// Creates a new heightmap sample result.
 32    /// </summary>
 33    public HeightmapSample(
 34        string layerName,
 35        Vector3d queryPosition,
 36        Fixed64 groundY,
 37        Fixed64 distanceFromSelectionY)
 38    {
 2039        LayerName = layerName;
 2040        QueryPosition = queryPosition;
 2041        GroundY = groundY;
 2042        DistanceFromSelectionY = distanceFromSelectionY;
 2043    }
 44}