< Summary

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

#LineLine coverage
 1//=======================================================================
 2// PhysicsOverlapCone3DRequest.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.Support;
 10
 11namespace Gravitas.Queries;
 12
 13/// <summary>
 14/// Describes one directional 3D cone-volume overlap in a batched query call.
 15/// </summary>
 16public readonly struct PhysicsOverlapCone3DRequest
 17{
 18    /// <summary>
 19    /// Creates an apex-origin 3D cone-volume overlap request with an include layer mask.
 20    /// </summary>
 21    public PhysicsOverlapCone3DRequest(
 22        Vector3d origin,
 23        Vector3d direction,
 24        Fixed64 length,
 25        Fixed64 endRadius,
 26        PhysicsLayerMask layerMask)
 27    {
 1528        Origin = origin;
 1529        Direction = direction;
 1530        Length = length;
 1531        EndRadius = endRadius;
 1532        LayerMask = layerMask;
 1533    }
 34
 35    /// <summary>
 36    /// Creates an apex-origin 3D cone-volume overlap request against all physics layers.
 37    /// </summary>
 38    public PhysicsOverlapCone3DRequest(
 39        Vector3d origin,
 40        Vector3d direction,
 41        Fixed64 length,
 42        Fixed64 endRadius)
 343        : this(origin, direction, length, endRadius, PhysicsLayerMask.All)
 44    {
 345    }
 46
 47    /// <summary>
 48    /// Gets the world-space cone apex.
 49    /// </summary>
 50    public Vector3d Origin { get; }
 51
 52    /// <summary>
 53    /// Gets the cone axis direction.
 54    /// </summary>
 55    public Vector3d Direction { get; }
 56
 57    /// <summary>
 58    /// Gets the cone length from apex to base.
 59    /// </summary>
 60    public Fixed64 Length { get; }
 61
 62    /// <summary>
 63    /// Gets the cone radius at its base.
 64    /// </summary>
 65    public Fixed64 EndRadius { get; }
 66
 67    /// <summary>
 68    /// Gets the included physics layers.
 69    /// </summary>
 70    public PhysicsLayerMask LayerMask { get; }
 71}