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 construct canonical contact anchors 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

TryGetCenteredCylinderContact(Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, Fixed64, ReadOnlySpan<Vector2d>, Fixed64, out FixedContactAnchors)

Attempts to construct canonical contact anchors 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

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