Table of Contents

Struct FixedSegment

Namespace
FixedMathSharp.Geometry
Assembly
FixedMathSharp.dll

Represents a finite line segment in three-dimensional fixed-point space.

[MemoryPackable(GenerateType.Object)]
public struct FixedSegment : IEquatable<FixedSegment>, IMemoryPackable<FixedSegment>, IMemoryPackFormatterRegister
Implements
IMemoryPackable<FixedSegment>
IMemoryPackFormatterRegister
Inherited Members

Remarks

MemoryPack GenerateType: unmanaged

FixedMathSharp.Vector3d Start
FixedMathSharp.Vector3d End

Constructors

FixedSegment(Vector3d, Vector3d)

Initializes a new segment from start and end points.

[JsonConstructor]
public FixedSegment(Vector3d start, Vector3d end)

Parameters

start Vector3d
end Vector3d

Fields

End

The end point of the segment.

[JsonInclude]
[MemoryPackOrder(1)]
public Vector3d End

Field Value

Vector3d

Start

The start point of the segment.

[JsonInclude]
[MemoryPackOrder(0)]
public Vector3d Start

Field Value

Vector3d

Properties

Bounds

The normalized axis-aligned box that contains this segment.

[JsonIgnore]
[MemoryPackIgnore]
public FixedBoundBox Bounds { get; }

Property Value

FixedBoundBox

Delta

The vector from Start to End.

[JsonIgnore]
[MemoryPackIgnore]
public Vector3d Delta { get; }

Property Value

Vector3d

Remarks

This is ordinary component-wise Fixed64 subtraction and therefore uses the public saturating vector-arithmetic contract. Use the segment query methods when endpoint differences may span the complete raw domain; their wider intermediate contract does not extend to this property.

Length

The segment length.

[JsonIgnore]
[MemoryPackIgnore]
public Fixed64 Length { get; }

Property Value

Fixed64

LengthSquared

The squared segment length.

[JsonIgnore]
[MemoryPackIgnore]
public Fixed64 LengthSquared { get; }

Property Value

Fixed64

Methods

ClosestPoint(Vector3d)

Finds the closest point on this finite segment to the supplied point.

public Vector3d ClosestPoint(Vector3d point)

Parameters

point Vector3d

Returns

Vector3d

Remarks

Endpoint differences and projection products are evaluated across the complete raw domain before the parameter is clamped and rounded. A direction whose exact Q64.64 squared-length total is at most 2^31 raw units rounds to zero in Q32.32 and deterministically returns Start.

ContainsPointInCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64)

Returns whether a point lies inside or on a conceptual centered capsule.

public static bool ContainsPointInCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64

Returns

bool

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength or radius is negative.

ContainsPointInCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Fixed64)

Returns whether a point lies inside or on a conceptual centered capsule, including a nonnegative radial expansion.

public static bool ContainsPointInCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64

Returns

bool

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength, radius, or radiusExpansion is negative.

ContainsPointInCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, bool)

Returns whether a point lies strictly inside or inclusively within a conceptual centered capsule with nonnegative radial expansion.

public static bool ContainsPointInCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, bool strict)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
strict bool

Returns

bool

ContainsPointInCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, bool)

Returns whether a point lies strictly inside or inclusively within a conceptual centered capsule.

public static bool ContainsPointInCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, bool strict)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
strict bool

Returns

bool

ContainsPointInCenteredFiniteCone(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, bool)

Returns whether a point lies strictly inside or inclusively within a centered finite cone whose direction points from base to apex.

public static bool ContainsPointInCenteredFiniteCone(Vector3d point, Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 baseRadius, bool strict = false)

Parameters

point Vector3d
center Vector3d
baseToApexDirection Vector3d
height Fixed64
baseRadius Fixed64
strict bool

Returns

bool

ContainsPointInCenteredFiniteCylinder(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, bool)

Returns whether a point lies in a centered finite cylinder after independently expanding its flat caps and radial side.

public static bool ContainsPointInCenteredFiniteCylinder(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 axialTolerance, Fixed64 radialTolerance, bool strict = false)

Parameters

point Vector3d

The point to classify.

center Vector3d

The cylinder center.

axisDirection Vector3d

The normalized cylinder axis.

axisLength Fixed64

The positive full cylinder length.

radius Fixed64

The nonnegative cylinder radius.

axialTolerance Fixed64

The nonnegative distance added beyond each flat cap.

radialTolerance Fixed64

The nonnegative distance added to the radial extent.

strict bool

true to exclude every expanded boundary.

Returns

bool

ContainsPointInCenteredFiniteCylinder(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, bool)

Returns whether a point lies in a centered finite cylinder whose flat caps are defined without constructing scalar coordinates.

public static bool ContainsPointInCenteredFiniteCylinder(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, bool strict = false)

Parameters

point Vector3d

The point to classify.

center Vector3d

The cylinder center.

axisDirection Vector3d

The normalized cap-normal direction.

axisLength Fixed64

The positive full physical axis length.

radius Fixed64

The nonnegative radial extent.

strict bool

true to exclude the side and both flat caps; otherwise, boundaries are included.

Returns

bool

Exceptions

ArgumentException

axisDirection is zero or not normalized.

ArgumentOutOfRangeException

axisLength is not positive or radius is negative.

ContainsPointInFiniteCone(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, bool)

Returns whether a point lies strictly inside or inclusively within a finite cone authored from its apex toward its flat base.

public static bool ContainsPointInFiniteCone(Vector3d point, Vector3d apex, Vector3d apexToBaseDirection, Fixed64 height, Fixed64 baseRadius, bool strict = false)

Parameters

point Vector3d
apex Vector3d
apexToBaseDirection Vector3d
height Fixed64
baseRadius Fixed64
strict bool

Returns

bool

Deconstruct(out Vector3d, out Vector3d)

Deconstructs the segment into start and end points.

public void Deconstruct(out Vector3d start, out Vector3d end)

Parameters

start Vector3d
end Vector3d

DistanceSquared(Vector3d)

Computes the squared distance from the supplied point to this finite segment.

public Fixed64 DistanceSquared(Vector3d point)

Parameters

point Vector3d

Returns

Fixed64

Remarks

Component differences and their exact squared sum are evaluated across the complete raw domain before one final round-half-to-even conversion. Results outside the positive Fixed64 range saturate to MaxValue.

DoCenteredCapsulesOverlap(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64)

Returns whether two conceptual centered capsules overlap, including exact tangency, without narrowing their axis distance or radius sum.

public static bool DoCenteredCapsulesOverlap(Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Fixed64 firstRadius, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength, Fixed64 secondRadius)

Parameters

firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
firstRadius Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64
secondRadius Fixed64

Returns

bool

DoCenteredFiniteCylinderAndCapsuleOverlapOnAxis(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64)

Returns whether a centered finite cylinder and centered capsule have inclusive projections on a normalized separating axis.

public static bool DoCenteredFiniteCylinderAndCapsuleOverlapOnAxis(Vector3d projectionAxis, Vector3d cylinderCenter, Vector3d cylinderAxisDirection, Fixed64 cylinderAxisLength, Fixed64 cylinderRadius, Vector3d capsuleCenter, Vector3d capsuleAxisDirection, Fixed64 capsuleAxisLength, Fixed64 capsuleRadius)

Parameters

projectionAxis Vector3d
cylinderCenter Vector3d
cylinderAxisDirection Vector3d
cylinderAxisLength Fixed64
cylinderRadius Fixed64
capsuleCenter Vector3d
capsuleAxisDirection Vector3d
capsuleAxisLength Fixed64
capsuleRadius Fixed64

Returns

bool

DoCenteredFiniteCylindersOverlapOnAxis(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64)

Returns whether two centered finite cylinders have inclusive projections on a normalized separating axis.

public static bool DoCenteredFiniteCylindersOverlapOnAxis(Vector3d projectionAxis, Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Fixed64 firstRadius, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength, Fixed64 secondRadius)

Parameters

projectionAxis Vector3d
firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
firstRadius Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64
secondRadius Fixed64

Returns

bool

