< Summary

Information
Class: Gravitas.Diagnostics.GravitasVelocityDeltaDiagnosticView
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Diagnostics/Events/Motion/GravitasVelocityDeltaDiagnosticView.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 52
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_Kind()100%11100%
get_BodyId()100%11100%
get_ColliderId()100%11100%
get_ColliderType()100%11100%
get_Before()100%11100%
get_After()100%11100%
get_Delta()100%11100%
get_ResultSpeed()100%11100%

File(s)

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

#LineLine coverage
 1//=======================================================================
 2// GravitasVelocityDeltaDiagnosticView.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 linear or angular velocity diagnostic events.
 15/// </summary>
 16public readonly struct GravitasVelocityDeltaDiagnosticView
 17{
 718    internal GravitasVelocityDeltaDiagnosticView(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 velocity change was captured.</summary>
 124    public long Frame => Event.Frame;
 25
 26    /// <summary>Gets the event's sequence within its capture buffer.</summary>
 127    public int Sequence => Event.Sequence;
 28
 29    /// <summary>Gets whether the event describes linear or angular velocity.</summary>
 230    public GravitasDiagnosticEventKind Kind => Event.Kind;
 31
 32    /// <summary>Gets the context-local body identifier.</summary>
 233    public int BodyId => Event.BodyId;
 34
 35    /// <summary>Gets the body's context-local collider identifier.</summary>
 236    public int ColliderId => Event.ColliderAId;
 37
 38    /// <summary>Gets the body's collider type.</summary>
 239    public ColliderType ColliderType => Event.ColliderAType;
 40
 41    /// <summary>Gets the velocity before the change.</summary>
 242    public Vector3d Before => Event.Start;
 43
 44    /// <summary>Gets the velocity after the change.</summary>
 245    public Vector3d After => Event.End;
 46
 47    /// <summary>Gets the velocity delta.</summary>
 348    public Vector3d Delta => Event.Vector;
 49
 50    /// <summary>Gets the magnitude of the resulting velocity.</summary>
 251    public Fixed64 ResultSpeed => Event.ScalarA;
 52}