< Summary

Information
Class: Gravitas.Queries.GjkResult
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Queries/3D/Sweeps/GjkResult.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 46
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%
CreateIntersection(...)100%11100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/Queries/3D/Sweeps/GjkResult.cs

#LineLine coverage
 1//=======================================================================
 2// GjkResult.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2026-present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8using FixedMathSharp;
 9using FixedMathSharp.Geometry;
 10
 11namespace Gravitas.Queries;
 12
 13/// <summary>
 14/// Carries GJK intersection or separation evidence, including witnesses on both shapes.
 15/// </summary>
 16internal readonly struct GjkResult
 17{
 18    public GjkResult(
 19        bool intersects,
 20        Fixed64 distance,
 21        FixedPointAnchor pointA,
 22        FixedPointAnchor pointB,
 23        Vector3d normal)
 24    {
 469225        Intersects = intersects;
 469226        Distance = distance;
 469227        PointA = pointA;
 469228        PointB = pointB;
 469229        Normal = normal;
 469230    }
 31
 32    public bool Intersects { get; }
 33
 34    public Fixed64 Distance { get; }
 35
 36    public FixedPointAnchor PointA { get; }
 37
 38    public FixedPointAnchor PointB { get; }
 39
 40    public Vector3d Normal { get; }
 41
 42    public static GjkResult CreateIntersection(
 43        FixedPointAnchor pointA,
 44        FixedPointAnchor pointB) =>
 363445        new(true, Fixed64.Zero, pointA, pointB, Vector3d.Zero);
 46}