< Summary

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

#LineLine coverage
 1using FixedMathSharp;
 2
 3namespace Trailblazer.Navigation.Motor;
 4
 5/// <summary>
 6/// Immutable frame snapshot describing a climb affordance supplied by the host.
 7/// </summary>
 8public readonly struct ClimbAffordanceSnapshot
 9{
 10    /// <summary>
 11    /// Initializes a new snapshot.
 12    /// </summary>
 13    public ClimbAffordanceSnapshot(
 14        ClimbAffordanceKind kind,
 15        Vector3d attachmentPoint,
 16        Vector3d surfaceNormal,
 17        Vector3d upDirection,
 18        int? affordanceId = null,
 19        bool canStartClimb = true,
 20        bool canContinueClimb = true,
 21        bool allowLateralTraverse = true,
 22        bool allowDescent = true,
 23        bool allowMantle = false,
 24        bool allowDetachJump = true,
 25        Vector3d? mantleTargetPosition = null)
 26    {
 2727        Kind = kind;
 2728        AttachmentPoint = attachmentPoint;
 2729        SurfaceNormal = surfaceNormal;
 2730        UpDirection = upDirection;
 2731        AffordanceId = affordanceId;
 2732        CanStartClimb = canStartClimb;
 2733        CanContinueClimb = canContinueClimb;
 2734        AllowLateralTraverse = allowLateralTraverse;
 2735        AllowDescent = allowDescent;
 2736        AllowMantle = allowMantle;
 2737        AllowDetachJump = allowDetachJump;
 2738        MantleTargetPosition = mantleTargetPosition;
 2739    }
 40
 41    /// <summary>
 42    /// Gets the type of climb affordance represented by this instance.
 43    /// </summary>
 44    public ClimbAffordanceKind Kind { get; }
 45
 46    /// <summary>
 47    /// Gets the identifier of the associated affordance, if available.
 48    /// </summary>
 49    public int? AffordanceId { get; }
 50
 51    /// <summary>
 52    /// Gets the position in 3D space where the object is attached.
 53    /// </summary>
 54    public Vector3d AttachmentPoint { get; }
 55
 56    /// <summary>
 57    /// Gets the normal vector of the surface at the current location.
 58    /// </summary>
 59    public Vector3d SurfaceNormal { get; }
 60
 61    /// <summary>
 62    /// Gets the upward direction vector for the current coordinate system.
 63    /// </summary>
 64    public Vector3d UpDirection { get; }
 65
 66    /// <summary>
 67    /// Gets a value indicating whether climbing can be started based on the current state.
 68    /// </summary>
 69    public bool CanStartClimb { get; }
 70
 71    /// <summary>
 72    /// Gets a value indicating whether the climb can continue based on the current state.
 73    /// </summary>
 74    public bool CanContinueClimb { get; }
 75
 76    /// <summary>
 77    /// Gets a value indicating whether lateral traversal is permitted.
 78    /// </summary>
 79    public bool AllowLateralTraverse { get; }
 80
 81    /// <summary>
 82    /// Gets a value indicating whether descent is permitted in the current context.
 83    /// </summary>
 84    public bool AllowDescent { get; }
 85
 86    /// <summary>
 87    /// Gets a value indicating whether mantle actions are permitted.
 88    /// </summary>
 89    public bool AllowMantle { get; }
 90
 91    /// <summary>
 92    /// Gets a value indicating whether detach jump operations are permitted.
 93    /// </summary>
 94    public bool AllowDetachJump { get; }
 95
 96    /// <summary>
 97    /// Gets the target position for the mantle action, if available.
 98    /// </summary>
 99    /// <remarks>
 100    /// The target position is determined when a mantle action is in progress.
 101    /// If no mantle is being performed, the value is null.
 102    /// </remarks>
 103    public Vector3d? MantleTargetPosition { get; }
 104}