DoesCenteredFiniteConeOverlapSphere(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Fixed64)

Returns whether a conceptual centered finite cone inclusively overlaps a sphere without materializing a contact witness.

public static bool DoesCenteredFiniteConeOverlapSphere(Vector3d coneCenter, Vector3d baseToApexDirection, Fixed64 coneHeight, Fixed64 coneRadius, Vector3d sphereCenter, Fixed64 sphereRadius)

Parameters

coneCenter Vector3d
baseToApexDirection Vector3d
coneHeight Fixed64
coneRadius Fixed64
sphereCenter Vector3d
sphereRadius Fixed64

Returns

bool

DoesCenteredFiniteCylinderOverlapSphere(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Fixed64)

Returns whether a conceptual centered finite cylinder inclusively overlaps a sphere without materializing a contact witness.

public static bool DoesCenteredFiniteCylinderOverlapSphere(Vector3d cylinderCenter, Vector3d cylinderAxisDirection, Fixed64 cylinderAxisLength, Fixed64 cylinderRadius, Vector3d sphereCenter, Fixed64 sphereRadius)

Parameters

cylinderCenter Vector3d
cylinderAxisDirection Vector3d
cylinderAxisLength Fixed64
cylinderRadius Fixed64
sphereCenter Vector3d
sphereRadius Fixed64

Returns

bool

Equals(FixedSegment)

public bool Equals(FixedSegment other)

Parameters

other FixedSegment

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetCenteredCapsuleSupportAnchor(Vector3d, FixedQuaternion, Fixed64, Fixed64, Vector3d)

Returns the support anchor of a centered capsule whose local positive Y axis is its conceptual center axis.

public static FixedPointAnchor GetCenteredCapsuleSupportAnchor(Vector3d center, FixedQuaternion rotation, Fixed64 axisLength, Fixed64 radius, Vector3d direction)

Parameters

center Vector3d
rotation FixedQuaternion
axisLength Fixed64
radius Fixed64
direction Vector3d

Returns

FixedPointAnchor

Remarks

The rigid frame remains authoritative, so support construction does not feed the rounded derived world axis back into the geometry. The direction need not be normalized. A zero direction and an exact axial tie select the axis center.

GetCenteredFiniteConeSupportAnchor(Vector3d, FixedQuaternion, Fixed64, Fixed64, Vector3d)

Returns the support point of a centered finite cone as a local point in its rigid frame without materializing an absolute world coordinate.

public static FixedPointAnchor GetCenteredFiniteConeSupportAnchor(Vector3d center, FixedQuaternion rotation, Fixed64 height, Fixed64 radius, Vector3d direction)

Parameters

center Vector3d
rotation FixedQuaternion
height Fixed64
radius Fixed64
direction Vector3d

Returns

FixedPointAnchor

Remarks

The cone's local positive Y axis points from the base toward the apex. The direction need not be normalized. Equal apex and base projections, including a zero direction, select the base.

GetCenteredFiniteConeSupportAnchor(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d)

Returns the support point of a centered finite cone in a deterministic canonical axis frame without materializing an absolute world coordinate.

public static FixedPointAnchor GetCenteredFiniteConeSupportAnchor(Vector3d center, Vector3d axisDirection, Fixed64 height, Fixed64 radius, Vector3d direction)

Parameters

center Vector3d
axisDirection Vector3d
height Fixed64
radius Fixed64
direction Vector3d

Returns

FixedPointAnchor

GetCenteredFiniteCylinderSupportAnchor(Vector3d, FixedQuaternion, Fixed64, Fixed64, Vector3d)

Returns the support anchor of a centered finite cylinder whose local positive Y axis is its conceptual center axis.

public static FixedPointAnchor GetCenteredFiniteCylinderSupportAnchor(Vector3d center, FixedQuaternion rotation, Fixed64 axisLength, Fixed64 radius, Vector3d direction)

Parameters

center Vector3d
rotation FixedQuaternion
axisLength Fixed64
radius Fixed64
direction Vector3d

Returns

FixedPointAnchor

Remarks

The rigid frame remains authoritative. Axial full-length/2 and radial direction-times-radius terms remain exact through final world-point or relative-offset materialization.

GetClosestDirectionBetweenCenteredAxes(Vector3d, Vector3d, Fixed64, Vector3d, Vector3d, Fixed64)

Returns the normalized direction from the closest point on the first conceptual centered axis to the closest point on the second.

public static Vector3d GetClosestDirectionBetweenCenteredAxes(Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength)

Parameters

firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64

Returns

Vector3d

Remarks

Coincident closest points return zero. The direction is resolved from the exact wide relation without materializing either world point.

GetClosestPoints(FixedSegment)

Returns the closest finite points on this segment and another segment.

public readonly (Vector3d ThisPoint, Vector3d OtherPoint) GetClosestPoints(FixedSegment other)

Parameters

other FixedSegment

Returns

(Vector3d ThisPoint, Vector3d OtherPoint)

Remarks

Endpoint differences, dot products, determinants, and parameter numerators are evaluated across the complete raw domain. A direction whose exact Q64.64 squared-length total is at most 2^31 raw units rounds to zero in Q32.32 and is treated as a point at its start. The established near-parallel policy compares the exact determinant magnitude with Epsilon before division. Parameters are rounded half-to-even and deterministically clamped to the closed interval [0, 1]. When the mathematical zero-separation contact is an existing endpoint, both returned points preserve that endpoint bit-for-bit.

GetDirectionFromCenteredAxis(Vector3d, Vector3d, Vector3d, Fixed64)

Returns the normalized direction from the closest point on a conceptual centered finite axis toward point, or zero when the point lies on that axis.

public static Vector3d GetDirectionFromCenteredAxis(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64

Returns

Vector3d

Remarks

The conceptual endpoints are center +/- axisDirection * (axisLength / 2). They are never constructed or narrowed before the closest-feature decision.

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength is negative.

GetDistanceToCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64)

Returns the rounded nonnegative distance from a point to a conceptual centered capsule surface, saturating to MaxValue when the distance is not representable.

public static Fixed64 GetDistanceToCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64

Returns

Fixed64

Remarks

The final value uses round-half-to-even. Points inside or on the capsule return zero.

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength or radius is negative.

GetHashCode()

public override int GetHashCode()

Returns

int

GetPointAtDistance(Fixed64, Fixed64)

Reconstructs the point at an authored physical distance along this segment using one exact chord interpolation per coordinate.

public readonly Vector3d GetPointAtDistance(Fixed64 distance, Fixed64 totalDistance)

Parameters

distance Fixed64
totalDistance Fixed64

Returns

Vector3d

Remarks

This method does not normalize Delta. It therefore retains representable chord components that would round away in a normalized direction. The final coordinates use round-half-to-even.

Exceptions

ArgumentOutOfRangeException

Thrown when totalDistance is negative, or when distance is outside [0, totalDistance].

ArgumentException

Thrown when totalDistance is zero and this segment is not a point.

GetSurfaceAnchorOnCenteredCapsule(Vector3d, Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d)

Returns the centered-capsule surface anchor nearest to a world-space point in the supplied normalized local-space surface direction.

public static FixedPointAnchor GetSurfaceAnchorOnCenteredCapsule(Vector3d point, Vector3d center, FixedQuaternion frameRotation, Vector3d localAxisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d localSurfaceDirection)

Parameters

point Vector3d
center Vector3d
frameRotation FixedQuaternion
localAxisDirection Vector3d
axisLength Fixed64
radius Fixed64
localSurfaceDirection Vector3d

Returns

FixedPointAnchor

GetSurfaceAnchorOnCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d)

Returns the centered-capsule surface anchor nearest to a world-space point in the supplied normalized world-space surface direction.

public static FixedPointAnchor GetSurfaceAnchorOnCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d surfaceDirection)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
surfaceDirection Vector3d

Returns

FixedPointAnchor

Remarks

The closest axial offset and radial offset remain separate in an identity-rotation frame, avoiding an inverse-/forward-rotation round-trip when the caller already owns the world-space direction.

