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 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
coneCenterVector3dconeRotationFixedQuaternionlocalConeAxisDirectionVector3dconeHeightFixed64coneRadiusFixed64prismOriginVector3dprismRotationFixed64prismLocalOffsetsReadOnlySpan<Vector2d>prismHalfThicknessFixed64contactFixedContactAnchors
Returns
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
cylinderCenterVector3dcylinderRotationFixedQuaternionlocalCylinderAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64prismOriginVector3dprismRotationFixed64prismLocalOffsetsReadOnlySpan<Vector2d>prismHalfThicknessFixed64contactFixedContactAnchors
Returns
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