Table of Contents

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

bottomStart Vector3d

The cylinder bottom center at parameter zero.

bottomEnd Vector3d

The cylinder bottom center at parameter one.

radius Fixed64

The nonnegative cylinder radius.

height Fixed64

The positive full cylinder height.

prismOrigin Vector3d

The center of the vertical convex prism.

prismRotation Fixed64

The prism footprint rotation about world Y.

prismLocalOffsets ReadOnlySpan<Vector2d>

At least three ordered convex-footprint offsets.

prismHalfThickness Fixed64

The positive prism half-thickness along world Y.

Returns

bool

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

radius is negative, height is not positive, or prismHalfThickness is 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

capsuleCenter Vector3d
capsuleRotation FixedQuaternion
localCapsuleAxisDirection Vector3d
capsuleAxisLength Fixed64
capsuleRadius Fixed64
prismOrigin Vector3d
prismRotation Fixed64
prismLocalOffsets ReadOnlySpan<Vector2d>
prismHalfThickness Fixed64
contact FixedContactAnchors

Returns

bool

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

coneCenter Vector3d
coneRotation FixedQuaternion
localConeAxisDirection Vector3d
coneHeight Fixed64
coneRadius Fixed64
prismOrigin Vector3d
prismRotation Fixed64
prismLocalOffsets ReadOnlySpan<Vector2d>
prismHalfThickness Fixed64
contact FixedContactAnchors

Returns

bool

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

cylinderCenter Vector3d
cylinderRotation FixedQuaternion
localCylinderAxisDirection Vector3d
cylinderAxisLength Fixed64
cylinderRadius Fixed64
prismOrigin Vector3d
prismRotation Fixed64
prismLocalOffsets ReadOnlySpan<Vector2d>
prismHalfThickness Fixed64
contact FixedContactAnchors

Returns

bool

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

sphereCenter Vector3d
sphereRadius Fixed64
prismOrigin Vector3d
prismRotation Fixed64
prismLocalOffsets ReadOnlySpan<Vector2d>
prismHalfThickness Fixed64
contact FixedContactAnchors

Returns

bool

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

triangleOrigin Vector3d
triangleRotation FixedQuaternion
triangle FixedTriangle
prismOrigin Vector3d
prismRotation Fixed64
prismLocalOffsets ReadOnlySpan<Vector2d>
prismHalfThickness Fixed64
contact FixedContactAnchors

Returns

bool