< Summary

Information
Class: Gravitas.CollisionHandling.ContactNormalImpulseResultMixed
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/CollisionHandling/Response/Mixed/ContactNormalImpulseResultMixed.cs
Line coverage
100%
Covered lines: 19
Uncovered lines: 0
Coverable lines: 19
Total lines: 74
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%
.ctor(...)100%11100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/CollisionHandling/Response/Mixed/ContactNormalImpulseResultMixed.cs

#LineLine coverage
 1//=======================================================================
 2// ContactNormalImpulseResultMixed.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;
 9
 10namespace Gravitas.CollisionHandling;
 11
 12/// <summary>
 13/// Side-effect-free mixed 3D/2D contact-normal impulse result.
 14/// </summary>
 15internal readonly struct ContactNormalImpulseResultMixed
 16{
 17    public ContactNormalImpulseResultMixed(
 18        Fixed64 normalVelocity,
 19        Fixed64 impulseScalar,
 20        Vector3d linearVelocityDelta3D,
 21        Vector3d angularVelocityDelta3D,
 22        Vector2d linearVelocityDelta2D,
 23        Fixed64 angularVelocityDelta2D)
 18142024        : this(
 18142025            normalVelocity,
 18142026            impulseScalar,
 18142027            impulseScalar,
 18142028            linearVelocityDelta3D,
 18142029            angularVelocityDelta3D,
 18142030            linearVelocityDelta2D,
 18142031            angularVelocityDelta2D)
 32    {
 18142033    }
 34
 35    public ContactNormalImpulseResultMixed(
 36        Fixed64 normalVelocity,
 37        Fixed64 impulseScalar,
 38        Fixed64 appliedImpulseScalar,
 39        Vector3d linearVelocityDelta3D,
 40        Vector3d angularVelocityDelta3D,
 41        Vector2d linearVelocityDelta2D,
 42        Fixed64 angularVelocityDelta2D,
 43        bool hasRepresentableNormalVelocity = true,
 44        bool hasRepresentableAppliedImpulse = true)
 45    {
 18465246        NormalVelocity = normalVelocity;
 18465247        ImpulseScalar = impulseScalar;
 18465248        AppliedImpulseScalar = appliedImpulseScalar;
 18465249        LinearVelocityDelta3D = linearVelocityDelta3D;
 18465250        AngularVelocityDelta3D = angularVelocityDelta3D;
 18465251        LinearVelocityDelta2D = linearVelocityDelta2D;
 18465252        AngularVelocityDelta2D = angularVelocityDelta2D;
 18465253        HasRepresentableNormalVelocity = hasRepresentableNormalVelocity;
 18465254        HasRepresentableAppliedImpulse = hasRepresentableAppliedImpulse;
 18465255    }
 56
 57    public Fixed64 NormalVelocity { get; }
 58
 59    public Fixed64 ImpulseScalar { get; }
 60
 61    public Fixed64 AppliedImpulseScalar { get; }
 62
 63    public bool HasRepresentableNormalVelocity { get; }
 64
 65    public bool HasRepresentableAppliedImpulse { get; }
 66
 67    public Vector3d LinearVelocityDelta3D { get; }
 68
 69    public Vector3d AngularVelocityDelta3D { get; }
 70
 71    public Vector2d LinearVelocityDelta2D { get; }
 72
 73    public Fixed64 AngularVelocityDelta2D { get; }
 74}