< Summary

Information
Class: FixedMathSharp.Geometry.WideSlabProjection
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/FiniteAxis/WideSlabProjection.cs
Line coverage
100%
Covered lines: 635
Uncovered lines: 0
Coverable lines: 635
Total lines: 1120
Line coverage: 100%
Branch coverage
100%
Covered branches: 132
Total branches: 132
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
.ctor(...)100%11100%
TryCreateResult(...)100%66100%
KeepBest(...)100%88100%
CompareProjection(...)100%11100%
ComesAfter(...)100%44100%
CompareRatio(...)100%11100%
IsInRange(...)100%22100%
IsInRange(...)100%22100%
GetPlanarDirectionLength(...)100%11100%
GetPlanarDirectionLengthSquared(...)100%11100%
SumProducts(...)100%11100%
IsUnitInterval(...)100%11100%
ReduceDirection(...)100%11100%
CreateReduced(...)100%22100%
GetShiftedWord(...)100%11100%
GetAxisLengthSquared(...)100%11100%
GetPlanarDot(...)100%11100%
SumSquares(...)100%11100%
GetEndpointNumerator(...)100%11100%
GetConeEndpointNumerator(...)100%11100%
Compare(...)100%11100%
Minimum(...)100%22100%
Maximum(...)100%22100%
CompareMagnitude(...)100%11100%
Normalize(...)100%22100%
TryGetCapsuleSupport(...)100%44100%
TryGetCylinderSupport(...)100%44100%
TryGetConeSupport(...)100%66100%
TryAdmitCapsuleSupport(...)100%44100%
TryAdmitCylinderSupport(...)100%66100%
TryAdmitConeSupport(...)100%66100%
HasUniqueDiskSupport(...)100%11100%
AddSphereEndpoint(...)100%22100%
AddSpherePlaneCandidate(...)100%22100%
CreateEndpointRadialCandidate(...)100%11100%
AddCapsuleSideCandidate(...)100%88100%
AddDiskEndpoint(...)100%11100%
AddDiskAtRationalCenter(...)100%66100%
AddDiskPlaneCandidates(...)100%66100%
AddDiskPlaneCandidate(...)100%44100%
TryGetVerticalConeSupport(...)100%1010100%
TryGetRotatedConeSupport(...)100%22100%
AddConeApex(...)100%22100%
AddConeBaseDisk(...)100%11100%
AddConeBasePlaneCandidate(...)100%22100%
AddConeLateralCandidates(...)100%1414100%
GetConeLateralStationaryPolynomial(...)100%11100%
AddConeLateralNormal(...)100%88100%
AddConeGeneratorPlane(...)100%22100%
TryCreateConeDiskPlaneCandidate(...)100%44100%
GetConeDiskCenterNumerator(...)100%11100%

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/FiniteAxis/WideSlabProjection.cs

