| | | 1 | | //======================================================================= |
| | | 2 | | // GravitasWireCylinderDebugDrawView.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 | | using FixedMathSharp; |
| | | 9 | | using Gravitas.Colliders; |
| | | 10 | | |
| | | 11 | | namespace Gravitas.Diagnostics; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Typed read-only view over a wire-cylinder draw command. |
| | | 15 | | /// </summary> |
| | | 16 | | public readonly struct GravitasWireCylinderDebugDrawView |
| | | 17 | | { |
| | 2 | 18 | | internal GravitasWireCylinderDebugDrawView(GravitasDebugDrawCommand command) => Command = command; |
| | | 19 | | |
| | | 20 | | /// <summary>Gets the underlying draw command.</summary> |
| | | 21 | | public GravitasDebugDrawCommand Command { get; } |
| | | 22 | | |
| | | 23 | | /// <summary>Gets the simulation frame in which the command was captured.</summary> |
| | 1 | 24 | | public long Frame => Command.Frame; |
| | | 25 | | |
| | | 26 | | /// <summary>Gets the command's sequence within its capture buffer.</summary> |
| | 1 | 27 | | public int Sequence => Command.Sequence; |
| | | 28 | | |
| | | 29 | | /// <summary>Gets the associated context-local collider identifier.</summary> |
| | 1 | 30 | | public int ColliderId => Command.ColliderId; |
| | | 31 | | |
| | | 32 | | /// <summary>Gets the associated collider dimension.</summary> |
| | 1 | 33 | | public GravitasColliderDimension ColliderDimension => Command.ColliderDimension; |
| | | 34 | | |
| | | 35 | | /// <summary>Gets the associated 3D collider type.</summary> |
| | 1 | 36 | | public ColliderType ColliderType => Command.ColliderType; |
| | | 37 | | |
| | | 38 | | /// <summary>Gets the associated 2D collider type.</summary> |
| | 1 | 39 | | public ColliderType2D Collider2DType => Command.Collider2DType; |
| | | 40 | | |
| | | 41 | | /// <summary>Gets the cylinder center.</summary> |
| | 1 | 42 | | public Vector3d Center => Command.Center; |
| | | 43 | | |
| | | 44 | | /// <summary>Gets the cylinder orientation.</summary> |
| | 1 | 45 | | public FixedQuaternion Rotation => Command.Rotation; |
| | | 46 | | |
| | | 47 | | /// <summary>Gets the cylinder radius.</summary> |
| | 1 | 48 | | public Fixed64 Radius => Command.Radius; |
| | | 49 | | |
| | | 50 | | /// <summary>Gets the cylinder height.</summary> |
| | 1 | 51 | | public Fixed64 Height => Command.Height; |
| | | 52 | | |
| | | 53 | | /// <summary>Gets the cylinder color.</summary> |
| | 1 | 54 | | public GravitasDiagnosticColor Color => Command.Color; |
| | | 55 | | } |