| | | 1 | | //======================================================================= |
| | | 2 | | // ExactContactResponseOperand3D.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 | | |
| | | 10 | | namespace Gravitas.CollisionHandling; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Describes one participant in an exact rigid-body contact response. |
| | | 14 | | /// </summary> |
| | | 15 | | internal readonly struct ExactContactResponseOperand3D |
| | | 16 | | { |
| | | 17 | | internal ExactContactResponseOperand3D( |
| | | 18 | | in ExactLever3D lever, |
| | | 19 | | Vector3d linearVelocity, |
| | | 20 | | Vector3d angularVelocity, |
| | | 21 | | Vector3d linearImpulseAxis, |
| | | 22 | | Fixed64 inverseMass, |
| | | 23 | | Fixed3x3 inverseInertia) |
| | | 24 | | { |
| | 5258 | 25 | | Lever = lever; |
| | 5258 | 26 | | LinearVelocity = linearVelocity; |
| | 5258 | 27 | | AngularVelocity = angularVelocity; |
| | 5258 | 28 | | LinearImpulseAxis = linearImpulseAxis; |
| | 5258 | 29 | | InverseMass = inverseMass; |
| | 5258 | 30 | | InverseInertia = inverseInertia; |
| | 5258 | 31 | | } |
| | | 32 | | |
| | | 33 | | internal ExactLever3D Lever { get; } |
| | | 34 | | |
| | | 35 | | internal Vector3d LinearVelocity { get; } |
| | | 36 | | |
| | | 37 | | internal Vector3d AngularVelocity { get; } |
| | | 38 | | |
| | | 39 | | internal Vector3d LinearImpulseAxis { get; } |
| | | 40 | | |
| | | 41 | | internal Fixed64 InverseMass { get; } |
| | | 42 | | |
| | | 43 | | internal Fixed3x3 InverseInertia { get; } |
| | | 44 | | } |