< Summary

Information
Class: Gravitas.CollisionHandling.ContinuousCollisionTargetPolicy
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/CollisionHandling/Continuous/ContinuousCollisionTargetPolicy.cs
Line coverage
100%
Covered lines: 28
Uncovered lines: 0
Coverable lines: 28
Total lines: 88
Line coverage: 100%
Branch coverage
100%
Covered branches: 34
Total branches: 34
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AllowsIndexed3DTarget(...)100%66100%
AllowsIndexed2DTarget(...)100%66100%
AllowsMixedIndexedTarget(...)100%66100%
AllowsStaticOrKinematic3DTarget(...)100%66100%
AllowsStaticOrKinematic2DTarget(...)100%66100%
AllowsMixedStaticOrKinematicTarget(...)100%44100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/CollisionHandling/Continuous/ContinuousCollisionTargetPolicy.cs

#LineLine coverage
 1//=======================================================================
 2// ContinuousCollisionTargetPolicy.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
 8namespace Gravitas.CollisionHandling;
 9
 10internal static class ContinuousCollisionTargetPolicy
 11{
 12    internal static bool AllowsIndexed3DTarget(
 13        bool isSelf,
 14        bool active,
 15        bool dynamicBody,
 16        bool kinematic,
 17        bool movingKinematic,
 18        bool trigger,
 19        bool physicalPairRequired) =>
 674620        !isSelf
 674621        && active
 674622        && (kinematic ? movingKinematic : dynamicBody)
 674623        && !trigger
 674624        && physicalPairRequired;
 25
 26    internal static bool AllowsIndexed2DTarget(
 27        bool isSelf,
 28        bool active,
 29        bool dynamicBody,
 30        bool kinematic,
 31        bool movingKinematic,
 32        bool trigger,
 33        bool physicalPairRequired) =>
 45234        !isSelf
 45235        && active
 45236        && (kinematic ? movingKinematic : dynamicBody)
 45237        && !trigger
 45238        && physicalPairRequired;
 39
 40    internal static bool AllowsMixedIndexedTarget(
 41        bool active,
 42        bool dynamicBody,
 43        bool kinematic,
 44        bool movingKinematic,
 45        bool trigger,
 46        bool mixedPairRequired) =>
 9247        active
 9248        && (kinematic ? movingKinematic : dynamicBody)
 9249        && !trigger
 9250        && mixedPairRequired;
 51
 52    internal static bool AllowsStaticOrKinematic3DTarget(
 53        bool isSelf,
 54        bool ignored,
 55        bool trigger,
 56        bool physicalPairRequired,
 57        bool isStatic,
 58        bool bodyKinematic) =>
 639559        !isSelf
 639560        && !ignored
 639561        && !trigger
 639562        && physicalPairRequired
 639563        && (isStatic || bodyKinematic);
 64
 65    internal static bool AllowsStaticOrKinematic2DTarget(
 66        bool isSelf,
 67        bool ignored,
 68        bool trigger,
 69        bool physicalPairRequired,
 70        bool isStatic,
 71        bool bodyKinematic) =>
 28472        !isSelf
 28473        && !ignored
 28474        && !trigger
 28475        && physicalPairRequired
 28476        && (isStatic || bodyKinematic);
 77
 78    internal static bool AllowsMixedStaticOrKinematicTarget(
 79        bool ignored,
 80        bool trigger,
 81        bool mixedPairRequired,
 82        bool isStatic,
 83        bool bodyKinematic) =>
 1484        !ignored
 1485        && !trigger
 1486        && mixedPairRequired
 1487        && (isStatic || bodyKinematic);
 88}