@@ -16,6 +16,59 @@ namespace FixedMathSharp;
1616/// </summary>
1717public static class FixedConvexPrismRelations
1818{
19+ /// <summary>
20+ /// Determines whether an upright cylinder translated between two
21+ /// bottom-center points has strict positive-volume overlap with a rotated
22+ /// vertical convex prism at any shared continuous parameter in [0, 1].
23+ /// </summary>
24+ /// <remarks>
25+ /// Planar tangency, vertical tangency, and contact that exists only where
26+ /// the planar and vertical strict intervals meet at one boundary parameter
27+ /// return <see langword="false"/>. A zero radius requires the swept axis
28+ /// point to enter the strict prism footprint. The joint parameter relation
29+ /// is evaluated with exact wide intermediates and does not publish rounded
30+ /// interval endpoints.
31+ /// </remarks>
32+ /// <param name="bottomStart">The cylinder bottom center at parameter zero.</param>
33+ /// <param name="bottomEnd">The cylinder bottom center at parameter one.</param>
34+ /// <param name="radius">The nonnegative cylinder radius.</param>
35+ /// <param name="height">The positive full cylinder height.</param>
36+ /// <param name="prismOrigin">The center of the vertical convex prism.</param>
37+ /// <param name="prismRotation">The prism footprint rotation about world Y.</param>
38+ /// <param name="prismLocalOffsets">At least three ordered convex-footprint offsets.</param>
39+ /// <param name="prismHalfThickness">The positive prism half-thickness along world Y.</param>
40+ /// <exception cref="ArgumentOutOfRangeException">
41+ /// <paramref name="radius"/> is negative, <paramref name="height"/> is not
42+ /// positive, or <paramref name="prismHalfThickness"/> is not positive.
43+ /// </exception>
44+ /// <exception cref="ArgumentException">
45+ /// Fewer than three ordered prism offsets were supplied.
46+ /// </exception>
47+ public static bool IntersectsSweptUprightCylinderStrict (
48+ Vector3d bottomStart ,
49+ Vector3d bottomEnd ,
50+ Fixed64 radius ,
51+ Fixed64 height ,
52+ Vector3d prismOrigin ,
53+ Fixed64 prismRotation ,
54+ ReadOnlySpan < Vector2d > prismLocalOffsets ,
55+ Fixed64 prismHalfThickness )
56+ {
57+ if ( height <= Fixed64 . Zero )
58+ throw new ArgumentOutOfRangeException ( nameof ( height ) ) ;
59+ ValidatePrism ( radius , prismLocalOffsets , prismHalfThickness ) ;
60+ return WideConvexPrismRelations
61+ . IntersectsSweptUprightCylinderStrict (
62+ bottomStart ,
63+ bottomEnd ,
64+ radius ,
65+ height ,
66+ prismOrigin ,
67+ prismRotation ,
68+ prismLocalOffsets ,
69+ prismHalfThickness ) ;
70+ }
71+
1972 /// <summary>
2073 /// Attempts to construct canonical contact anchors between a rigidly
2174 /// transformed triangle and a rotated vertical convex prism.
0 commit comments