#LineLine coverage
 1//=======================================================================
 2// WideSlabProjection.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2024–present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8using System;
 9
 10namespace FixedMathSharp.Geometry;
 11
 12/// <summary>
 13/// Owns full-domain candidate construction for finite-slab projections.
 14/// </summary>
 15internal static class WideSlabProjection
 16{
 117    private static readonly Signed192 Scale = Signed192.Signed(Fixed64.One.m_rawValue);
 118    private static readonly Signed192 CenteredAxisScale = WideArithmetic.Double(Scale);
 119    private static readonly Signed192 ScaleSquared = new(0UL, 1UL, 0UL);
 120    private static readonly Signed192 CenteredAxisScaleTimesScale = WideArithmetic.Double(ScaleSquared);
 121    private static readonly Signed192 CenteredAxisScaleSquared = WideArithmetic.Double(CenteredAxisScaleTimesScale);
 22
 23    #region Nested Types
 24
 25    private readonly struct WidePlanarCandidate
 26    {
 27        internal readonly Signed576 X;
 28        internal readonly Signed576 Z;
 29        internal readonly Signed576 Denominator;
 30
 31        internal WidePlanarCandidate(Signed576 x, Signed576 z, Signed576 denominator)
 32        {
 23533            X = x;
 23534            Z = z;
 23535            Denominator = denominator;
 23536        }
 37    }
 38
 39    #endregion
 40
 41    private static bool TryCreateResult(bool found, WidePlanarCandidate candidate, out Vector2d support)
 42    {
 19343        if (!found
 19344            || !Fixed64.TryGetSignedRawRatio(candidate.X, candidate.Denominator, out Fixed64 x)
 19345            || !Fixed64.TryGetSignedRawRatio(candidate.Z, candidate.Denominator, out Fixed64 z))
 46        {
 2647            support = default;
 2648            return false;
 49        }
 50
 16751        support = new Vector2d(x, z);
 16752        return true;
 53    }
 54
 55    private static void KeepBest(
 56        WidePlanarCandidate candidate,
 57        Vector2d direction,
 58        ref bool found,
 59        ref WidePlanarCandidate best)
 60    {
 22561        if (found)
 62        {
 4563            int projection = CompareProjection(candidate, best, direction);
 4564            if (projection < 0 || (projection == 0 && ComesAfter(candidate, best)))
 1765                return;
 66        }
 67
 20868        found = true;
 20869        best = candidate;
 20870    }
 71
 72    private static int CompareProjection(WidePlanarCandidate left, WidePlanarCandidate right, Vector2d direction)
 73    {
 5374        Signed576 leftProjection = WideArithmetic.AddSigned576(
 5375            WideArithmetic.MultiplySigned576(left.X, Signed192.Raw(direction.X)),
 5376            WideArithmetic.MultiplySigned576(left.Z, Signed192.Raw(direction.Y)));
 5377        Signed576 rightProjection = WideArithmetic.AddSigned576(
 5378            WideArithmetic.MultiplySigned576(right.X, Signed192.Raw(direction.X)),
 5379            WideArithmetic.MultiplySigned576(right.Z, Signed192.Raw(direction.Y)));
 5380        return WideArithmetic.SubtractSigned832(
 5381            WideArithmetic.MultiplySigned576ToSigned832(leftProjection, right.Denominator),
 5382            WideArithmetic.MultiplySigned576ToSigned832(rightProjection, left.Denominator)).Sign;
 83    }
 84
 85    private static bool ComesAfter(WidePlanarCandidate left, WidePlanarCandidate right)
 86    {
 2287        int x = CompareRatio(left.X, left.Denominator, right.X, right.Denominator);
 2288        return x > 0 || (x == 0 && CompareRatio(left.Z, left.Denominator, right.Z, right.Denominator) > 0);
 89    }
 90
 91    private static int CompareRatio(Signed576 left, Signed576 leftDenominator, Signed576 right, Signed576 rightDenominat
 4092        WideArithmetic.SubtractSigned832(
 4093            WideArithmetic.MultiplySigned576ToSigned832(left, rightDenominator),
 4094            WideArithmetic.MultiplySigned576ToSigned832(right, leftDenominator)).Sign;
 95
 96    private static bool IsInRange(Signed320 numerator, Signed192 denominator, FixedRange range) =>
 20997        Compare(numerator, WideArithmetic.MultiplySigned192(Signed192.Raw(range.Min), denominator)) >= 0
 20998        && Compare(numerator, WideArithmetic.MultiplySigned192(Signed192.Raw(range.Max), denominator)) <= 0;
 99
 100    private static bool IsInRange(Signed576 numerator, Signed576 denominator, FixedRange range) =>
 50101        WideArithmetic.SubtractSigned576(numerator, WideArithmetic.MultiplySigned576(denominator, Signed192.Raw(range.Mi
 50102        && WideArithmetic.SubtractSigned576(numerator, WideArithmetic.MultiplySigned576(denominator, Signed192.Raw(range
 103
 104    private static Signed192 GetPlanarDirectionLength(Vector2d direction)
 105    {
 149106        Signed192 squared = WideGeometry.GetDifferenceDotProduct2D(
 149107            direction.X, Fixed64.Zero, direction.Y, Fixed64.Zero,
 149108            direction.X, Fixed64.Zero, direction.Y, Fixed64.Zero);
 149109        return WideArithmetic.GetFloorSquareRoot(
 149110            WideArithmetic.MultiplySigned192(squared, ScaleSquared), out _);
 111    }
 112
 113    private static Signed192 GetPlanarDirectionLengthSquared(Vector2d direction) =>
 13114        WideGeometry.GetDifferenceDotProduct2D(
 13115            direction.X, Fixed64.Zero, direction.Y, Fixed64.Zero,
 13116            direction.X, Fixed64.Zero, direction.Y, Fixed64.Zero);
 117
 118    private static Signed576 SumProducts(Vector3d axis, Signed576 x, Signed576 y, Signed576 z) =>
 15119        WideArithmetic.AddSigned576(
 15120            WideArithmetic.AddSigned576(
 15121                WideArithmetic.MultiplySigned576(x, Signed192.Raw(axis.X)),
 15122                WideArithmetic.MultiplySigned576(y, Signed192.Raw(axis.Y))),
 15123            WideArithmetic.MultiplySigned576(z, Signed192.Raw(axis.Z)));
 124
 125    private static bool IsUnitInterval(Signed576 numerator, Signed576 denominator)
 126    {
 14127        int denominatorSign = denominator.Sign;
 14128        int numeratorSign = numerator.Sign;
 14129        int remainderSign = WideArithmetic.SubtractSigned576(numerator, denominator).Sign;
 14130        return ((denominatorSign > 0) & (numeratorSign >= 0) & (remainderSign <= 0))
 14131            | ((denominatorSign < 0) & (numeratorSign <= 0) & (remainderSign >= 0));
 132    }
 133
 134    private static void ReduceDirection(
 135        Signed576 x,
 136        Signed576 y,
 137        Signed576 z,
 138        Signed576 length,
 139        out Signed192 reducedX,
 140        out Signed192 reducedY,
 141        out Signed192 reducedZ,
 142        out Signed192 reducedLength)
 143    {
 144        // The extra zero word makes cross-word shifts branch-free at the
 145        // upper edge of a 576-bit magnitude.
 11146        Span<ulong> xMagnitude = stackalloc ulong[10];
 11147        Span<ulong> yMagnitude = stackalloc ulong[10];
 11148        Span<ulong> zMagnitude = stackalloc ulong[10];
 11149        Span<ulong> lengthMagnitude = stackalloc ulong[10];
 11150        xMagnitude.Clear();
 11151        yMagnitude.Clear();
 11152        zMagnitude.Clear();
 11153        lengthMagnitude.Clear();
 11154        WideArithmetic.GetMagnitude(x, xMagnitude[..9]);
 11155        WideArithmetic.GetMagnitude(y, yMagnitude[..9]);
 11156        WideArithmetic.GetMagnitude(z, zMagnitude[..9]);
 11157        WideArithmetic.GetMagnitude(length, lengthMagnitude[..9]);
 11158        int shift = Math.Max(0,
 11159            Math.Max(
 11160                Math.Max(WideArithmetic.GetMagnitudeBitLength(xMagnitude), WideArithmetic.GetMagnitudeBitLength(yMagnitu
 11161                Math.Max(WideArithmetic.GetMagnitudeBitLength(zMagnitude), WideArithmetic.GetMagnitudeBitLength(lengthMa
 11162        reducedX = CreateReduced(xMagnitude, shift, x.Sign < 0);
 11163        reducedY = CreateReduced(yMagnitude, shift, y.Sign < 0);
 11164        reducedZ = CreateReduced(zMagnitude, shift, z.Sign < 0);
 11165        reducedLength = CreateReduced(lengthMagnitude, shift, false);
 11166    }
 167
 168    private static Signed192 CreateReduced(ReadOnlySpan<ulong> magnitude, int shift, bool negative)
 169    {
 44170        int wordShift = shift >> 6;
 44171        int bitShift = shift & 63;
 44172        ulong low = GetShiftedWord(magnitude, wordShift, bitShift);
 44173        ulong middle = GetShiftedWord(magnitude, wordShift + 1, bitShift);
 44174        ulong high = GetShiftedWord(magnitude, wordShift + 2, bitShift);
 44175        Signed192 value = new(high, middle, low);
 44176        return negative ? WideArithmetic.SubtractSigned192(default, value) : value;
 177    }
 178
 179    private static ulong GetShiftedWord(ReadOnlySpan<ulong> magnitude, int wordIndex, int bitShift)
 180    {
 132181        ulong value = magnitude[wordIndex] >> bitShift;
 132182        int complementaryShift = (64 - bitShift) & 63;
 132183        ulong nonZeroShiftMask = 0UL - ((ulong)(bitShift + 63) >> 6);
 132184        return value | ((magnitude[wordIndex + 1] << complementaryShift) & nonZeroShiftMask);
 185    }
 186
 187    private static Signed192 GetAxisLengthSquared(Vector3d axis) =>
 70188        WideGeometry.GetDifferenceDotProduct3D(
 70189            axis.X, Fixed64.Zero, axis.Y, Fixed64.Zero, axis.Z, Fixed64.Zero,
 70190            axis.X, Fixed64.Zero, axis.Y, Fixed64.Zero, axis.Z, Fixed64.Zero);
 191
 192    private static Signed192 GetPlanarDot(Vector3d axis, Vector2d direction) =>
 272193        WideGeometry.GetDifferenceDotProduct2D(
 272194            axis.X, Fixed64.Zero, axis.Z, Fixed64.Zero,
 272195            direction.X, Fixed64.Zero, direction.Y, Fixed64.Zero);
 196
 197    private static Signed576 SumSquares(Signed320 x, Signed320 y, Signed320 z) =>
 106198        WideArithmetic.AddSigned576(
 106199            WideArithmetic.AddSigned576(
 106200                WideArithmetic.MultiplySigned320(x, x),
 106201                WideArithmetic.MultiplySigned320(y, y)),
 106202            WideArithmetic.MultiplySigned320(z, z));
 203
 204    private static Signed320 GetEndpointNumerator(Fixed64 center, Fixed64 axis, Fixed64 axisLength, int sign) =>
 621205        WideArithmetic.AddSigned320(
 621206            WideArithmetic.MultiplySigned192(Signed192.Raw(center), CenteredAxisScale),
 621207            WideArithmetic.MultiplySigned192(Signed192.Raw(axis), Signed192.Signed(sign * axisLength.m_rawValue)));
 208
 209    private static Signed320 GetConeEndpointNumerator(Fixed64 center, Fixed64 axis, Fixed64 height, int sign) =>
 190210        WideArithmetic.AddSigned320(
 190211            WideArithmetic.MultiplySigned192(Signed192.Raw(center), WideArithmetic.Double(Scale)),
 190212            WideArithmetic.MultiplySigned192(Signed192.Raw(axis), Signed192.Signed(sign * height.m_rawValue)));
 213
 214    private static int Compare(Signed320 left, Signed320 right) =>
 419215        WideArithmetic.SubtractSigned320(left, right).Sign;
 216
 2217    private static Signed320 Minimum(Signed320 left, Signed320 right) => Compare(left, right) <= 0 ? left : right;
 218
 5219    private static Signed320 Maximum(Signed320 left, Signed320 right) => Compare(left, right) >= 0 ? left : right;
 220
 221    private static int CompareMagnitude(Signed576 left, Signed576 right) =>
 12222        WideArithmetic.CompareNonNegative(WideArithmetic.Absolute(left), WideArithmetic.Absolute(right));
 223
 224    private static void Normalize(ref Signed576 x, ref Signed576 z, ref Signed576 denominator)
 225    {
 14226        if (denominator.Sign >= 0)
 6227            return;
 8228        x = WideArithmetic.SubtractSigned576(default, x);
 8229        z = WideArithmetic.SubtractSigned576(default, z);
 8230        denominator = WideArithmetic.SubtractSigned576(default, denominator);
 8231    }
 232
 233    internal static bool TryGetCapsuleSupport(
 234            Vector3d center,
 235            Vector3d axis,
 236            Fixed64 axisLength,
 237            Fixed64 radius,
 238            FixedRange slab,
 239            Vector2d direction,
 240            out Vector2d support)
 241    {
 144242        Signed192 directionLength = GetPlanarDirectionLength(direction);
 144243        if (TryAdmitCapsuleSupport(center, axis, axisLength, radius, slab, direction, directionLength, out support))
 134244            return true;
 245
 10246        bool found = false;
 10247        WidePlanarCandidate best = default;
 10248        AddSphereEndpoint(center, axis, axisLength, radius, -1, slab, direction, directionLength, ref found, ref best);
 10249        AddSphereEndpoint(center, axis, axisLength, radius, 1, slab, direction, directionLength, ref found, ref best);
 10250        AddSpherePlaneCandidate(center, axis, axisLength, radius, -1, slab.Min, direction, directionLength, ref found, r
 10251        AddSpherePlaneCandidate(center, axis, axisLength, radius, 1, slab.Min, direction, directionLength, ref found, re
 10252        AddCapsuleSideCandidate(center, axis, axisLength, radius, slab.Min, direction, ref found, ref best);
 10253        if (slab.Max != slab.Min)
 254        {
 5255            AddSpherePlaneCandidate(center, axis, axisLength, radius, -1, slab.Max, direction, directionLength, ref foun
 5256            AddSpherePlaneCandidate(center, axis, axisLength, radius, 1, slab.Max, direction, directionLength, ref found
 5257            AddCapsuleSideCandidate(center, axis, axisLength, radius, slab.Max, direction, ref found, ref best);
 258        }
 259
 10260        return TryCreateResult(found, best, out support);
 261    }
 262
 263    internal static bool TryGetCylinderSupport(
 264        Vector3d center,
 265        Vector3d axis,
 266        Fixed64 axisLength,
 267        Fixed64 radius,
 268        FixedRange slab,
 269        Vector2d direction,
 270        out Vector2d support)
 271    {
 15272        Signed192 axisLengthSquared = GetAxisLengthSquared(axis);
 15273        if (TryAdmitCylinderSupport(center, axis, axisLength, radius, slab, direction, axisLengthSquared, out support))
 4274            return true;
 275
 11276        bool found = false;
 11277        WidePlanarCandidate best = default;
 11278        AddDiskEndpoint(center, axis, axisLength, radius, -1, slab, direction, axisLengthSquared, ref found, ref best);
 11279        AddDiskEndpoint(center, axis, axisLength, radius, 1, slab, direction, axisLengthSquared, ref found, ref best);
 11280        AddDiskPlaneCandidates(center, axis, axisLength, radius, -1, slab.Min, direction, axisLengthSquared, ref found, 
 11281        AddDiskPlaneCandidates(center, axis, axisLength, radius, 1, slab.Min, direction, axisLengthSquared, ref found, r
 11282        AddCapsuleSideCandidate(center, axis, axisLength, radius, slab.Min, direction, ref found, ref best);
 11283        if (slab.Max != slab.Min)
 284        {
 7285            AddDiskPlaneCandidates(center, axis, axisLength, radius, -1, slab.Max, direction, axisLengthSquared, ref fou
 7286            AddDiskPlaneCandidates(center, axis, axisLength, radius, 1, slab.Max, direction, axisLengthSquared, ref foun
 7287            AddCapsuleSideCandidate(center, axis, axisLength, radius, slab.Max, direction, ref found, ref best);
 288        }
 289
 11290        return TryCreateResult(found, best, out support);
 291    }
 292
 293    internal static bool TryGetConeSupport(
 294        Vector3d center,
 295        Vector3d axis,
 296        Fixed64 height,
 297        Fixed64 radius,
 298        FixedRange slab,
 299        Vector2d direction,
 300        out Vector2d support)
 301    {
 302        // A vertical cone slice is a disk whose radius changes linearly with Y.
 303        // The general rotated-cone branch is added below after the shared cap
 304        // candidates so the same exact endpoint ownership is retained.
 22305        if (axis.X == Fixed64.Zero && axis.Z == Fixed64.Zero)
 7306            return TryGetVerticalConeSupport(center, axis, height, radius, slab, direction, out support);
 307
 15308        Signed192 axisLengthSquared = GetAxisLengthSquared(axis);
 15309        if (TryAdmitConeSupport(center, axis, height, radius, slab, direction, axisLengthSquared, out support))
 2310            return true;
 311
 13312        return TryGetRotatedConeSupport(center, axis, height, radius, slab, direction, axisLengthSquared, out support);
 313    }
 314
 315    private static bool TryAdmitCapsuleSupport(
 316        Vector3d center,
 317        Vector3d axis,
 318        Fixed64 axisLength,
 319        Fixed64 radius,
 320        FixedRange slab,
 321        Vector2d direction,
 322        Signed192 directionLength,
 323        out Vector2d support)
 324    {
 144325        Signed192 dot = GetPlanarDot(axis, direction);
 144326        bool found = false;
 144327        WidePlanarCandidate best = default;
 144328        if (dot.Sign <= 0)
 7329            AddSphereEndpoint(center, axis, axisLength, radius, -1, slab, direction, directionLength, ref found, ref bes
 144330        if (dot.Sign >= 0)
 142331            AddSphereEndpoint(center, axis, axisLength, radius, 1, slab, direction, directionLength, ref found, ref best
 144332        return TryCreateResult(found, best, out support);
 333    }
 334
 335    private static bool TryAdmitCylinderSupport(
 336        Vector3d center,
 337        Vector3d axis,
 338        Fixed64 axisLength,
 339        Fixed64 radius,
 340        FixedRange slab,
 341        Vector2d direction,
 342        Signed192 axisLengthSquared,
 343        out Vector2d support)
 344    {
 15345        if (!HasUniqueDiskSupport(axis, direction, axisLengthSquared))
 346        {
 6347            support = default;
 6348            return false;
 349        }
 350
 9351        Signed192 dot = GetPlanarDot(axis, direction);
 9352        bool found = false;
 9353        WidePlanarCandidate best = default;
 9354        if (dot.Sign <= 0)
 8355            AddDiskEndpoint(center, axis, axisLength, radius, -1, slab, direction, axisLengthSquared, ref found, ref bes
 9356        if (dot.Sign >= 0)
 8357            AddDiskEndpoint(center, axis, axisLength, radius, 1, slab, direction, axisLengthSquared, ref found, ref best
 9358        return TryCreateResult(found, best, out support);
 359    }
 360
 361    private static bool TryAdmitConeSupport(
 362        Vector3d center,
 363        Vector3d axis,
 364        Fixed64 height,
 365        Fixed64 radius,
 366        FixedRange slab,
 367        Vector2d direction,
 368        Signed192 axisLengthSquared,
 369        out Vector2d support)
 370    {
 15371        if (!HasUniqueDiskSupport(axis, direction, axisLengthSquared))
 372        {
 2373            support = default;
 2374            return false;
 375        }
 376
 13377        bool apexFound = false;
 13378        WidePlanarCandidate apex = default;
 13379        AddConeApex(center, axis, height, slab, direction, ref apexFound, ref apex);
 13380        bool baseFound = false;
 13381        WidePlanarCandidate baseCandidate = default;
 13382        AddConeBaseDisk(center, axis, height, radius, slab, direction, axisLengthSquared, ref baseFound, ref baseCandida
 13383        if (!apexFound || !baseFound)
 384        {
 11385            support = default;
 11386            return false;
 387        }
 388
 2389        bool found = true;
 2390        KeepBest(baseCandidate, direction, ref found, ref apex);
 2391        return TryCreateResult(true, apex, out support);
 392    }
 393
 394    private static bool HasUniqueDiskSupport(Vector3d axis, Vector2d direction, Signed192 axisLengthSquared)
 395    {
 30396        Signed192 dot = GetPlanarDot(axis, direction);
 30397        Signed320 gx = WideArithmetic.SubtractSigned320(
 30398            WideArithmetic.MultiplySigned192(axisLengthSquared, Signed192.Raw(direction.X)),
 30399            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.X), dot));
 30400        Signed320 gy = WideArithmetic.SubtractSigned320(
 30401            default,
 30402            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Y), dot));
 30403        Signed320 gz = WideArithmetic.SubtractSigned320(
 30404            WideArithmetic.MultiplySigned192(axisLengthSquared, Signed192.Raw(direction.Y)),
 30405            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Z), dot));
 30406        return !SumSquares(gx, gy, gz).IsZero;
 407    }
 408
 409    private static void AddSphereEndpoint(
 410            Vector3d center,
 411            Vector3d axis,
 412            Fixed64 axisLength,
 413            Fixed64 radius,
 414            int sign,
 415            FixedRange slab,
 416            Vector2d direction,
 417            Signed192 directionLength,
 418            ref bool found,
 419            ref WidePlanarCandidate best)
 420    {
 169421        Signed320 y = GetEndpointNumerator(center.Y, axis.Y, axisLength, sign);
 169422        if (!IsInRange(y, CenteredAxisScale, slab))
 23423            return;
 424
 146425        KeepBest(CreateEndpointRadialCandidate(
 146426            center, axis, axisLength, radius, sign, direction, directionLength), direction, ref found, ref best);
 146427    }
 428
 429    private static void AddSpherePlaneCandidate(
 430        Vector3d center,
 431        Vector3d axis,
 432        Fixed64 axisLength,
 433        Fixed64 radius,
 434        int sign,
 435        Fixed64 plane,
 436        Vector2d direction,
 437        Signed192 directionLength,
 438        ref bool found,
 439        ref WidePlanarCandidate best)
 440    {
 30441        Signed320 k = WideArithmetic.SubtractSigned320(
 30442            WideArithmetic.MultiplySigned192(WideArithmetic.SubtractSigned192(Signed192.Raw(plane), Signed192.Raw(center
 30443            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Y), Signed192.Signed(sign * axisLength.m_rawValue)));
 30444        Signed576 squaredRadius = WideArithmetic.MultiplySigned576(
 30445            Signed576.ExtendValue(WideArithmetic.MultiplySigned192(Signed192.Raw(radius), Signed192.Raw(radius))),
 30446            CenteredAxisScaleSquared);
 30447        Signed576 radicand = WideArithmetic.SubtractSigned576(
 30448            squaredRadius,
 30449            WideArithmetic.MultiplySigned320(k, k));
 30450        if (radicand.Sign < 0)
 24451            return;
 452
 6453        Signed320 root = WideArithmetic.GetFloorSquareRootScaledByFixed64(radicand);
 6454        Signed576 denominator = Signed576.ExtendValue(
 6455            WideArithmetic.MultiplySigned192(CenteredAxisScale, directionLength));
 6456        Signed576 x = WideArithmetic.AddSigned576(
 6457            WideArithmetic.MultiplySigned320(GetEndpointNumerator(center.X, axis.X, axisLength, sign), directionLength),
 6458            WideArithmetic.MultiplySigned576(Signed576.ExtendValue(root), Signed192.Raw(direction.X)));
 6459        Signed576 z = WideArithmetic.AddSigned576(
 6460            WideArithmetic.MultiplySigned320(GetEndpointNumerator(center.Z, axis.Z, axisLength, sign), directionLength),
 6461            WideArithmetic.MultiplySigned576(Signed576.ExtendValue(root), Signed192.Raw(direction.Y)));
 6462        KeepBest(new WidePlanarCandidate(x, z, denominator), direction, ref found, ref best);
 6463    }
 464
 465    private static WidePlanarCandidate CreateEndpointRadialCandidate(
 466        Vector3d center,
 467        Vector3d axis,
 468        Fixed64 axisLength,
 469        Fixed64 radius,
 470        int sign,
 471        Vector2d direction,
 472        Signed192 directionLength)
 473    {
 147474        Signed576 denominator = Signed576.ExtendValue(
 147475            WideArithmetic.MultiplySigned192(CenteredAxisScale, directionLength));
 147476        Signed576 radialScale = WideArithmetic.MultiplySigned576(
 147477            Signed576.ExtendValue(WideArithmetic.MultiplySigned192(
 147478                Signed192.Raw(radius),
 147479                CenteredAxisScaleTimesScale)),
 147480            Signed192.Raw(direction.X));
 147481        Signed576 x = WideArithmetic.AddSigned576(
 147482            WideArithmetic.MultiplySigned320(GetEndpointNumerator(center.X, axis.X, axisLength, sign), directionLength),
 147483            radialScale);
 147484        Signed576 z = WideArithmetic.AddSigned576(
 147485            WideArithmetic.MultiplySigned320(GetEndpointNumerator(center.Z, axis.Z, axisLength, sign), directionLength),
 147486            WideArithmetic.MultiplySigned576(
 147487                Signed576.ExtendValue(WideArithmetic.MultiplySigned192(
 147488                    Signed192.Raw(radius),
 147489                    CenteredAxisScaleTimesScale)),
 147490                Signed192.Raw(direction.Y)));
 147491        return new WidePlanarCandidate(x, z, denominator);
 492    }
 493
 494    private static void AddCapsuleSideCandidate(
 495        Vector3d center,
 496        Vector3d axis,
 497        Fixed64 axisLength,
 498        Fixed64 radius,
 499        Fixed64 plane,
 500        Vector2d direction,
 501        ref bool found,
 502        ref WidePlanarCandidate best)
 503    {
 33504        if (axis.Y == Fixed64.Zero)
 21505            return;
 506
 12507        Signed192 m = GetPlanarDot(axis, direction);
 12508        int sign = axis.Y.m_rawValue < 0L ? -1 : 1;
 12509        Signed192 absY = Signed192.Raw(axis.Y.Abs());
 12510        Signed320 wx = WideArithmetic.MultiplySigned192(absY, Signed192.Raw(direction.X));
 12511        Signed320 wy = Signed320.ExtendValue(sign < 0 ? m : WideArithmetic.SubtractSigned192(default, m));
 12512        Signed320 wz = WideArithmetic.MultiplySigned192(absY, Signed192.Raw(direction.Y));
 12513        Signed576 squared = SumSquares(wx, wy, wz);
 12514        Signed320 length = WideArithmetic.GetFloorSquareRootScaledByFixed64(squared);
 12515        Signed576 radialX = WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(Signed576.ExtendValue(wx),
 12516        Signed576 radialY = WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(Signed576.ExtendValue(wy),
 12517        Signed576 radialZ = WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(Signed576.ExtendValue(wz),
 12518        Signed576 delta = WideArithmetic.SubtractSigned576(
 12519            WideArithmetic.MultiplySigned576(Signed576.ExtendValue(length), WideArithmetic.SubtractSigned192(Signed192.R
 12520            radialY);
 12521        Signed576 axisDenominator = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(length), Signed192.Raw(axis.Y
 12522        Signed576 parameterNumerator = WideArithmetic.MultiplySigned576(delta, CenteredAxisScale);
 12523        Signed576 parameterLimit = WideArithmetic.MultiplySigned576(WideArithmetic.Absolute(axisDenominator), Signed192.
 12524        if (CompareMagnitude(parameterNumerator, parameterLimit) > 0)
 6525            return;
 526
 6527        Signed576 x = WideArithmetic.AddSigned576(
 6528            WideArithmetic.AddSigned576(
 6529                WideArithmetic.MultiplySigned576(axisDenominator, Signed192.Raw(center.X)),
 6530                WideArithmetic.MultiplySigned576(delta, Signed192.Raw(axis.X))),
 6531            WideArithmetic.MultiplySigned576(radialX, Signed192.Raw(axis.Y)));
 6532        Signed576 z = WideArithmetic.AddSigned576(
 6533            WideArithmetic.AddSigned576(
 6534                WideArithmetic.MultiplySigned576(axisDenominator, Signed192.Raw(center.Z)),
 6535                WideArithmetic.MultiplySigned576(delta, Signed192.Raw(axis.Z))),
 6536            WideArithmetic.MultiplySigned576(radialZ, Signed192.Raw(axis.Y)));
 6537        Normalize(ref x, ref z, ref axisDenominator);
 6538        KeepBest(new WidePlanarCandidate(x, z, axisDenominator), direction, ref found, ref best);
 6539    }
 540
 541    private static void AddDiskEndpoint(
 542        Vector3d center,
 543        Vector3d axis,
 544        Fixed64 axisLength,
 545        Fixed64 radius,
 546        int sign,
 547        FixedRange slab,
 548        Vector2d direction,
 549        Signed192 axisLengthSquared,
 550        ref bool found,
 551        ref WidePlanarCandidate best)
 552    {
 38553        Signed320 baseX = GetEndpointNumerator(center.X, axis.X, axisLength, sign);
 38554        Signed320 baseY = GetEndpointNumerator(center.Y, axis.Y, axisLength, sign);
 38555        Signed320 baseZ = GetEndpointNumerator(center.Z, axis.Z, axisLength, sign);
 38556        AddDiskAtRationalCenter(
 38557            baseX,
 38558            baseY,
 38559            baseZ,
 38560            CenteredAxisScale,
 38561            axis,
 38562            radius,
 38563            slab,
 38564            direction,
 38565            axisLengthSquared,
 38566            ref found,
 38567            ref best);
 38568    }
 569
 570    private static void AddDiskAtRationalCenter(
 571        Signed320 baseX,
 572        Signed320 baseY,
 573        Signed320 baseZ,
 574        Signed192 baseDenominator,
 575        Vector3d axis,
 576        Fixed64 radius,
 577        FixedRange slab,
 578        Vector2d direction,
 579        Signed192 axisLengthSquared,
 580        ref bool found,
 581        ref WidePlanarCandidate best)
 582    {
 64583        Signed192 m = GetPlanarDot(axis, direction);
 64584        Signed320 gx = WideArithmetic.SubtractSigned320(
 64585            WideArithmetic.MultiplySigned192(axisLengthSquared, Signed192.Raw(direction.X)),
 64586            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.X), m));
 64587        Signed320 gy = WideArithmetic.SubtractSigned320(
 64588            default,
 64589            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Y), m));
 64590        Signed320 gz = WideArithmetic.SubtractSigned320(
 64591            WideArithmetic.MultiplySigned192(axisLengthSquared, Signed192.Raw(direction.Y)),
 64592            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Z), m));
 64593        Signed576 squared = SumSquares(gx, gy, gz);
 64594        if (squared.IsZero)
 595        {
 14596            if (IsInRange(baseY, baseDenominator, slab))
 597            {
 11598                Signed576 denominator = Signed576.ExtendValue(Signed320.ExtendValue(baseDenominator));
 11599                KeepBest(new WidePlanarCandidate(
 11600                    Signed576.ExtendValue(baseX),
 11601                    Signed576.ExtendValue(baseZ),
 11602                    denominator), direction, ref found, ref best);
 603            }
 14604            return;
 605        }
 606
 50607        Signed320 length = WideArithmetic.GetFloorSquareRootScaledByFixed64(squared);
 50608        Signed576 denominatorWide = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(length), baseDenominator);
 50609        Signed320 radialFactor = WideArithmetic.MultiplySigned192(Signed192.Raw(radius), baseDenominator);
 50610        Signed576 x = WideArithmetic.AddSigned576(
 50611            WideArithmetic.MultiplySigned320(baseX, length),
 50612            WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned320(radialFactor, gx), Scale));
 50613        Signed576 y = WideArithmetic.AddSigned576(
 50614            WideArithmetic.MultiplySigned320(baseY, length),
 50615            WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned320(radialFactor, gy), Scale));
 50616        Signed576 z = WideArithmetic.AddSigned576(
 50617            WideArithmetic.MultiplySigned320(baseZ, length),
 50618            WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned320(radialFactor, gz), Scale));
 50619        if (!IsInRange(y, denominatorWide, slab))
 32620            return;
 621
 18622        KeepBest(new WidePlanarCandidate(x, z, denominatorWide), direction, ref found, ref best);
 18623    }
 624
 625    private static void AddDiskPlaneCandidates(
 626        Vector3d center,
 627        Vector3d axis,
 628        Fixed64 axisLength,
 629        Fixed64 radius,
 630        int sign,
 631        Fixed64 plane,
 632        Vector2d direction,
 633        Signed192 axisLengthSquared,
 634        ref bool found,
 635        ref WidePlanarCandidate best)
 636    {
 36637        Signed192 planarAxisSquared = WideArithmetic.SubtractSigned192(
 36638            axisLengthSquared,
 36639            Signed192.NarrowValue(WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Y), Signed192.Raw(axis.Y))));
 36640        Signed320 k = WideArithmetic.SubtractSigned320(
 36641            WideArithmetic.MultiplySigned192(WideArithmetic.SubtractSigned192(Signed192.Raw(plane), Signed192.Raw(center
 36642            WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Y), Signed192.Signed(sign * axisLength.m_rawValue)));
 36643        if (planarAxisSquared.IsZero)
 644        {
 10645            if (!k.IsZero)
 9646                return;
 1647            KeepBest(CreateEndpointRadialCandidate(
 1648                center, axis, axisLength, radius, sign, direction, GetPlanarDirectionLength(direction)),
 1649                direction, ref found, ref best);
 1650            return;
 651        }
 652
 26653        Signed576 first = WideArithmetic.MultiplySigned576(
 26654            WideArithmetic.MultiplySigned576(
 26655                Signed576.ExtendValue(WideArithmetic.MultiplySigned192(Signed192.Raw(radius), Signed192.Raw(radius))),
 26656                CenteredAxisScaleSquared),
 26657            planarAxisSquared);
 26658        Signed576 second = WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned320(k, k), axisLengthSquared);
 26659        Signed576 radicand = WideArithmetic.SubtractSigned576(first, second);
 26660        if (radicand.Sign < 0)
 18661            return;
 662
 8663        Signed320 root = WideArithmetic.GetFloorSquareRootScaledByFixed64(radicand);
 8664        Signed320 denominator320 = WideArithmetic.MultiplySigned192(
 8665            CenteredAxisScaleSquared,
 8666            planarAxisSquared);
 8667        Signed576 denominator = Signed576.ExtendValue(denominator320);
 8668        AddDiskPlaneCandidate(center, axis, axisLength, sign, k, root, planarAxisSquared, -axis.Z, axis.X, -1, denominat
 8669        AddDiskPlaneCandidate(center, axis, axisLength, sign, k, root, planarAxisSquared, -axis.Z, axis.X, 1, denominato
 8670    }
 671
 672    private static void AddDiskPlaneCandidate(
 673        Vector3d center,
 674        Vector3d axis,
 675        Fixed64 axisLength,
 676        int endpointSign,
 677        Signed320 k,
 678        Signed320 root,
 679        Signed192 planarAxisSquared,
 680        Fixed64 tangentX,
 681        Fixed64 tangentZ,
 682        int tangentSign,
 683        Signed576 denominator,
 684        Vector2d direction,
 685        ref bool found,
 686        ref WidePlanarCandidate best)
 687    {
 16688        Signed576 x = WideArithmetic.MultiplySigned576(
 16689            WideArithmetic.MultiplySigned320(
 16690                GetEndpointNumerator(center.X, axis.X, axisLength, endpointSign),
 16691                CenteredAxisScale),
 16692            planarAxisSquared);
 16693        Signed576 z = WideArithmetic.MultiplySigned576(
 16694            WideArithmetic.MultiplySigned320(
 16695                GetEndpointNumerator(center.Z, axis.Z, axisLength, endpointSign),
 16696                CenteredAxisScale),
 16697            planarAxisSquared);
 16698        Signed576 xParticular = WideArithmetic.MultiplySigned576(
 16699            WideArithmetic.MultiplySigned576(
 16700                WideArithmetic.MultiplySigned576(Signed576.ExtendValue(k), Signed192.Raw(axis.Y)),
 16701                Signed192.Raw(axis.X)),
 16702            CenteredAxisScale);
 16703        Signed576 zParticular = WideArithmetic.MultiplySigned576(
 16704            WideArithmetic.MultiplySigned576(
 16705                WideArithmetic.MultiplySigned576(Signed576.ExtendValue(k), Signed192.Raw(axis.Y)),
 16706                Signed192.Raw(axis.Z)),
 16707            CenteredAxisScale);
 16708        x = WideArithmetic.SubtractSigned576(x, xParticular);
 16709        z = WideArithmetic.SubtractSigned576(z, zParticular);
 16710        Signed576 xTangent = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(root), Signed192.Raw(tangentX));
 16711        Signed576 zTangent = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(root), Signed192.Raw(tangentZ));
 712        // The disk denominator contains the squared centered-axis scale; the
 713        // square root contributes only one factor.
 16714        xTangent = WideArithmetic.Double(xTangent);
 16715        zTangent = WideArithmetic.Double(zTangent);
 16716        x = tangentSign < 0 ? WideArithmetic.SubtractSigned576(x, xTangent) : WideArithmetic.AddSigned576(x, xTangent);
 16717        z = tangentSign < 0 ? WideArithmetic.SubtractSigned576(z, zTangent) : WideArithmetic.AddSigned576(z, zTangent);
 16718        KeepBest(new WidePlanarCandidate(x, z, denominator), direction, ref found, ref best);
 16719    }
 720
 721    private static bool TryGetVerticalConeSupport(
 722            Vector3d center,
 723            Vector3d axis,
 724            Fixed64 height,
 725            Fixed64 radius,
 726            FixedRange slab,
 727            Vector2d direction,
 728            out Vector2d support)
 729    {
 7730        Signed320 apexY = GetConeEndpointNumerator(center.Y, axis.Y, height, 1);
 7731        Signed320 baseY = GetConeEndpointNumerator(center.Y, axis.Y, height, -1);
 7732        Signed320 lower = WideArithmetic.MultiplySigned192(Signed192.Raw(slab.Min), WideArithmetic.Double(Scale));
 7733        Signed320 upper = WideArithmetic.MultiplySigned192(Signed192.Raw(slab.Max), WideArithmetic.Double(Scale));
 7734        bool pointsUp = axis.Y.m_rawValue >= 0L;
 7735        Signed320 selectedY = pointsUp ? Maximum(baseY, lower) : Minimum(baseY, upper);
 7736        bool outsideCone = pointsUp
 7737            ? Compare(selectedY, apexY) > 0
 7738            : Compare(selectedY, apexY) < 0;
 7739        if (Compare(selectedY, lower) < 0 || Compare(selectedY, upper) > 0 || outsideCone)
 740        {
 3741            support = default;
 3742            return false;
 743        }
 744
 4745        Signed320 axial = axis.Y.m_rawValue >= 0L
 4746            ? WideArithmetic.SubtractSigned320(apexY, selectedY)
 4747            : WideArithmetic.SubtractSigned320(selectedY, apexY);
 4748        Signed576 radiusNumerator = WideArithmetic.MultiplySigned320(axial, Signed192.Raw(radius));
 4749        Signed320 heightDenominator = WideArithmetic.AddSigned320(
 4750            WideArithmetic.MultiplySigned192(Signed192.Raw(height), Signed192.Raw(axis.Y.Abs())),
 4751            WideArithmetic.MultiplySigned192(Signed192.Raw(height), Signed192.Raw(axis.Y.Abs())));
 4752        Signed576 planarRadiusNumerator = radiusNumerator;
 4753        Signed576 planarRadiusDenominator = Signed576.ExtendValue(heightDenominator);
 4754        Signed192 directionLength = GetPlanarDirectionLength(direction);
 4755        Signed576 denominator = WideArithmetic.MultiplySigned576(planarRadiusDenominator, directionLength);
 4756        Signed576 x = WideArithmetic.AddSigned576(
 4757            WideArithmetic.MultiplySigned576(denominator, Signed192.Raw(center.X)),
 4758            WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(planarRadiusNumerator, Signed192.Raw(direc
 4759        Signed576 z = WideArithmetic.AddSigned576(
 4760            WideArithmetic.MultiplySigned576(denominator, Signed192.Raw(center.Z)),
 4761            WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(planarRadiusNumerator, Signed192.Raw(direc
 4762        return TryCreateResult(true, new WidePlanarCandidate(x, z, denominator), out support);
 763    }
 764
 765    private static bool TryGetRotatedConeSupport(
 766        Vector3d center,
 767        Vector3d axis,
 768        Fixed64 height,
 769        Fixed64 radius,
 770        FixedRange slab,
 771        Vector2d direction,
 772        Signed192 axisLengthSquared,
 773        out Vector2d support)
 774    {
 775        // Endpoint/cap candidates are exact. Lateral slab-plane candidates use
 776        // the cone's exact centered containment polynomial to select the
 777        // representable planar boundary witness without constructing a
 778        // saturated cone endpoint.
 13779        bool found = false;
 13780        WidePlanarCandidate best = default;
 13781        AddConeApex(center, axis, height, slab, direction, ref found, ref best);
 13782        AddConeBaseDisk(center, axis, height, radius, slab, direction, axisLengthSquared, ref found, ref best);
 13783        AddConeBasePlaneCandidate(center, axis, height, radius, slab.Min, direction, ref found, ref best);
 13784        if (slab.Max != slab.Min)
 3785            AddConeBasePlaneCandidate(center, axis, height, radius, slab.Max, direction, ref found, ref best);
 13786        AddConeLateralCandidates(center, axis, height, radius, slab, direction, ref found, ref best);
 13787        return TryCreateResult(found, best, out support);
 788    }
 789
 790    private static void AddConeApex(
 791        Vector3d center,
 792        Vector3d axis,
 793        Fixed64 height,
 794        FixedRange slab,
 795        Vector2d direction,
 796        ref bool found,
 797        ref WidePlanarCandidate best)
 798    {
 26799        Signed320 y = GetConeEndpointNumerator(center.Y, axis.Y, height, 1);
 26800        Signed192 denominator = WideArithmetic.Double(Scale);
 26801        if (!IsInRange(y, denominator, slab))
 23802            return;
 803
 3804        KeepBest(
 3805            new WidePlanarCandidate(
 3806                Signed576.ExtendValue(GetConeEndpointNumerator(center.X, axis.X, height, 1)),
 3807                Signed576.ExtendValue(GetConeEndpointNumerator(center.Z, axis.Z, height, 1)),
 3808                Signed576.ExtendValue(Signed320.ExtendValue(denominator))),
 3809            direction,
 3810            ref found,
 3811            ref best);
 3812    }
 813
 814    private static void AddConeBaseDisk(
 815        Vector3d center,
 816        Vector3d axis,
 817        Fixed64 height,
 818        Fixed64 radius,
 819        FixedRange slab,
 820        Vector2d direction,
 821        Signed192 axisLengthSquared,
 822        ref bool found,
 823        ref WidePlanarCandidate best)
 824    {
 825        // Double every centered quantity so an odd raw-unit height is retained.
 26826        Signed320 baseX = GetConeEndpointNumerator(center.X, axis.X, height, -1);
 26827        Signed320 baseY = GetConeEndpointNumerator(center.Y, axis.Y, height, -1);
 26828        Signed320 baseZ = GetConeEndpointNumerator(center.Z, axis.Z, height, -1);
 26829        AddDiskAtRationalCenter(baseX, baseY, baseZ, WideArithmetic.Double(Scale), axis, radius, slab, direction, axisLe
 26830    }
 831
 832    private static void AddConeBasePlaneCandidate(
 833        Vector3d center,
 834        Vector3d axis,
 835        Fixed64 height,
 836        Fixed64 radius,
 837        Fixed64 plane,
 838        Vector2d direction,
 839        ref bool found,
 840        ref WidePlanarCandidate best)
 841    {
 842        const ulong baseParameter = (ulong)long.MaxValue;
 16843        if (TryCreateConeDiskPlaneCandidate(
 16844            center, axis, height, radius, plane, direction, baseParameter, out WidePlanarCandidate baseCandidate))
 845        {
 8846            KeepBest(baseCandidate, direction, ref found, ref best);
 847        }
 848
 16849    }
 850
 851    private static void AddConeLateralCandidates(
 852        Vector3d center,
 853        Vector3d axis,
 854        Fixed64 height,
 855        Fixed64 radius,
 856        FixedRange slab,
 857        Vector2d direction,
 858        ref bool found,
 859        ref WidePlanarCandidate best)
 860    {
 13861        GetConeLateralStationaryPolynomial(axis, height, radius, direction,
 13862            out Signed576 coefficient, out Signed576 projection, out Signed576 constant);
 13863        if (coefficient.IsZero)
 864        {
 5865            if (!projection.IsZero)
 866            {
 2867                Signed576 doubleProjection = WideArithmetic.AddSigned576(projection, projection);
 2868                Signed576 absoluteProjection = WideArithmetic.Absolute(doubleProjection);
 2869                Signed576 y = WideArithmetic.SubtractSigned576(default, constant);
 2870                if (doubleProjection.Sign < 0)
 1871                    y = WideArithmetic.SubtractSigned576(default, y);
 2872                AddConeLateralNormal(center, axis, height, radius, slab, direction,
 2873                    WideArithmetic.MultiplySigned576(absoluteProjection, Signed192.Raw(direction.X)), y,
 2874                    WideArithmetic.MultiplySigned576(absoluteProjection, Signed192.Raw(direction.Y)), ref found, ref bes
 875            }
 5876            return;
 877        }
 878
 8879        Signed832 discriminant = WideArithmetic.SubtractSigned832(
 8880            WideArithmetic.MultiplySigned576ToSigned832(projection, projection),
 8881            WideArithmetic.MultiplySigned576ToSigned832(coefficient, constant));
 8882        if (discriminant.Sign < 0)
 1883            return;
 884
 7885        Signed576 squareRoot = WideArithmetic.GetFloorSquareRootOfProduct(discriminant, ScaleSquared);
 7886        Signed576 scaledProjection = WideArithmetic.MultiplySigned576(projection, Scale);
 7887        Signed576 scaledCoefficient = WideArithmetic.MultiplySigned576(coefficient, Scale);
 7888        Signed576 absoluteCoefficient = WideArithmetic.Absolute(scaledCoefficient);
 7889        Signed576 negativeProjection = WideArithmetic.SubtractSigned576(default, scaledProjection);
 7890        Signed576 firstY = WideArithmetic.SubtractSigned576(negativeProjection, squareRoot);
 7891        if (coefficient.Sign < 0)
 2892            firstY = WideArithmetic.SubtractSigned576(default, firstY);
 7893        AddConeLateralNormal(center, axis, height, radius, slab, direction,
 7894            WideArithmetic.MultiplySigned576(absoluteCoefficient, Signed192.Raw(direction.X)), firstY,
 7895            WideArithmetic.MultiplySigned576(absoluteCoefficient, Signed192.Raw(direction.Y)), ref found, ref best);
 7896        if (!squareRoot.IsZero)
 897        {
 6898            Signed576 secondY = WideArithmetic.AddSigned576(negativeProjection, squareRoot);
 6899            if (coefficient.Sign < 0)
 2900                secondY = WideArithmetic.SubtractSigned576(default, secondY);
 6901            AddConeLateralNormal(center, axis, height, radius, slab, direction,
 6902                WideArithmetic.MultiplySigned576(absoluteCoefficient, Signed192.Raw(direction.X)), secondY,
 6903                WideArithmetic.MultiplySigned576(absoluteCoefficient, Signed192.Raw(direction.Y)), ref found, ref best);
 904        }
 7905    }
 906
 907    private static void GetConeLateralStationaryPolynomial(
 908        Vector3d axis,
 909        Fixed64 height,
 910        Fixed64 radius,
 911        Vector2d direction,
 912        out Signed576 coefficient,
 913        out Signed576 projection,
 914        out Signed576 constant)
 915    {
 13916        Signed192 q = GetAxisLengthSquared(axis);
 13917        Signed192 s = GetPlanarDot(axis, direction);
 13918        Signed192 d = GetPlanarDirectionLengthSquared(direction);
 13919        Signed320 heightSquared = WideArithmetic.MultiplySigned192(Signed192.Raw(height), Signed192.Raw(height));
 13920        Signed320 radiusSquared = WideArithmetic.MultiplySigned192(Signed192.Raw(radius), Signed192.Raw(radius));
 13921        Signed320 k = Signed320.NarrowValue(WideArithmetic.AddSigned576(
 13922            WideArithmetic.MultiplySigned576(Signed576.ExtendValue(heightSquared), q),
 13923            WideArithmetic.MultiplySigned576(Signed576.ExtendValue(radiusSquared), ScaleSquared)));
 13924        Signed320 axisYSquared = WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Y), Signed192.Raw(axis.Y));
 13925        Signed576 radiusQScaleSquared = WideArithmetic.MultiplySigned576(
 13926            WideArithmetic.MultiplySigned576(Signed576.ExtendValue(radiusSquared), q), ScaleSquared);
 927
 13928        coefficient = WideArithmetic.SubtractSigned576(
 13929            WideArithmetic.MultiplySigned320(k, axisYSquared),
 13930            radiusQScaleSquared);
 13931        projection = WideArithmetic.MultiplySigned320(
 13932            k,
 13933            WideArithmetic.MultiplySigned192(s, Signed192.Raw(axis.Y)));
 13934        constant = WideArithmetic.SubtractSigned576(
 13935            WideArithmetic.MultiplySigned320(k, WideArithmetic.MultiplySigned192(s, s)),
 13936            WideArithmetic.MultiplySigned576(
 13937                WideArithmetic.MultiplySigned576(
 13938                    WideArithmetic.MultiplySigned576(Signed576.ExtendValue(radiusSquared), q), d),
 13939                ScaleSquared));
 13940    }
 941
 942    private static void AddConeLateralNormal(
 943        Vector3d center,
 944        Vector3d axis,
 945        Fixed64 height,
 946        Fixed64 radius,
 947        FixedRange slab,
 948        Vector2d direction,
 949        Signed576 nx,
 950        Signed576 ny,
 951        Signed576 nz,
 952        ref bool found,
 953        ref WidePlanarCandidate best)
 954    {
 15955        Signed576 axial = SumProducts(axis, nx, ny, nz);
 15956        if (axial.Sign < 0 || (radius != Fixed64.Zero && axial.IsZero))
 4957            return;
 958
 11959        Signed192 q = GetAxisLengthSquared(axis);
 11960        Signed576 gx = WideArithmetic.SubtractSigned576(WideArithmetic.MultiplySigned576(nx, q), WideArithmetic.Multiply
 11961        Signed576 gy = WideArithmetic.SubtractSigned576(WideArithmetic.MultiplySigned576(ny, q), WideArithmetic.Multiply
 11962        Signed576 gz = WideArithmetic.SubtractSigned576(WideArithmetic.MultiplySigned576(nz, q), WideArithmetic.Multiply
 11963        Signed832 radialSquared = WideArithmetic.AddSigned832(
 11964            WideArithmetic.AddSigned832(
 11965                WideArithmetic.MultiplySigned576ToSigned832(gx, gx),
 11966                WideArithmetic.MultiplySigned576ToSigned832(gy, gy)),
 11967            WideArithmetic.MultiplySigned576ToSigned832(gz, gz));
 11968        Signed576 radialLength = WideArithmetic.GetFloorSquareRootOfProduct(radialSquared, ScaleSquared);
 11969        ReduceDirection(gx, gy, gz, radialLength,
 11970            out Signed192 reducedX, out Signed192 reducedY, out Signed192 reducedZ, out Signed192 reducedLength);
 11971        Signed192 doubleScale = WideArithmetic.Double(Scale);
 11972        Signed320 apexX = GetConeEndpointNumerator(center.X, axis.X, height, 1);
 11973        Signed320 apexY = GetConeEndpointNumerator(center.Y, axis.Y, height, 1);
 11974        Signed320 apexZ = GetConeEndpointNumerator(center.Z, axis.Z, height, 1);
 11975        Signed320 baseX = GetConeEndpointNumerator(center.X, axis.X, height, -1);
 11976        Signed320 baseY = GetConeEndpointNumerator(center.Y, axis.Y, height, -1);
 11977        Signed320 baseZ = GetConeEndpointNumerator(center.Z, axis.Z, height, -1);
 11978        Signed192 radialScale = WideArithmetic.Double(Signed192.NarrowValue(WideArithmetic.MultiplySigned576(
 11979            Signed576.ExtendValue(Signed320.ExtendValue(Signed192.Raw(radius))), ScaleSquared)));
 11980        Signed576 rimX = WideArithmetic.AddSigned576(WideArithmetic.MultiplySigned320(baseX, reducedLength), Signed576.E
 11981        Signed576 rimY = WideArithmetic.AddSigned576(WideArithmetic.MultiplySigned320(baseY, reducedLength), Signed576.E
 11982        Signed576 rimZ = WideArithmetic.AddSigned576(WideArithmetic.MultiplySigned320(baseZ, reducedLength), Signed576.E
 11983        Signed576 apexScaleX = WideArithmetic.MultiplySigned320(apexX, reducedLength);
 11984        Signed576 apexScaleY = WideArithmetic.MultiplySigned320(apexY, reducedLength);
 11985        Signed576 apexScaleZ = WideArithmetic.MultiplySigned320(apexZ, reducedLength);
 11986        Signed576 ux = WideArithmetic.SubtractSigned576(rimX, apexScaleX);
 11987        Signed576 uy = WideArithmetic.SubtractSigned576(rimY, apexScaleY);
 11988        Signed576 uz = WideArithmetic.SubtractSigned576(rimZ, apexScaleZ);
 11989        AddConeGeneratorPlane(apexX, apexY, apexZ, ux, uy, uz, reducedLength,
 11990            slab.Min, direction, doubleScale, ref found, ref best);
 11991        if (slab.Max != slab.Min)
 992        {
 3993            AddConeGeneratorPlane(apexX, apexY, apexZ, ux, uy, uz, reducedLength,
 3994                slab.Max, direction, doubleScale, ref found, ref best);
 995        }
 11996    }
 997
 998    private static void AddConeGeneratorPlane(
 999        Signed320 apexX,
 1000        Signed320 apexY,
 1001        Signed320 apexZ,
 1002        Signed576 ux,
 1003        Signed576 uy,
 1004        Signed576 uz,
 1005        Signed192 radialLength,
 1006        Fixed64 plane,
 1007        Vector2d direction,
 1008        Signed192 doubleScale,
 1009        ref bool found,
 1010        ref WidePlanarCandidate best)
 1011    {
 141012        Signed320 planeOffset = WideArithmetic.SubtractSigned320(WideArithmetic.MultiplySigned192(Signed192.Raw(plane), 
 141013        Signed576 scaledPlaneOffset = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(planeOffset), radialLength)
 141014        if (!IsUnitInterval(scaledPlaneOffset, uy))
 61015            return;
 1016
 81017        Signed192 planeOffsetNarrow = Signed192.NarrowValue(planeOffset);
 81018        Signed576 candidateX = WideArithmetic.AddSigned576(WideArithmetic.MultiplySigned576(uy, Signed192.NarrowValue(ap
 81019        Signed576 candidateZ = WideArithmetic.AddSigned576(WideArithmetic.MultiplySigned576(uy, Signed192.NarrowValue(ap
 81020        Signed576 candidateDenominator = WideArithmetic.MultiplySigned576(uy, doubleScale);
 81021        Normalize(ref candidateX, ref candidateZ, ref candidateDenominator);
 81022        KeepBest(new WidePlanarCandidate(candidateX, candidateZ, candidateDenominator), direction, ref found, ref best);
 81023    }
 1024
 1025    private static bool TryCreateConeDiskPlaneCandidate(
 1026        Vector3d center,
 1027        Vector3d axis,
 1028        Fixed64 height,
 1029        Fixed64 radius,
 1030        Fixed64 plane,
 1031        Vector2d direction,
 1032        ulong parameter,
 1033        out WidePlanarCandidate candidate)
 1034    {
 161035        Signed192 maximum = Signed192.Signed(long.MaxValue);
 161036        Signed192 parameterValue = Signed192.Signed((long)parameter);
 161037        Signed192 doubleScale = WideArithmetic.Double(Scale);
 161038        Signed320 centerDenominator = WideArithmetic.MultiplySigned192(doubleScale, maximum);
 161039        Signed192 axialWeight = WideArithmetic.SubtractSigned192(
 161040            maximum,
 161041            WideArithmetic.AddSigned192(parameterValue, parameterValue));
 161042        Signed320 centerX = GetConeDiskCenterNumerator(center.X, axis.X, height, maximum, axialWeight);
 161043        Signed320 centerY = GetConeDiskCenterNumerator(center.Y, axis.Y, height, maximum, axialWeight);
 161044        Signed320 centerZ = GetConeDiskCenterNumerator(center.Z, axis.Z, height, maximum, axialWeight);
 161045        Signed320 radiusNumerator = WideArithmetic.MultiplySigned192(Signed192.Raw(radius), parameterValue);
 161046        Signed192 q = GetAxisLengthSquared(axis);
 161047        Signed192 planarAxisSquared = WideArithmetic.SubtractSigned192(
 161048            q,
 161049            Signed192.NarrowValue(WideArithmetic.MultiplySigned192(Signed192.Raw(axis.Y), Signed192.Raw(axis.Y))));
 161050        Signed320 k = Signed320.NarrowValue(WideArithmetic.SubtractSigned576(
 161051            WideArithmetic.MultiplySigned576(Signed576.ExtendValue(centerDenominator), Signed192.Raw(plane)),
 161052            Signed576.ExtendValue(centerY)));
 1053
 161054        Signed192 radiusNarrow = Signed192.NarrowValue(radiusNumerator);
 161055        Signed192 centerDenominatorNarrow = Signed192.NarrowValue(centerDenominator);
 161056        Signed192 kNarrow = Signed192.NarrowValue(k);
 161057        Signed320 radiusSquared = WideArithmetic.MultiplySigned192(radiusNarrow, radiusNarrow);
 161058        Signed320 centerDenominatorSquared = WideArithmetic.MultiplySigned192(
 161059            centerDenominatorNarrow,
 161060            centerDenominatorNarrow);
 161061        Signed576 first = WideArithmetic.MultiplySigned576(
 161062            WideArithmetic.MultiplySigned320(radiusSquared, centerDenominatorSquared),
 161063            planarAxisSquared);
 161064        Signed320 kSquared = WideArithmetic.MultiplySigned192(kNarrow, kNarrow);
 161065        Signed320 qParameterSquared = Signed320.NarrowValue(WideArithmetic.MultiplySigned576(
 161066            Signed576.ExtendValue(WideArithmetic.MultiplySigned192(maximum, maximum)),
 161067            q));
 161068        Signed576 second = WideArithmetic.MultiplySigned320(kSquared, qParameterSquared);
 161069        Signed576 radicand = WideArithmetic.SubtractSigned576(first, second);
 161070        if (radicand.Sign < 0)
 1071        {
 81072            candidate = default;
 81073            return false;
 1074        }
 1075
 81076        Signed320 root = WideArithmetic.GetFloorSquareRootScaledByFixed64(radicand);
 81077        Signed320 denominator320 = Signed320.NarrowValue(WideArithmetic.MultiplySigned576(
 81078            WideArithmetic.MultiplySigned576(
 81079                WideArithmetic.MultiplySigned576(Signed576.ExtendValue(centerDenominator), maximum),
 81080                planarAxisSquared),
 81081            Scale));
 81082        Signed576 denominatorWide = Signed576.ExtendValue(denominator320);
 81083        Signed576 common = WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(
 81084            Signed576.ExtendValue(Signed320.ExtendValue(maximum)),
 81085            planarAxisSquared), Scale);
 81086        Signed576 x = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(centerX), Signed192.NarrowValue(common));
 81087        Signed576 z = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(centerZ), Signed192.NarrowValue(common));
 81088        Signed576 particularScale = WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(
 81089            Signed576.ExtendValue(Signed320.ExtendValue(maximum)),
 81090            Scale), Signed192.Raw(axis.Y));
 81091        x = WideArithmetic.SubtractSigned576(x, WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(partic
 81092        z = WideArithmetic.SubtractSigned576(z, WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(partic
 81093        Signed576 tangentX = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(root), Signed192.Raw(-axis.Z));
 81094        Signed576 tangentZ = WideArithmetic.MultiplySigned576(Signed576.ExtendValue(root), Signed192.Raw(axis.X));
 81095        WidePlanarCandidate firstCandidate = new(
 81096            WideArithmetic.AddSigned576(x, tangentX),
 81097            WideArithmetic.AddSigned576(z, tangentZ),
 81098            denominatorWide);
 81099        WidePlanarCandidate secondCandidate = new(
 81100            WideArithmetic.SubtractSigned576(x, tangentX),
 81101            WideArithmetic.SubtractSigned576(z, tangentZ),
 81102            denominatorWide);
 81103        candidate = CompareProjection(firstCandidate, secondCandidate, direction) >= 0
 81104            ? firstCandidate
 81105            : secondCandidate;
 81106        return true;
 1107    }
 1108
 1109    private static Signed320 GetConeDiskCenterNumerator(
 1110        Fixed64 center,
 1111        Fixed64 axis,
 1112        Fixed64 height,
 1113        Signed192 maximum,
 1114        Signed192 axialWeight) =>
 481115        WideArithmetic.AddSigned320(
 481116            Signed320.NarrowValue(WideArithmetic.MultiplySigned576(WideArithmetic.MultiplySigned576(
 481117                Signed576.ExtendValue(Signed320.ExtendValue(Signed192.Raw(center))),
 481118                WideArithmetic.Double(Scale)), maximum)),
 481119            Signed320.NarrowValue(WideArithmetic.MultiplySigned320(WideArithmetic.MultiplySigned192(Signed192.Raw(axis),
 1120}

Methods/Properties

.cctor()
.ctor(FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576)
TryCreateResult(System.Boolean,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate,FixedMathSharp.Vector2d&)
KeepBest(FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate,FixedMathSharp.Vector2d,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
CompareProjection(FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate,FixedMathSharp.Vector2d)
ComesAfter(FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate)
CompareRatio(FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576)
IsInRange(FixedMathSharp.Signed320,FixedMathSharp.Signed192,FixedMathSharp.FixedRange)
IsInRange(FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.FixedRange)
GetPlanarDirectionLength(FixedMathSharp.Vector2d)
GetPlanarDirectionLengthSquared(FixedMathSharp.Vector2d)
SumProducts(FixedMathSharp.Vector3d,FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576)
IsUnitInterval(FixedMathSharp.Signed576,FixedMathSharp.Signed576)
ReduceDirection(FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed192&,FixedMathSharp.Signed192&,FixedMathSharp.Signed192&,FixedMathSharp.Signed192&)
CreateReduced(System.ReadOnlySpan`1<System.UInt64>,System.Int32,System.Boolean)
GetShiftedWord(System.ReadOnlySpan`1<System.UInt64>,System.Int32,System.Int32)
GetAxisLengthSquared(FixedMathSharp.Vector3d)
GetPlanarDot(FixedMathSharp.Vector3d,FixedMathSharp.Vector2d)
SumSquares(FixedMathSharp.Signed320,FixedMathSharp.Signed320,FixedMathSharp.Signed320)
GetEndpointNumerator(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32)
GetConeEndpointNumerator(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32)
Compare(FixedMathSharp.Signed320,FixedMathSharp.Signed320)
Minimum(FixedMathSharp.Signed320,FixedMathSharp.Signed320)
Maximum(FixedMathSharp.Signed320,FixedMathSharp.Signed320)
CompareMagnitude(FixedMathSharp.Signed576,FixedMathSharp.Signed576)
Normalize(FixedMathSharp.Signed576&,FixedMathSharp.Signed576&,FixedMathSharp.Signed576&)
TryGetCapsuleSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Vector2d&)
TryGetCylinderSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Vector2d&)
TryGetConeSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Vector2d&)
TryAdmitCapsuleSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,FixedMathSharp.Vector2d&)
TryAdmitCylinderSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,FixedMathSharp.Vector2d&)
TryAdmitConeSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,FixedMathSharp.Vector2d&)
HasUniqueDiskSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector2d,FixedMathSharp.Signed192)
AddSphereEndpoint(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddSpherePlaneCandidate(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32,FixedMathSharp.Fixed64,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
CreateEndpointRadialCandidate(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32,FixedMathSharp.Vector2d,FixedMathSharp.Signed192)
AddCapsuleSideCandidate(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Vector2d,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddDiskEndpoint(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddDiskAtRationalCenter(FixedMathSharp.Signed320,FixedMathSharp.Signed320,FixedMathSharp.Signed320,FixedMathSharp.Signed192,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddDiskPlaneCandidates(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32,FixedMathSharp.Fixed64,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddDiskPlaneCandidate(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,System.Int32,FixedMathSharp.Signed320,FixedMathSharp.Signed320,FixedMathSharp.Signed192,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,System.Int32,FixedMathSharp.Signed576,FixedMathSharp.Vector2d,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
TryGetVerticalConeSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Vector2d&)
TryGetRotatedConeSupport(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,FixedMathSharp.Vector2d&)
AddConeApex(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddConeBaseDisk(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddConeBasePlaneCandidate(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Vector2d,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddConeLateralCandidates(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
GetConeLateralStationaryPolynomial(FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Vector2d,FixedMathSharp.Signed576&,FixedMathSharp.Signed576&,FixedMathSharp.Signed576&)
AddConeLateralNormal(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.FixedRange,FixedMathSharp.Vector2d,FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
AddConeGeneratorPlane(FixedMathSharp.Signed320,FixedMathSharp.Signed320,FixedMathSharp.Signed320,FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed576,FixedMathSharp.Signed192,FixedMathSharp.Fixed64,FixedMathSharp.Vector2d,FixedMathSharp.Signed192,System.Boolean&,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
TryCreateConeDiskPlaneCandidate(FixedMathSharp.Vector3d,FixedMathSharp.Vector3d,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Vector2d,System.UInt64,FixedMathSharp.Geometry.WideSlabProjection/WidePlanarCandidate&)
GetConeDiskCenterNumerator(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Signed192,FixedMathSharp.Signed192)