< Summary

Information
Class: Gravitas.Queries.PhysicsSweepSphereAgainst2DRequest
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Queries/Mixed/Requests/PhysicsSweepSphereAgainst2DRequest.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 75
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/Queries/Mixed/Requests/PhysicsSweepSphereAgainst2DRequest.cs

#LineLine coverage
 1//=======================================================================
 2// PhysicsSweepSphereAgainst2DRequest.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;
 9using Gravitas.Colliders;
 10using Gravitas.Support;
 11
 12namespace Gravitas.Queries;
 13
 14/// <summary>
 15/// Describes one mixed 3D swept-sphere query against embedded 2D slabs.
 16/// </summary>
 17public readonly struct PhysicsSweepSphereAgainst2DRequest
 18{
 19    /// <summary>
 20    /// Creates a mixed 3D sphere sweep against embedded 2D slabs.
 21    /// </summary>
 22    public PhysicsSweepSphereAgainst2DRequest(
 23        Vector3d start,
 24        Vector3d end,
 25        Fixed64 radius,
 26        PhysicsLayerMask layerMask,
 27        LSCollider? excludedCollider = null,
 28        bool includeTriggers = true)
 29    {
 1330        Start = start;
 1331        End = end;
 1332        Radius = radius;
 1333        LayerMask = layerMask;
 1334        ExcludedCollider = excludedCollider;
 1335        IncludeTriggers = includeTriggers;
 1336    }
 37
 38    /// <summary>
 39    /// Creates a mixed 3D sphere sweep against all embedded 2D physics layers.
 40    /// </summary>
 41    public PhysicsSweepSphereAgainst2DRequest(Vector3d start, Vector3d end, Fixed64 radius)
 1042        : this(start, end, radius, PhysicsLayerMask.All)
 43    {
 1044    }
 45
 46    /// <summary>
 47    /// Gets the sphere center's world-space start.
 48    /// </summary>
 49    public Vector3d Start { get; }
 50
 51    /// <summary>
 52    /// Gets the sphere center's world-space end.
 53    /// </summary>
 54    public Vector3d End { get; }
 55
 56    /// <summary>
 57    /// Gets the swept sphere radius.
 58    /// </summary>
 59    public Fixed64 Radius { get; }
 60
 61    /// <summary>
 62    /// Gets the included 2D target layers.
 63    /// </summary>
 64    public PhysicsLayerMask LayerMask { get; }
 65
 66    /// <summary>
 67    /// Gets the optional 3D source collider used for mixed-collision filtering.
 68    /// </summary>
 69    public LSCollider? ExcludedCollider { get; }
 70
 71    /// <summary>
 72    /// Gets whether trigger targets are included.
 73    /// </summary>
 74    public bool IncludeTriggers { get; }
 75}