< Summary

Information
Class: Gravitas.Diagnostics.GravitasForceDeltaDiagnosticView
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Diagnostics/Events/Motion/GravitasForceDeltaDiagnosticView.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
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%
get_Frame()100%11100%
get_Sequence()100%11100%
get_BodyId()100%11100%
get_ColliderId()100%11100%
get_ColliderType()100%11100%
get_Force()100%11100%
get_AccelerationDelta()100%11100%
get_ForceMagnitude()100%11100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/Diagnostics/Events/Motion/GravitasForceDeltaDiagnosticView.cs

#LineLine coverage
 1//=======================================================================
 2// GravitasForceDeltaDiagnosticView.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 Gravitas.Colliders;
 10
 11namespace Gravitas.Diagnostics;
 12
 13/// <summary>
 14/// Typed read-only view over a force-delta diagnostic event.
 15/// </summary>
 16public readonly struct GravitasForceDeltaDiagnosticView
 17{
 418    internal GravitasForceDeltaDiagnosticView(GravitasDiagnosticEvent diagnosticEvent) => Event = diagnosticEvent;
 19
 20    /// <summary>Gets the underlying diagnostic event.</summary>
 21    public GravitasDiagnosticEvent Event { get; }
 22
 23    /// <summary>Gets the simulation frame in which the force was captured.</summary>
 124    public long Frame => Event.Frame;
 25
 26    /// <summary>Gets the event's sequence within its capture buffer.</summary>
 227    public int Sequence => Event.Sequence;
 28
 29    /// <summary>Gets the context-local body identifier.</summary>
 130    public int BodyId => Event.BodyId;
 31
 32    /// <summary>Gets the body's context-local collider identifier.</summary>
 133    public int ColliderId => Event.ColliderAId;
 34
 35    /// <summary>Gets the body's collider type.</summary>
 136    public ColliderType ColliderType => Event.ColliderAType;
 37
 38    /// <summary>Gets the applied force.</summary>
 339    public Vector3d Force => Event.Vector;
 40
 41    /// <summary>Gets the resulting acceleration delta.</summary>
 142    public Vector3d AccelerationDelta => Event.PointA;
 43
 44    /// <summary>Gets the magnitude of the applied force.</summary>
 145    public Fixed64 ForceMagnitude => Event.ScalarA;
 46}