TryGetCapsuleIntersectionDistanceInterval(FixedSegment, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects an endpoint-authored, radially expanded capsule and reports exact endpoint containment.

public readonly bool TryGetCapsuleIntersectionDistanceInterval(FixedSegment capsuleAxis, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

capsuleAxis FixedSegment
radius Fixed64
radiusExpansion Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetCapsuleIntersectionDistanceInterval(FixedSegment, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the physical-distance interval where this segment intersects an endpoint-authored capsule.

public readonly bool TryGetCapsuleIntersectionDistanceInterval(FixedSegment capsuleAxis, Fixed64 radius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance)

Parameters

capsuleAxis FixedSegment
radius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64

Returns

bool

TryGetCapsuleIntersectionDistanceInterval(Vector3d, FixedQuaternion, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects a centered capsule whose local positive Y axis is transformed by a rigid quaternion frame.

public readonly bool TryGetCapsuleIntersectionDistanceInterval(Vector3d center, FixedQuaternion rotation, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
rotation FixedQuaternion
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetCapsuleIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects a centered, radially expanded capsule and reports exact endpoint containment.

public readonly bool TryGetCapsuleIntersectionDistanceInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetCapsuleIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the physical-distance interval where this segment intersects a centered capsule.

public readonly bool TryGetCapsuleIntersectionDistanceInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64

Returns

bool

TryGetCapsuleIntersectionInterval(FixedSegment, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a radially expanded capsule.

public readonly bool TryGetCapsuleIntersectionInterval(FixedSegment capsuleAxis, Fixed64 radius, Fixed64 radiusExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

capsuleAxis FixedSegment
radius Fixed64
radiusExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64

Returns

bool

Remarks

The authored radius and sweep expansion remain separate until the exact finite-axis solve. Returned parameters are clamped to [0, 1]. A zero-length capsule axis is treated as a sphere.

Exceptions

ArgumentOutOfRangeException

Thrown when radius or radiusExpansion is negative.

TryGetCapsuleIntersectionInterval(FixedSegment, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the closed parameter interval where this segment intersects a capsule and reports exact endpoint containment.

public readonly bool TryGetCapsuleIntersectionInterval(FixedSegment capsuleAxis, Fixed64 radius, Fixed64 radiusExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter, out bool startContained, out bool endContainedStrict)

Parameters

capsuleAxis FixedSegment
radius Fixed64
radiusExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64
startContained bool
endContainedStrict bool

Returns

bool

Remarks

startContained is inclusive of the capsule boundary. endContainedStrict is true only for the mathematical interior. Both classifications use the wide solve inputs rather than rounded parameters or reconstructed points. A zero-length capsule axis is treated as a sphere.

Exceptions

ArgumentOutOfRangeException

Thrown when radius or radiusExpansion is negative.

TryGetCapsuleIntersectionInterval(FixedSegment, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a capsule.

public readonly bool TryGetCapsuleIntersectionInterval(FixedSegment capsuleAxis, Fixed64 radius, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

capsuleAxis FixedSegment
radius Fixed64
entryParameter Fixed64
exitParameter Fixed64

Returns

bool

Remarks

The capsule is described by its finite center-line segment and radius. Returned parameters are clamped to [0, 1]. A zero-length capsule axis is treated as a sphere.

Exceptions

ArgumentOutOfRangeException

Thrown when radius is negative.

TryGetCapsuleIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a centered, radially expanded capsule.

public readonly bool TryGetCapsuleIntersectionInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64

Returns

bool

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength, radius or radiusExpansion is negative.

TryGetCapsuleIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the closed parameter interval where this segment intersects a centered, radially expanded capsule and reports exact endpoint containment.

public readonly bool TryGetCapsuleIntersectionInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64
startContained bool
endContainedStrict bool

Returns

bool

Remarks

startContained includes the capsule boundary; endContainedStrict excludes it. The side projection, conceptual spherical caps, and containment classifications remain wide until the final deterministic parameter conversion.

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength, radius or radiusExpansion is negative.

TryGetCapsuleIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a centered capsule.

public readonly bool TryGetCapsuleIntersectionInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
entryParameter Fixed64
exitParameter Fixed64

Returns

bool

Remarks

The normalized axis defines the conceptual center-line endpoints as center +/- axisDirection * (axisLength / 2) without constructing or narrowing either endpoint.

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength or radius is negative.

TryGetCenteredAxisEndpoint(Vector3d, Vector3d, Fixed64, bool, out Vector3d)

Attempts to materialize one endpoint of a conceptual centered finite axis from its normalized direction and full length.

public static bool TryGetCenteredAxisEndpoint(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, bool positive, out Vector3d endpoint)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
positive bool
endpoint Vector3d

Returns

bool

Remarks

The endpoint is rounded only after combining its center and half-length contribution. Failure is atomic.

TryGetCenteredCapsuleCapsuleSlabAxisPenetration(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector2d, Fixed64, Fixed64, Fixed64, out Vector3d, out Fixed64, out bool)

Attempts to return the oriented penetration of a centered 3D capsule and a centered planar capsule extruded through a world-Y slab.

public static bool TryGetCenteredCapsuleCapsuleSlabAxisPenetration(Vector3d projectionAxis, Vector3d capsuleCenter, Vector3d capsuleAxisDirection, Fixed64 capsuleAxisLength, Fixed64 capsuleRadius, Vector3d slabCenter, Vector2d slabCapsuleAxisDirection, Fixed64 slabCapsuleAxisLength, Fixed64 slabCapsuleRadius, Fixed64 slabHalfThickness, out Vector3d orientedAxis, out Fixed64 depth, out bool depthIsClamped)

Parameters

projectionAxis Vector3d
capsuleCenter Vector3d
capsuleAxisDirection Vector3d
capsuleAxisLength Fixed64
capsuleRadius Fixed64
slabCenter Vector3d
slabCapsuleAxisDirection Vector2d
slabCapsuleAxisLength Fixed64
slabCapsuleRadius Fixed64
slabHalfThickness Fixed64
orientedAxis Vector3d
depth Fixed64
depthIsClamped bool

Returns

bool

TryGetCenteredCapsuleSupport(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to materialize the support point of a conceptual centered capsule in a world-space direction.

public static bool TryGetCenteredCapsuleSupport(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d direction, out Vector3d support)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
direction Vector3d
support Vector3d

Returns

bool

Remarks

The direction need not be normalized. A zero direction and an exact axial tie select the axis center.

TryGetCenteredCapsuleSupportOffset(Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to return the support offset of a conceptual centered capsule relative to its center.

public static bool TryGetCenteredCapsuleSupportOffset(Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d direction, out Vector3d supportOffset)

Parameters

axisDirection Vector3d
axisLength Fixed64
radius Fixed64
direction Vector3d
supportOffset Vector3d

Returns

bool

Remarks

The direction need not be normalized. A zero direction and an exact axial tie select the axis center.

TryGetCenteredCapsulesContact(Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, out FixedContactAnchors)

Attempts to build the exact contact relation between two conceptual centered capsules without narrowing either finite axis.

public static bool TryGetCenteredCapsulesContact(Vector3d firstCenter, FixedQuaternion firstRotation, Vector3d firstLocalAxisDirection, Fixed64 firstAxisLength, Fixed64 firstRadius, Vector3d secondCenter, FixedQuaternion secondRotation, Vector3d secondLocalAxisDirection, Fixed64 secondAxisLength, Fixed64 secondRadius, Vector3d fallbackNormal, out FixedContactAnchors contact)

Parameters

firstCenter Vector3d
firstRotation FixedQuaternion
firstLocalAxisDirection Vector3d
firstAxisLength Fixed64
firstRadius Fixed64
secondCenter Vector3d
secondRotation FixedQuaternion
secondLocalAxisDirection Vector3d
secondAxisLength Fixed64
secondRadius Fixed64
fallbackNormal Vector3d
contact FixedContactAnchors

Returns

bool

true when the capsules overlap; otherwise false.

Remarks

Each capsule axis is expressed in its normalized rigid frame. The returned normal points from the first capsule toward the second. fallbackNormal is used only when the closest axis points coincide. Axial and radial terms remain separate in each anchor, so classification does not depend on materializing a combined world point or center-relative offset.

TryGetCenteredFiniteConeCapsuleSlabAxisPenetration(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector2d, Fixed64, Fixed64, Fixed64, out Vector3d, out Fixed64, out bool)

Attempts to return the oriented penetration of a centered finite cone and a centered planar capsule extruded through a world-Y slab.

public static bool TryGetCenteredFiniteConeCapsuleSlabAxisPenetration(Vector3d projectionAxis, Vector3d coneCenter, Vector3d baseToApexDirection, Fixed64 coneHeight, Fixed64 coneRadius, Vector3d slabCenter, Vector2d slabCapsuleAxisDirection, Fixed64 slabCapsuleAxisLength, Fixed64 slabCapsuleRadius, Fixed64 slabHalfThickness, out Vector3d orientedAxis, out Fixed64 depth, out bool depthIsClamped)

Parameters

projectionAxis Vector3d
coneCenter Vector3d
baseToApexDirection Vector3d
coneHeight Fixed64
coneRadius Fixed64
slabCenter Vector3d
slabCapsuleAxisDirection Vector2d
slabCapsuleAxisLength Fixed64
slabCapsuleRadius Fixed64
slabHalfThickness Fixed64
orientedAxis Vector3d
depth Fixed64
depthIsClamped bool

Returns

bool

TryGetCenteredFiniteConeIntersectionDistanceInterval(Vector3d, FixedQuaternion, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects a centered finite cone whose local positive Y axis runs from base to apex in a rigid quaternion frame.

public readonly bool TryGetCenteredFiniteConeIntersectionDistanceInterval(Vector3d center, FixedQuaternion rotation, Fixed64 height, Fixed64 baseRadius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
rotation FixedQuaternion
height Fixed64
baseRadius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetCenteredFiniteConeIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the physical-distance interval where this segment intersects a centered finite cone.

public readonly bool TryGetCenteredFiniteConeIntersectionDistanceInterval(Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 baseRadius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance)

Parameters

center Vector3d
baseToApexDirection Vector3d
height Fixed64
baseRadius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64

Returns

bool

TryGetCenteredFiniteConeIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects a centered finite cone and reports exact endpoint containment.

public readonly bool TryGetCenteredFiniteConeIntersectionDistanceInterval(Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 baseRadius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
baseToApexDirection Vector3d
height Fixed64
baseRadius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetCenteredFiniteConeIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a centered finite cone.

public readonly bool TryGetCenteredFiniteConeIntersectionInterval(Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 baseRadius, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

center Vector3d

The midpoint between the apex and flat-base center.

baseToApexDirection Vector3d

The normalized direction from base to apex.

height Fixed64

The positive full parametric axis extent between base and apex.

baseRadius Fixed64

The nonnegative base radius.

entryParameter Fixed64

The first intersecting segment parameter in [0, 1].

exitParameter Fixed64

The last intersecting segment parameter in [0, 1].

Returns

bool

Exceptions

ArgumentException

baseToApexDirection is zero or not normalized.

ArgumentOutOfRangeException

height is not positive or baseRadius is negative.

TryGetCenteredFiniteConeIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the closed parameter interval where this segment intersects a centered finite cone and reports exact endpoint containment.

public readonly bool TryGetCenteredFiniteConeIntersectionInterval(Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 baseRadius, out Fixed64 entryParameter, out Fixed64 exitParameter, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
baseToApexDirection Vector3d
height Fixed64
baseRadius Fixed64
entryParameter Fixed64
exitParameter Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetCenteredFiniteConeIntersectionPointInterval(Vector3d, Vector3d, Fixed64, Fixed64, out Vector3d, out Vector3d)

Finds deterministic lattice witnesses for the first and last points where this segment intersects a centered finite cone.

public readonly bool TryGetCenteredFiniteConeIntersectionPointInterval(Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 baseRadius, out Vector3d entryPoint, out Vector3d exitPoint)

Parameters

center Vector3d
baseToApexDirection Vector3d
height Fixed64
baseRadius Fixed64
entryPoint Vector3d
exitPoint Vector3d

Returns

bool

TryGetCenteredFiniteConeSupport(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to materialize the support point of a conceptual centered finite cone in a world-space direction.

public static bool TryGetCenteredFiniteConeSupport(Vector3d center, Vector3d axisDirection, Fixed64 height, Fixed64 radius, Vector3d direction, out Vector3d support)

Parameters

center Vector3d
axisDirection Vector3d
height Fixed64
radius Fixed64
direction Vector3d
support Vector3d

Returns

bool

Remarks

The axis points from the base toward the apex. The direction need not be normalized. Equal apex and base projections, including a zero direction, select the base.

TryGetCenteredFiniteConeSupportOffset(Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to return the support offset of a conceptual centered finite cone relative to its center.

public static bool TryGetCenteredFiniteConeSupportOffset(Vector3d axisDirection, Fixed64 height, Fixed64 radius, Vector3d direction, out Vector3d supportOffset)

Parameters

axisDirection Vector3d
height Fixed64
radius Fixed64
direction Vector3d
supportOffset Vector3d

Returns

bool

TryGetCenteredFiniteCylinderCapsuleAxisPenetration(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64, out Vector3d, out Fixed64)

Attempts to return the oriented minimum translation and rounded depth for a centered finite-cylinder/capsule projection overlap.

public static bool TryGetCenteredFiniteCylinderCapsuleAxisPenetration(Vector3d projectionAxis, Vector3d cylinderCenter, Vector3d cylinderAxisDirection, Fixed64 cylinderAxisLength, Fixed64 cylinderRadius, Vector3d capsuleCenter, Vector3d capsuleAxisDirection, Fixed64 capsuleAxisLength, Fixed64 capsuleRadius, out Vector3d orientedAxis, out Fixed64 depth)

Parameters

projectionAxis Vector3d
cylinderCenter Vector3d
cylinderAxisDirection Vector3d
cylinderAxisLength Fixed64
cylinderRadius Fixed64
capsuleCenter Vector3d
capsuleAxisDirection Vector3d
capsuleAxisLength Fixed64
capsuleRadius Fixed64
orientedAxis Vector3d
depth Fixed64

Returns

bool

Remarks

The returned axis points from the cylinder toward the capsule; an exact center-projection tie retains projectionAxis. Classification is independent of final depth representability through DoCenteredFiniteCylinderAndCapsuleOverlapOnAxis(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64).

TryGetCenteredFiniteCylinderCapsuleAxisPenetration(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64, out Vector3d, out Fixed64, out bool)

Attempts to return the oriented minimum translation for a centered finite-cylinder/capsule projection overlap, clamping an otherwise unrepresentable positive depth to MaxValue.

public static bool TryGetCenteredFiniteCylinderCapsuleAxisPenetration(Vector3d projectionAxis, Vector3d cylinderCenter, Vector3d cylinderAxisDirection, Fixed64 cylinderAxisLength, Fixed64 cylinderRadius, Vector3d capsuleCenter, Vector3d capsuleAxisDirection, Fixed64 capsuleAxisLength, Fixed64 capsuleRadius, out Vector3d orientedAxis, out Fixed64 depth, out bool depthIsClamped)

Parameters

projectionAxis Vector3d
cylinderCenter Vector3d
cylinderAxisDirection Vector3d
cylinderAxisLength Fixed64
cylinderRadius Fixed64
capsuleCenter Vector3d
capsuleAxisDirection Vector3d
capsuleAxisLength Fixed64
capsuleRadius Fixed64
orientedAxis Vector3d
depth Fixed64
depthIsClamped bool

Returns

bool

TryGetCenteredFiniteCylinderCapsuleContact(Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, out FixedContactAnchors)

Attempts to construct the minimum-translation contact between a centered finite cylinder and a centered capsule.

public static bool TryGetCenteredFiniteCylinderCapsuleContact(Vector3d cylinderCenter, FixedQuaternion cylinderRotation, Vector3d cylinderLocalAxisDirection, Fixed64 cylinderAxisLength, Fixed64 cylinderRadius, Vector3d capsuleCenter, FixedQuaternion capsuleRotation, Vector3d capsuleLocalAxisDirection, Fixed64 capsuleAxisLength, Fixed64 capsuleRadius, out FixedContactAnchors contact)

Parameters

cylinderCenter Vector3d
cylinderRotation FixedQuaternion
cylinderLocalAxisDirection Vector3d
cylinderAxisLength Fixed64
cylinderRadius Fixed64
capsuleCenter Vector3d
capsuleRotation FixedQuaternion
capsuleLocalAxisDirection Vector3d
capsuleAxisLength Fixed64
capsuleRadius Fixed64
contact FixedContactAnchors

Returns

bool

Remarks

Both finite axes remain authoritative in their normalized rigid frames. The returned normal points from the cylinder toward the capsule.

TryGetCenteredFiniteCylinderCapsuleSlabAxisPenetration(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector2d, Fixed64, Fixed64, Fixed64, out Vector3d, out Fixed64, out bool)

Attempts to return the oriented penetration of a centered finite cylinder and a centered planar capsule extruded through a world-Y slab.

public static bool TryGetCenteredFiniteCylinderCapsuleSlabAxisPenetration(Vector3d projectionAxis, Vector3d cylinderCenter, Vector3d cylinderAxisDirection, Fixed64 cylinderAxisLength, Fixed64 cylinderRadius, Vector3d slabCenter, Vector2d slabCapsuleAxisDirection, Fixed64 slabCapsuleAxisLength, Fixed64 slabCapsuleRadius, Fixed64 slabHalfThickness, out Vector3d orientedAxis, out Fixed64 depth, out bool depthIsClamped)

Parameters

projectionAxis Vector3d
cylinderCenter Vector3d
cylinderAxisDirection Vector3d
cylinderAxisLength Fixed64
cylinderRadius Fixed64
slabCenter Vector3d
slabCapsuleAxisDirection Vector2d
slabCapsuleAxisLength Fixed64
slabCapsuleRadius Fixed64
slabHalfThickness Fixed64
orientedAxis Vector3d
depth Fixed64
depthIsClamped bool

Returns

bool

TryGetCenteredFiniteCylinderSupport(Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to materialize the support point of a conceptual centered finite cylinder in a world-space direction.

public static bool TryGetCenteredFiniteCylinderSupport(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d direction, out Vector3d support)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
direction Vector3d
support Vector3d

Returns

bool

Remarks

The direction need not be normalized. A zero direction and an exact axial tie select the negative cap center. A direction parallel to the axis selects the cap center rather than an arbitrary rim point.

TryGetCenteredFiniteCylinderSupportOffset(Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to return the support offset of a conceptual centered finite cylinder relative to its center.

public static bool TryGetCenteredFiniteCylinderSupportOffset(Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d direction, out Vector3d supportOffset)

Parameters

axisDirection Vector3d
axisLength Fixed64
radius Fixed64
direction Vector3d
supportOffset Vector3d

Returns

bool

TryGetCenteredFiniteCylindersAxisPenetration(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64, out Vector3d, out Fixed64)

Attempts to return the oriented minimum translation and rounded depth for two centered finite-cylinder projections.

public static bool TryGetCenteredFiniteCylindersAxisPenetration(Vector3d projectionAxis, Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Fixed64 firstRadius, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength, Fixed64 secondRadius, out Vector3d orientedAxis, out Fixed64 depth)

Parameters

projectionAxis Vector3d
firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
firstRadius Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64
secondRadius Fixed64
orientedAxis Vector3d
depth Fixed64

Returns

bool

TryGetCenteredFiniteCylindersAxisPenetration(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, Vector3d, Fixed64, Fixed64, out Vector3d, out Fixed64, out bool)

Attempts to return the oriented minimum translation for two centered finite-cylinder projections, clamping an otherwise unrepresentable positive depth to MaxValue.

public static bool TryGetCenteredFiniteCylindersAxisPenetration(Vector3d projectionAxis, Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Fixed64 firstRadius, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength, Fixed64 secondRadius, out Vector3d orientedAxis, out Fixed64 depth, out bool depthIsClamped)

Parameters

projectionAxis Vector3d
firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
firstRadius Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64
secondRadius Fixed64
orientedAxis Vector3d
depth Fixed64
depthIsClamped bool

Returns

bool

TryGetCenteredFiniteCylindersContact(Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, out FixedContactAnchors)

Attempts to construct the minimum-translation contact between two centered finite cylinders.

public static bool TryGetCenteredFiniteCylindersContact(Vector3d firstCenter, FixedQuaternion firstRotation, Vector3d firstLocalAxisDirection, Fixed64 firstAxisLength, Fixed64 firstRadius, Vector3d secondCenter, FixedQuaternion secondRotation, Vector3d secondLocalAxisDirection, Fixed64 secondAxisLength, Fixed64 secondRadius, out FixedContactAnchors contact)

Parameters

firstCenter Vector3d
firstRotation FixedQuaternion
firstLocalAxisDirection Vector3d
firstAxisLength Fixed64
firstRadius Fixed64
secondCenter Vector3d
secondRotation FixedQuaternion
secondLocalAxisDirection Vector3d
secondAxisLength Fixed64
secondRadius Fixed64
contact FixedContactAnchors

Returns

bool

Remarks

Both finite axes remain authoritative in their normalized rigid frames. The returned normal points from the first cylinder toward the second.

TryGetClosestCenteredCapsuleSurfaceAnchor(Vector3d, Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, out FixedPointAnchor, out Vector3d, out Fixed64)

Attempts to return the nearest centered-capsule surface feature in its authoritative rigid frame.

public static bool TryGetClosestCenteredCapsuleSurfaceAnchor(Vector3d point, Vector3d center, FixedQuaternion frameRotation, Vector3d localAxisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d localFallbackRadialDirection, out FixedPointAnchor surfaceAnchor, out Vector3d outwardNormal, out Fixed64 signedDistance)

Parameters

point Vector3d
center Vector3d
frameRotation FixedQuaternion
localAxisDirection Vector3d
axisLength Fixed64
radius Fixed64
localFallbackRadialDirection Vector3d
surfaceAnchor FixedPointAnchor
outwardNormal Vector3d
signedDistance Fixed64

Returns

bool

Remarks

The returned anchor retains odd full-length cap positions and its radial feature until final materialization. Distance is positive outside, zero on the selected surface lattice witness, and negative inside.

TryGetClosestCenteredFiniteConeSurfaceAnchor(Vector3d, Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, out FixedPointAnchor, out Vector3d, out Fixed64)

Attempts to return the nearest centered finite-cone surface feature in its authoritative rigid frame.

public static bool TryGetClosestCenteredFiniteConeSurfaceAnchor(Vector3d point, Vector3d center, FixedQuaternion frameRotation, Vector3d localAxisDirection, Fixed64 height, Fixed64 radius, Vector3d localFallbackRadialDirection, out FixedPointAnchor surfaceAnchor, out Vector3d outwardNormal, out Fixed64 signedDistance)

Parameters

point Vector3d
center Vector3d
frameRotation FixedQuaternion
localAxisDirection Vector3d
height Fixed64
radius Fixed64
localFallbackRadialDirection Vector3d
surfaceAnchor FixedPointAnchor
outwardNormal Vector3d
signedDistance Fixed64

Returns

bool

Remarks

The local axis points from the base toward the apex. The returned anchor retains the selected meridian feature without a rounded world-offset round trip. Distance is positive outside, zero on the selected surface witness, and negative inside.

TryGetClosestCenteredFiniteConeSurfaceOffset(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d, out Vector3d, out Fixed64)

Attempts to return the nearest cone-surface offset relative to the cone center, together with its outward normal and signed distance.

public static bool TryGetClosestCenteredFiniteConeSurfaceOffset(Vector3d point, Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 radius, Vector3d fallbackRadialDirection, out Vector3d surfaceOffset, out Vector3d outwardNormal, out Fixed64 signedDistance)

Parameters

point Vector3d
center Vector3d
baseToApexDirection Vector3d
height Fixed64
radius Fixed64
fallbackRadialDirection Vector3d
surfaceOffset Vector3d
outwardNormal Vector3d
signedDistance Fixed64

Returns

bool

Remarks

Unlike the absolute-witness overload, this relation remains usable when adding the returned offset to center would exceed the public scalar range.

TryGetClosestCenteredFiniteCylinderSurfaceAnchor(Vector3d, Vector3d, FixedQuaternion, Vector3d, Fixed64, Fixed64, Vector3d, out FixedPointAnchor, out Vector3d, out Fixed64)

Attempts to return the nearest centered finite-cylinder surface feature in its authoritative rigid frame.

public static bool TryGetClosestCenteredFiniteCylinderSurfaceAnchor(Vector3d point, Vector3d center, FixedQuaternion frameRotation, Vector3d localAxisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d localFallbackRadialDirection, out FixedPointAnchor surfaceAnchor, out Vector3d outwardNormal, out Fixed64 signedDistance)

Parameters

point Vector3d
center Vector3d
frameRotation FixedQuaternion
localAxisDirection Vector3d
axisLength Fixed64
radius Fixed64
localFallbackRadialDirection Vector3d
surfaceAnchor FixedPointAnchor
outwardNormal Vector3d
signedDistance Fixed64

Returns

bool

Remarks

The returned anchor retains axial and radial feature terms separately, so callers do not need to inverse-rotate an already rounded world-space offset. Distance is positive outside, zero on the selected surface witness, and negative inside.

TryGetClosestCenteredFiniteCylinderSurfaceOffset(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d, out Vector3d, out Fixed64)

Attempts to return the nearest cylinder-surface offset relative to the cylinder center, together with its outward normal and signed distance.

public static bool TryGetClosestCenteredFiniteCylinderSurfaceOffset(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d fallbackRadialDirection, out Vector3d surfaceOffset, out Vector3d outwardNormal, out Fixed64 signedDistance)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
fallbackRadialDirection Vector3d
surfaceOffset Vector3d
outwardNormal Vector3d
signedDistance Fixed64

Returns

bool

Remarks

Unlike the absolute-witness overload, this relation remains usable when adding the returned offset to center would exceed the public scalar range.

TryGetClosestOffsetsBetweenCenteredAxes(Vector3d, Vector3d, Fixed64, Vector3d, Vector3d, Fixed64, out Vector3d, out Vector3d)

Attempts to return the closest offsets on two conceptual centered finite axes, each relative to its own center.

public static bool TryGetClosestOffsetsBetweenCenteredAxes(Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength, out Vector3d firstCenterOffset, out Vector3d secondCenterOffset)

Parameters

firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64
firstCenterOffset Vector3d
secondCenterOffset Vector3d

Returns

bool

Remarks

This relation remains usable when either absolute closest point would exceed the public scalar coordinate range.

TryGetClosestPointOnCenteredFiniteConeSurface(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d, out Vector3d, out Fixed64)

Attempts to return the nearest representable surface witness, outward normal, and signed distance for a conceptual centered finite cone.

public static bool TryGetClosestPointOnCenteredFiniteConeSurface(Vector3d point, Vector3d center, Vector3d baseToApexDirection, Fixed64 height, Fixed64 radius, Vector3d fallbackRadialDirection, out Vector3d surfacePoint, out Vector3d outwardNormal, out Fixed64 signedDistance)

Parameters

point Vector3d
center Vector3d
baseToApexDirection Vector3d
height Fixed64
radius Fixed64
fallbackRadialDirection Vector3d
surfacePoint Vector3d
outwardNormal Vector3d
signedDistance Fixed64

Returns

bool

Remarks

The axis points from the base toward the apex. Distance is positive outside, zero on the selected surface lattice witness, and negative inside. fallbackRadialDirection selects the side normal only for an axial point or apex tie.

TryGetClosestPointOnCenteredFiniteCylinderSurface(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d, out Vector3d, out Fixed64)

Attempts to return the nearest representable surface witness, outward normal, and signed distance for a conceptual centered finite cylinder.

public static bool TryGetClosestPointOnCenteredFiniteCylinderSurface(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d fallbackRadialDirection, out Vector3d surfacePoint, out Vector3d outwardNormal, out Fixed64 signedDistance)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
fallbackRadialDirection Vector3d
surfacePoint Vector3d
outwardNormal Vector3d
signedDistance Fixed64

Returns

bool

Remarks

Distance is positive outside, zero on the selected surface lattice witness, and negative inside. fallbackRadialDirection selects the side normal only when the point lies on the cylinder axis.

TryGetClosestPointsBetweenCenteredAxes(Vector3d, Vector3d, Fixed64, Vector3d, Vector3d, Fixed64, out Vector3d, out Vector3d)

Attempts to return the closest points on two conceptual centered finite axes described by normalized directions and full lengths.

public static bool TryGetClosestPointsBetweenCenteredAxes(Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength, out Vector3d firstPoint, out Vector3d secondPoint)

Parameters

firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64
firstPoint Vector3d
secondPoint Vector3d

Returns

bool

true when both final world points are representable; otherwise false and both outputs are zero.

TryGetDistanceBetweenCenteredAxes(Vector3d, Vector3d, Fixed64, Vector3d, Vector3d, Fixed64, out Fixed64)

Attempts to return the rounded distance between two conceptual centered finite axes without materializing either pair of endpoints.

public static bool TryGetDistanceBetweenCenteredAxes(Vector3d firstCenter, Vector3d firstAxisDirection, Fixed64 firstAxisLength, Vector3d secondCenter, Vector3d secondAxisDirection, Fixed64 secondAxisLength, out Fixed64 distance)

Parameters

firstCenter Vector3d
firstAxisDirection Vector3d
firstAxisLength Fixed64
secondCenter Vector3d
secondAxisDirection Vector3d
secondAxisLength Fixed64
distance Fixed64

Returns

bool

True when the final distance is representable; otherwise false and distance is MaxValue.

TryGetDistanceToCenteredAxis(Vector3d, Vector3d, Vector3d, Fixed64, out Fixed64)

Attempts to return the rounded distance from a point to a conceptual centered finite axis without materializing its endpoints.

public static bool TryGetDistanceToCenteredAxis(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, out Fixed64 distance)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
distance Fixed64

Returns

bool

True when the final distance is representable; otherwise false and distance is MaxValue.

TryGetDistanceToCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, out Fixed64)

Attempts to return the rounded nonnegative distance from a point to a conceptual centered capsule surface.

public static bool TryGetDistanceToCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, out Fixed64 distance)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
distance Fixed64

Returns

bool

True when the final distance is representable; otherwise false and distance is MaxValue. Points inside or on the capsule return zero.

Remarks

The final value uses round-half-to-even.

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength or radius is negative.

TryGetFiniteConeIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the physical-distance interval where this segment intersects a finite cone authored from its apex toward its flat base.

public readonly bool TryGetFiniteConeIntersectionDistanceInterval(Vector3d apex, Vector3d apexToBaseDirection, Fixed64 height, Fixed64 baseRadius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance)

Parameters

apex Vector3d
apexToBaseDirection Vector3d
height Fixed64
baseRadius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64

Returns

bool

Remarks

Distances are solved directly from the wide polynomial; they are not reconstructed from rounded Q32.32 parameters.

TryGetFiniteConeIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects an apex-authored finite cone and reports exact endpoint containment.

public readonly bool TryGetFiniteConeIntersectionDistanceInterval(Vector3d apex, Vector3d apexToBaseDirection, Fixed64 height, Fixed64 baseRadius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

apex Vector3d
apexToBaseDirection Vector3d
height Fixed64
baseRadius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetFiniteConeIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a finite cone authored from its apex toward the center of its flat base.

public readonly bool TryGetFiniteConeIntersectionInterval(Vector3d apex, Vector3d apexToBaseDirection, Fixed64 height, Fixed64 baseRadius, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

apex Vector3d

The cone apex.

apexToBaseDirection Vector3d

The normalized direction from apex to base.

height Fixed64

The positive parametric axis extent; the conceptual base center is apex + apexToBaseDirection * height.

baseRadius Fixed64

The nonnegative base radius.

entryParameter Fixed64

The first intersecting segment parameter in [0, 1].

exitParameter Fixed64

The last intersecting segment parameter in [0, 1].

Returns

bool

Exceptions

ArgumentException

apexToBaseDirection is zero or not normalized.

ArgumentOutOfRangeException

height is not positive or baseRadius is negative.

TryGetFiniteConeIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the closed parameter interval where this segment intersects a finite apex-authored cone and reports exact endpoint containment.

public readonly bool TryGetFiniteConeIntersectionInterval(Vector3d apex, Vector3d apexToBaseDirection, Fixed64 height, Fixed64 baseRadius, out Fixed64 entryParameter, out Fixed64 exitParameter, out bool startContained, out bool endContainedStrict)

Parameters

apex Vector3d
apexToBaseDirection Vector3d
height Fixed64
baseRadius Fixed64
entryParameter Fixed64
exitParameter Fixed64
startContained bool
endContainedStrict bool

Returns

bool

Remarks

startContained includes the side, apex, and flat base. endContainedStrict excludes every boundary. The classifications and quadratic solve remain wide until the final deterministic parameter conversion.

TryGetFiniteConeIntersectionMinimumAxialPoint(Vector3d, Vector3d, Fixed64, Fixed64, out Vector3d)

Finds the intersecting lattice point with the smallest axial distance from an apex-authored cone's apex.

public readonly bool TryGetFiniteConeIntersectionMinimumAxialPoint(Vector3d apex, Vector3d apexToBaseDirection, Fixed64 height, Fixed64 baseRadius, out Vector3d point)

Parameters

apex Vector3d
apexToBaseDirection Vector3d
height Fixed64
baseRadius Fixed64
point Vector3d

Returns

bool

Remarks

The exact segment-axis projection selects the appropriate end of the admitted interval before one high-resolution authored-chord interpolation.

TryGetFiniteConeIntersectionPointInterval(Vector3d, Vector3d, Fixed64, Fixed64, out Vector3d, out Vector3d)

Finds deterministic lattice witnesses for the first and last points where this segment intersects an apex-authored finite cone.

public readonly bool TryGetFiniteConeIntersectionPointInterval(Vector3d apex, Vector3d apexToBaseDirection, Fixed64 height, Fixed64 baseRadius, out Vector3d entryPoint, out Vector3d exitPoint)

Parameters

apex Vector3d
apexToBaseDirection Vector3d
height Fixed64
baseRadius Fixed64
entryPoint Vector3d
exitPoint Vector3d

Returns

bool

Remarks

The solver uses the largest positive Q32.32 interval scale before exact authored-chord interpolation, so long segments do not amplify ordinary Q32.32 parameter rounding into coarse spatial error.

TryGetFiniteCylinderIntersectionDistanceInterval(FixedSegment, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects an endpoint-authored, radially expanded finite cylinder and reports exact endpoint containment.

public readonly bool TryGetFiniteCylinderIntersectionDistanceInterval(FixedSegment cylinderAxis, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

cylinderAxis FixedSegment
radius Fixed64
radiusExpansion Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetFiniteCylinderIntersectionDistanceInterval(FixedSegment, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the physical-distance interval where this segment intersects an endpoint-authored finite cylinder.

public readonly bool TryGetFiniteCylinderIntersectionDistanceInterval(FixedSegment cylinderAxis, Fixed64 radius, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance)

Parameters

cylinderAxis FixedSegment
radius Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64

Returns

bool

TryGetFiniteCylinderIntersectionDistanceInterval(Vector3d, FixedQuaternion, Fixed64, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects a centered finite cylinder whose local positive Y axis is transformed by a rigid quaternion frame.

public readonly bool TryGetFiniteCylinderIntersectionDistanceInterval(Vector3d center, FixedQuaternion rotation, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 axialExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
rotation FixedQuaternion
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
axialExpansion Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetFiniteCylinderIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects a centered, affinely expanded finite cylinder and reports exact endpoint containment.

public readonly bool TryGetFiniteCylinderIntersectionDistanceInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 axialExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
axialExpansion Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

TryGetFiniteCylinderIntersectionInterval(FixedSegment, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a radially expanded finite cylinder.

public readonly bool TryGetFiniteCylinderIntersectionInterval(FixedSegment cylinderAxis, Fixed64 radius, Fixed64 radiusExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

cylinderAxis FixedSegment
radius Fixed64
radiusExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64

Returns

bool

Remarks

The authored radius and radial expansion remain separate until the exact finite-axis solve. Returned parameters are clamped to [0, 1].

Exceptions

ArgumentException

Thrown when cylinderAxis has zero length.

ArgumentOutOfRangeException

Thrown when radius or radiusExpansion is negative.

TryGetFiniteCylinderIntersectionInterval(FixedSegment, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the closed parameter interval where this segment intersects a finite cylinder and reports exact endpoint containment.

public readonly bool TryGetFiniteCylinderIntersectionInterval(FixedSegment cylinderAxis, Fixed64 radius, Fixed64 radiusExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter, out bool startContained, out bool endContainedStrict)

Parameters

cylinderAxis FixedSegment
radius Fixed64
radiusExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64
startContained bool
endContainedStrict bool

Returns

bool

Remarks

The cylinder is described by its flat-cap centers and radius. startContained includes side and cap boundaries, while endContainedStrict excludes every boundary. Both flags are evaluated from the wide axial projection and radial polynomial constant, independently of rounded interval parameters.

Exceptions

ArgumentException

Thrown when cylinderAxis has zero length.

ArgumentOutOfRangeException

Thrown when radius or radiusExpansion is negative.

TryGetFiniteCylinderIntersectionInterval(FixedSegment, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a finite cylinder.

public readonly bool TryGetFiniteCylinderIntersectionInterval(FixedSegment cylinderAxis, Fixed64 radius, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

cylinderAxis FixedSegment
radius Fixed64
entryParameter Fixed64
exitParameter Fixed64

Returns

bool

Remarks

The cylinder is described by the centers of its flat end caps and its radius. Returned parameters are clamped to [0, 1].

Exceptions

ArgumentException

Thrown when cylinderAxis has zero length because the segment alone cannot retain a flat-cap normal.

ArgumentOutOfRangeException

Thrown when radius is negative.

TryGetFiniteCylinderIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64)

Finds the closed parameter interval where this segment intersects a centered, affinely expanded finite cylinder.

public readonly bool TryGetFiniteCylinderIntersectionInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 axialExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
axialExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64

Returns

bool

Remarks

axisDirection must be normalized. The authored flat caps are defined parametrically by center +/- axisDirection * (axisLength / 2); neither cap is constructed or narrowed. axialExpansion extends each cap outward, while radiusExpansion expands only the radial surface. Returned parameters use deterministic round-half-to-even conversion and are clamped to [0, 1].

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength is not positive, or when radius, radiusExpansion, or axialExpansion is negative.

TryGetFiniteCylinderIntersectionInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the closed parameter interval where this segment intersects a centered, affinely expanded finite cylinder and reports exact endpoint containment.

public readonly bool TryGetFiniteCylinderIntersectionInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 radiusExpansion, Fixed64 axialExpansion, out Fixed64 entryParameter, out Fixed64 exitParameter, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
radiusExpansion Fixed64
axialExpansion Fixed64
entryParameter Fixed64
exitParameter Fixed64
startContained bool
endContainedStrict bool

Returns

bool

Remarks

startContained includes side and cap boundaries; endContainedStrict excludes every boundary. The normalized axis defines authored caps parametrically as center +/- axisDirection * (axisLength / 2) without constructing either endpoint. Interval and containment calculations remain wide until the final deterministic parameter conversion.

Exceptions

ArgumentException

Thrown when axisDirection is zero or not normalized.

ArgumentOutOfRangeException

Thrown when axisLength is not positive, or when radius, radiusExpansion, or axialExpansion is negative.

TryGetSphereIntersectionDistanceInterval(FixedBoundSphere, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects a radially expanded sphere and reports exact endpoint containment.

public readonly bool TryGetSphereIntersectionDistanceInterval(FixedBoundSphere sphere, Fixed64 radiusExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

sphere FixedBoundSphere
radiusExpansion Fixed64
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64
startContained bool
endContainedStrict bool

Returns

bool

Remarks

The exact segment interval maps to [0, totalDistance] with one final round-half-to-even conversion. Start containment is inclusive; end containment is strict and is classified before distance rounding.

TryGetSphereIntersectionDistanceInterval(FixedBoundSphere, Fixed64, out Fixed64, out Fixed64)

Finds the physical-distance interval where this segment intersects a sphere, mapped to the caller-supplied total distance.

public readonly bool TryGetSphereIntersectionDistanceInterval(FixedBoundSphere sphere, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance)

Parameters

sphere FixedBoundSphere
totalDistance Fixed64
entryDistance Fixed64
exitDistance Fixed64

Returns

bool

TryGetSurfaceOffsetOnCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to return a centered-capsule surface offset relative to the capsule center.

public static bool TryGetSurfaceOffsetOnCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d surfaceDirection, out Vector3d surfaceOffset)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
surfaceDirection Vector3d
surfaceOffset Vector3d

Returns

bool

TryGetSurfacePointOnCenteredCapsule(Vector3d, Vector3d, Vector3d, Fixed64, Fixed64, Vector3d, out Vector3d)

Attempts to return the selected point on a conceptual centered capsule surface without narrowing its axis point before applying the radial offset.

public static bool TryGetSurfacePointOnCenteredCapsule(Vector3d point, Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Vector3d surfaceDirection, out Vector3d surfacePoint)

Parameters

point Vector3d
center Vector3d
axisDirection Vector3d
axisLength Fixed64
radius Fixed64
surfaceDirection Vector3d
surfacePoint Vector3d

Returns

bool

TryGetSweptSphereBoxIntersectionDistance(FixedBoundBox, Fixed64, Fixed64, out Fixed64)

Finds the first physical distance where this segment intersects the exact spherical dilation of an axis-aligned box.

public readonly bool TryGetSweptSphereBoxIntersectionDistance(FixedBoundBox box, Fixed64 sphericalExpansion, Fixed64 totalDistance, out Fixed64 distance)

Parameters

box FixedBoundBox

Unexpanded axis-aligned box.

sphericalExpansion Fixed64

Nonnegative spherical dilation radius.

totalDistance Fixed64

Nonnegative physical length represented by this segment.

distance Fixed64

First intersection distance when one exists.

Returns

bool

Exceptions

ArgumentException

Thrown when totalDistance is zero for a non-point segment.

ArgumentOutOfRangeException

Thrown when the expansion or total distance is negative.

TryGetSweptSphereCenteredFiniteCylinderIntersectionDistanceFromHalfAxisLength(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64)

Finds the first physical distance where this segment intersects the exact spherical dilation of a centered finite cylinder described by its nonnegative half-axis length.

public readonly bool TryGetSweptSphereCenteredFiniteCylinderIntersectionDistanceFromHalfAxisLength(Vector3d center, Vector3d axisDirection, Fixed64 halfAxisLength, Fixed64 radius, Fixed64 sphericalExpansion, Fixed64 totalDistance, out Fixed64 distance)

Parameters

center Vector3d

Cylinder center.

axisDirection Vector3d

Normalized cylinder axis direction.

halfAxisLength Fixed64

Nonnegative distance from the center to either flat cap.

radius Fixed64

Nonnegative unexpanded cylinder radius.

sphericalExpansion Fixed64

Nonnegative spherical dilation radius.

totalDistance Fixed64

Nonnegative physical length represented by this segment.

distance Fixed64

First intersection distance when one exists.

Returns

bool

Remarks

This explicit half-axis contract retains the conceptual full length in wide arithmetic, so half lengths greater than MaxValue / 2 remain valid.

Exceptions

ArgumentException

Thrown when axisDirection is not normalized, or when totalDistance is zero for a non-point segment.

ArgumentOutOfRangeException

Thrown when the half-axis length, radius, expansion, or total distance is negative.

TryGetSweptSphereFiniteCylinderIntersectionDistance(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64)

Finds the first physical distance where this segment intersects the exact spherical dilation of a centered finite cylinder.

public readonly bool TryGetSweptSphereFiniteCylinderIntersectionDistance(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 sphericalExpansion, Fixed64 totalDistance, out Fixed64 distance)

Parameters

center Vector3d

Cylinder center.

axisDirection Vector3d

Normalized cylinder axis direction.

axisLength Fixed64

Positive unexpanded cylinder axis length.

radius Fixed64

Nonnegative unexpanded cylinder radius.

sphericalExpansion Fixed64

Nonnegative spherical dilation radius.

totalDistance Fixed64

Nonnegative physical length represented by this segment.

distance Fixed64

First intersection distance when one exists.

Returns

bool

Exceptions

ArgumentException

Thrown when axisDirection is not normalized, or when totalDistance is zero for a non-point segment.

ArgumentOutOfRangeException

Thrown when the axis length is not positive, or when the radius, expansion, or total distance is negative.

TryGetSweptSphereFiniteCylinderIntersectionDistanceInterval(Vector3d, Vector3d, Fixed64, Fixed64, Fixed64, Fixed64, out Fixed64, out Fixed64, out bool, out bool)

Finds the physical-distance interval where this segment intersects the exact spherical dilation of a centered finite cylinder.

public readonly bool TryGetSweptSphereFiniteCylinderIntersectionDistanceInterval(Vector3d center, Vector3d axisDirection, Fixed64 axisLength, Fixed64 radius, Fixed64 sphericalExpansion, Fixed64 totalDistance, out Fixed64 entryDistance, out Fixed64 exitDistance, out bool startContained, out bool endContainedStrict)

Parameters

center Vector3d

Cylinder center.

axisDirection Vector3d

Normalized cylinder axis direction.

axisLength Fixed64

Positive unexpanded cylinder axis length.

radius Fixed64

Nonnegative unexpanded cylinder radius.

sphericalExpansion Fixed64

Nonnegative spherical dilation radius.

totalDistance Fixed64

Nonnegative physical length represented by this segment.

entryDistance Fixed64

First intersection distance when an interval exists.

exitDistance Fixed64

Last intersection distance when an interval exists.

startContained bool

Whether the segment start lies in the closed dilation.

endContainedStrict bool

Whether the segment end lies strictly inside the dilation.

Returns

bool

Remarks

Unlike affine radial and axial expansion, spherical dilation preserves the cylinder's rounded cap rims. Final distances use round-half-to-even.

Exceptions

ArgumentException

Thrown when axisDirection is not normalized, or when totalDistance is zero for a non-point segment.

ArgumentOutOfRangeException

Thrown when the axis length is not positive, or when the radius, expansion, or total distance is negative.

TryGetSweptSphereOrientedBoxIntersectionDistance(FixedOrientedBox, Fixed64, Fixed64, out Fixed64)

Finds the first physical distance where this segment intersects the exact spherical dilation of an oriented box.

public readonly bool TryGetSweptSphereOrientedBoxIntersectionDistance(FixedOrientedBox box, Fixed64 sphericalExpansion, Fixed64 totalDistance, out Fixed64 distance)

Parameters

box FixedOrientedBox

Unexpanded oriented box.

sphericalExpansion Fixed64

Nonnegative spherical dilation radius.

totalDistance Fixed64

Nonnegative physical length represented by this segment.

distance Fixed64

First intersection distance when one exists.

Returns

bool

Exceptions

ArgumentException

Thrown when totalDistance is zero for a non-point segment.

ArgumentOutOfRangeException

Thrown when the expansion or total distance is negative.

Operators

operator ==(FixedSegment, FixedSegment)

Determines whether two segments have the same ordered endpoints.

public static bool operator ==(FixedSegment left, FixedSegment right)

Parameters

left FixedSegment
right FixedSegment

Returns

bool

operator !=(FixedSegment, FixedSegment)

Determines whether two segments have different ordered endpoints.

public static bool operator !=(FixedSegment left, FixedSegment right)

Parameters

left FixedSegment
right FixedSegment

Returns

bool