< Summary

Information
Class: Trailblazer.Navigation.Motor.ActiveMantleState
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Navigation/Motor/Climbing/ActiveMantleState.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 65
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/Navigation/Motor/Climbing/ActiveMantleState.cs

#LineLine coverage
 1//=======================================================================
 2// ActiveMantleState.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 FixedMathSharp;
 9
 10namespace Trailblazer.Navigation.Motor;
 11
 12/// <summary>
 13/// Immutable snapshot describing the currently latched mantle state.
 14/// </summary>
 15public readonly struct ActiveMantleState
 16{
 17    /// <summary>
 18    /// Initializes a new active mantle snapshot.
 19    /// </summary>
 20    public ActiveMantleState(
 21        ClimbAffordanceKind kind,
 22        int? affordanceId,
 23        Vector3d attachmentPoint,
 24        Vector3d surfaceNormal,
 25        Vector3d upDirection,
 26        Vector3d mantleTargetPosition)
 27    {
 628        Kind = kind;
 629        AffordanceId = affordanceId;
 630        AttachmentPoint = attachmentPoint;
 631        SurfaceNormal = surfaceNormal;
 632        UpDirection = upDirection;
 633        MantleTargetPosition = mantleTargetPosition;
 634    }
 35
 36    /// <summary>
 37    /// Gets the type of climb affordance represented by this instance.
 38    /// </summary>
 39    public ClimbAffordanceKind Kind { get; }
 40
 41    /// <summary>
 42    /// Gets the identifier of the associated affordance, if available.
 43    /// </summary>
 44    public int? AffordanceId { get; }
 45
 46    /// <summary>
 47    /// Gets the position in 3D space where the object is attached.
 48    /// </summary>
 49    public Vector3d AttachmentPoint { get; }
 50
 51    /// <summary>
 52    /// Gets the normal vector perpendicular to the surface at the current location.
 53    /// </summary>
 54    public Vector3d SurfaceNormal { get; }
 55
 56    /// <summary>
 57    /// Gets the up direction vector for the current coordinate system or object.
 58    /// </summary>
 59    public Vector3d UpDirection { get; }
 60
 61    /// <summary>
 62    /// Gets the target world position for the mantling action.
 63    /// </summary>
 64    public Vector3d MantleTargetPosition { get; }
 65}