Class FixedConvexPrismRelations
- Namespace
- FixedMathSharp
- Assembly
- FixedMathSharp.dll
Provides exact owner-relative contacts between centered finite surfaces and vertical convex prisms.
public static class FixedConvexPrismRelations
- Inheritance
-
FixedConvexPrismRelations
- Inherited Members
Methods
IntersectsSweptUprightCylinderStrict(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Fixed64, ReadOnlySpan<Vector2d>, Fixed64)
Determines whether an upright cylinder translated between two bottom-center points has strict positive-volume overlap with a rotated vertical convex prism at any shared continuous parameter in [0, 1].
public static bool IntersectsSweptUprightCylinderStrict(Vector3d bottomStart, Vector3d bottomEnd, Fixed64 radius, Fixed64 height, Vector3d prismOrigin, Fixed64 prismRotation, ReadOnlySpan<Vector2d> prismLocalOffsets, Fixed64 prismHalfThickness)
Parameters
bottomStartVector3dThe cylinder bottom center at parameter zero.
bottomEndVector3dThe cylinder bottom center at parameter one.
radiusFixed64The nonnegative cylinder radius.
heightFixed64The positive full cylinder height.
prismOriginVector3dThe center of the vertical convex prism.
prismRotationFixed64The prism footprint rotation about world Y.
prismLocalOffsetsReadOnlySpan<Vector2d>At least three ordered convex-footprint offsets.
prismHalfThicknessFixed64The positive prism half-thickness along world Y.
Returns
Remarks
Planar tangency, vertical tangency, and contact that exists only where the planar and vertical strict intervals meet at one boundary parameter return false. A zero radius requires the swept axis point to enter the strict prism footprint. The joint parameter relation is evaluated with exact wide intermediates and does not publish rounded interval endpoints.
Exceptions
- ArgumentOutOfRangeException
radiusis negative,heightis not positive, orprismHalfThicknessis not positive.- ArgumentException
Fewer than three ordered prism offsets were supplied.
TryGetCenteredCapsuleContact(Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, Fixed64, ReadOnlySpan<Vector2d>, Fixed64, out FixedContactAnchors)
Attempts to construct canonical contact anchors between a centered capsule and a rotated vertical convex prism.
public static bool TryGetCenteredCapsuleContact(Vector3d capsuleCenter, FixedQuaternion capsuleRotation, Vector3d localCapsuleAxisDirection, Fixed64 capsuleAxisLength, Fixed64 capsuleRadius, Vector3d prismOrigin, Fixed64 prismRotation, ReadOnlySpan<Vector2d> prismLocalOffsets, Fixed64 prismHalfThickness, out FixedContactAnchors contact)
Parameters
capsuleCenterVector3dcapsuleRotationFixedQuaternionlocalCapsuleAxisDirectionVector3dcapsuleAxisLengthFixed64capsuleRadiusFixed64prismOriginVector3dprismRotationFixed64prismLocalOffsetsReadOnlySpan<Vector2d>prismHalfThicknessFixed64contactFixedContactAnchors
Returns
TryGetCenteredConeContact(Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, Fixed64, ReadOnlySpan<Vector2d>, Fixed64, out FixedContactAnchors)
Attempts to find the minimum-depth contact between a centered finite cone and a rotated vertical convex prism.
public static bool TryGetCenteredConeContact(Vector3d coneCenter, FixedQuaternion coneRotation, Vector3d localConeAxisDirection, Fixed64 coneHeight, Fixed64 coneRadius, Vector3d prismOrigin, Fixed64 prismRotation, ReadOnlySpan<Vector2d> prismLocalOffsets, Fixed64 prismHalfThickness, out FixedContactAnchors contact)
Parameters
coneCenterVector3dconeRotationFixedQuaternionlocalConeAxisDirectionVector3dconeHeightFixed64coneRadiusFixed64prismOriginVector3dprismRotationFixed64prismLocalOffsetsReadOnlySpan<Vector2d>prismHalfThicknessFixed64contactFixedContactAnchors
Returns
Remarks
The complete support fan includes prism faces, real edges and vertices against the base disk and rim, apex and lateral generators. Classification and minimum-depth ranking use the exact authored geometry. Touching is contact with zero depth; an overlap smaller than half a raw unit can also round to zero. A zero radius is the finite axis segment.
The normal points from the cone toward the prism. Depth and each unit-normal component round nearest-even after selection. Unclamped depth differs from the exact minimum by at most half a raw unit; translating along the rounded normal additionally introduces an error proportional to depth. DepthIsClamped identifies an exact minimum above MaxValue.
Both finite support witnesses are matched before final coordinate rounding. The first anchor retains the cone center and the second the prism origin; both use the cone rotation as their local frame. The prism's scalar yaw remains authoritative. Use the anchor operations to compare or materialize points rather than interpreting the second anchor's local coordinates as prism footprint offsets.
TryGetCenteredCylinderContact(Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, Fixed64, ReadOnlySpan<Vector2d>, Fixed64, out FixedContactAnchors)
Attempts to find the minimum-depth contact between a centered finite cylinder and a rotated vertical convex prism.
public static bool TryGetCenteredCylinderContact(Vector3d cylinderCenter, FixedQuaternion cylinderRotation, Vector3d localCylinderAxisDirection, Fixed64 cylinderAxisLength, Fixed64 cylinderRadius, Vector3d prismOrigin, Fixed64 prismRotation, ReadOnlySpan<Vector2d> prismLocalOffsets, Fixed64 prismHalfThickness, out FixedContactAnchors contact)
Parameters
cylinderCenterVector3dcylinderRotationFixedQuaternionlocalCylinderAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64prismOriginVector3dprismRotationFixed64prismLocalOffsetsReadOnlySpan<Vector2d>prismHalfThicknessFixed64contactFixedContactAnchors
Returns
Remarks
The complete support fan includes prism faces, real edges and vertices against both flat caps, the side and circular rims. Classification and minimum-depth ranking use the exact authored geometry. Touching is contact with zero depth; an overlap smaller than half a raw unit can also round to zero. A zero radius is the finite axis segment.
The normal points from the cylinder toward the prism. Depth and each unit-normal component round nearest-even after selection. Unclamped depth differs from the exact minimum by at most half a raw unit; translating along the rounded normal additionally introduces an error proportional to depth. DepthIsClamped identifies an exact minimum above MaxValue.
Both finite support witnesses are matched before final coordinate rounding. The first anchor retains the cylinder center and the second the prism origin; both use the cylinder rotation as their local frame. The prism's scalar yaw remains authoritative. Use the anchor operations to compare or materialize points rather than interpreting the second anchor's local coordinates as prism footprint offsets.
TryGetSphereContact(Vector3d, Fixed64, Vector3d, Fixed64, ReadOnlySpan<Vector2d>, Fixed64, out FixedContactAnchors)
Attempts to construct canonical contact anchors between a sphere and a rotated vertical convex prism.
public static bool TryGetSphereContact(Vector3d sphereCenter, Fixed64 sphereRadius, Vector3d prismOrigin, Fixed64 prismRotation, ReadOnlySpan<Vector2d> prismLocalOffsets, Fixed64 prismHalfThickness, out FixedContactAnchors contact)
Parameters
sphereCenterVector3dsphereRadiusFixed64prismOriginVector3dprismRotationFixed64prismLocalOffsetsReadOnlySpan<Vector2d>prismHalfThicknessFixed64contactFixedContactAnchors
Returns
TryGetTriangleContact(Vector3d, FixedQuaternion, FixedTriangle, Vector3d, Fixed64, ReadOnlySpan<Vector2d>, Fixed64, out FixedContactAnchors)
Attempts to construct canonical contact anchors between a rigidly transformed triangle and a rotated vertical convex prism.
public static bool TryGetTriangleContact(Vector3d triangleOrigin, FixedQuaternion triangleRotation, FixedTriangle triangle, Vector3d prismOrigin, Fixed64 prismRotation, ReadOnlySpan<Vector2d> prismLocalOffsets, Fixed64 prismHalfThickness, out FixedContactAnchors contact)
Parameters
triangleOriginVector3dtriangleRotationFixedQuaterniontriangleFixedTriangleprismOriginVector3dprismRotationFixed64prismLocalOffsetsReadOnlySpan<Vector2d>prismHalfThicknessFixed64contactFixedContactAnchors