< Summary

Information
Class: FixedMathSharp.Geometry.FixedContactAnchors
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Anchors/FixedContactAnchors.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 54
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/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Anchors/FixedContactAnchors.cs

#LineLine coverage
 1//=======================================================================
 2// FixedContactAnchors.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
 8namespace FixedMathSharp.Geometry;
 9
 10/// <summary>
 11/// Describes one 3D contact relation using points retained in their rigid
 12/// local frames.
 13/// </summary>
 14public readonly struct FixedContactAnchors
 15{
 16    internal FixedContactAnchors(
 17        FixedPointAnchor firstAnchor,
 18        FixedPointAnchor secondAnchor,
 19        Vector3d normal,
 20        Fixed64 depth,
 21        bool depthIsClamped)
 22    {
 248523        FirstAnchor = firstAnchor;
 248524        SecondAnchor = secondAnchor;
 248525        Normal = normal;
 248526        Depth = depth;
 248527        DepthIsClamped = depthIsClamped;
 248528    }
 29
 30    /// <summary>
 31    /// The contact point retained in the first shape's rigid frame.
 32    /// </summary>
 33    public FixedPointAnchor FirstAnchor { get; }
 34
 35    /// <summary>
 36    /// The contact point retained in the second shape's rigid frame.
 37    /// </summary>
 38    public FixedPointAnchor SecondAnchor { get; }
 39
 40    /// <summary>
 41    /// The contact normal directed from the first shape toward the second.
 42    /// </summary>
 43    public Vector3d Normal { get; }
 44
 45    /// <summary>
 46    /// The representable penetration depth.
 47    /// </summary>
 48    public Fixed64 Depth { get; }
 49
 50    /// <summary>
 51    /// Whether the conceptual penetration exceeds <see cref="Fixed64.MaxValue"/>.
 52    /// </summary>
 53    public bool DepthIsClamped { get; }
 54}