namespace EvilEngine.GenerativeMotion; public sealed class SomaGeneration { public int Tokens { get; internal set; } public int FrameCount { get; internal set; } public Rigid[] Poses { get; } = new Rigid[SomaContract.MaxFrames * SomaSkeleton.JointCount]; public float[] Contacts { get; } = new float[SomaContract.MaxFrames * SomaContract.FootContacts]; public ReadOnlySpan Pose(int frame) { ArgumentOutOfRangeException.ThrowIfNegative(frame); ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(frame, FrameCount); return Poses.AsSpan(frame * SomaSkeleton.JointCount, SomaSkeleton.JointCount); } public ReadOnlySpan FootContacts(int frame) { ArgumentOutOfRangeException.ThrowIfNegative(frame); ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(frame, FrameCount); return Contacts.AsSpan(frame * SomaContract.FootContacts, SomaContract.FootContacts); } }