| | | 1 | | //======================================================================= |
| | | 2 | | // GravitasMixedResponseIslandDiagnosticView.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 | | |
| | | 8 | | namespace Gravitas.Diagnostics; |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Typed read-only view over a mixed 3D/2D response-island diagnostic event. |
| | | 12 | | /// </summary> |
| | | 13 | | public readonly struct GravitasMixedResponseIslandDiagnosticView |
| | | 14 | | { |
| | 7 | 15 | | internal GravitasMixedResponseIslandDiagnosticView(GravitasDiagnosticEvent diagnosticEvent) => Event = diagnosticEve |
| | | 16 | | |
| | | 17 | | /// <summary>Gets the underlying diagnostic event.</summary> |
| | | 18 | | public GravitasDiagnosticEvent Event { get; } |
| | | 19 | | |
| | | 20 | | /// <summary>Gets the simulation frame in which the island result was captured.</summary> |
| | 1 | 21 | | public long Frame => Event.Frame; |
| | | 22 | | |
| | | 23 | | /// <summary>Gets the event's sequence within its capture buffer.</summary> |
| | 1 | 24 | | public int Sequence => Event.Sequence; |
| | | 25 | | |
| | | 26 | | /// <summary>Gets the deterministic root key of the response island.</summary> |
| | 4 | 27 | | public int RootKey => Event.BodyId; |
| | | 28 | | |
| | | 29 | | /// <summary>Gets the number of constraints in the island.</summary> |
| | 5 | 30 | | public int ConstraintCount => Event.DataA; |
| | | 31 | | |
| | | 32 | | /// <summary>Gets the number of response iterations performed.</summary> |
| | 5 | 33 | | public int IterationCount => Event.DataB; |
| | | 34 | | |
| | | 35 | | /// <summary>Gets whether the response reached its iteration limit.</summary> |
| | 2 | 36 | | public bool ReachedIterationLimit => Event.Hit; |
| | | 37 | | } |