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
Fields
End
The end point of the segment.
[JsonInclude]
[MemoryPackOrder(1)]
public Vector3d End
Field Value
Start
The start point of the segment.
[JsonInclude]
[MemoryPackOrder(0)]
public Vector3d Start
Field Value
Properties
Bounds
The normalized axis-aligned box that contains this segment.
[JsonIgnore]
[MemoryPackIgnore]
public FixedBoundBox Bounds { get; }
Property Value
Delta
[JsonIgnore]
[MemoryPackIgnore]
public Vector3d Delta { get; }
Property Value
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
LengthSquared
The squared segment length.
[JsonIgnore]
[MemoryPackIgnore]
public Fixed64 LengthSquared { get; }
Property Value
Methods
ClosestPoint(Vector3d)
Finds the closest point on this finite segment to the supplied point.
public Vector3d ClosestPoint(Vector3d point)
Parameters
pointVector3d
Returns
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
Returns
Exceptions
- ArgumentException
Thrown when
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLengthorradiusis 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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64
Returns
Exceptions
- ArgumentException
Thrown when
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLength,radius, orradiusExpansionis 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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64strictbool
Returns
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
Returns
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
pointVector3dcenterVector3dbaseToApexDirectionVector3dheightFixed64baseRadiusFixed64strictbool
Returns
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
pointVector3dThe point to classify.
centerVector3dThe cylinder center.
axisDirectionVector3dThe normalized cylinder axis.
axisLengthFixed64The positive full cylinder length.
radiusFixed64The nonnegative cylinder radius.
axialToleranceFixed64The nonnegative distance added beyond each flat cap.
radialToleranceFixed64The nonnegative distance added to the radial extent.
strictbooltrue to exclude every expanded boundary.
Returns
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
pointVector3dThe point to classify.
centerVector3dThe cylinder center.
axisDirectionVector3dThe normalized cap-normal direction.
axisLengthFixed64The positive full physical axis length.
radiusFixed64The nonnegative radial extent.
strictbooltrue to exclude the side and both flat caps; otherwise, boundaries are included.
Returns
Exceptions
- ArgumentException
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
axisLengthis not positive orradiusis 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
pointVector3dapexVector3dapexToBaseDirectionVector3dheightFixed64baseRadiusFixed64strictbool
Returns
Deconstruct(out Vector3d, out Vector3d)
Deconstructs the segment into start and end points.
public void Deconstruct(out Vector3d start, out Vector3d end)
Parameters
DistanceSquared(Vector3d)
Computes the squared distance from the supplied point to this finite segment.
public Fixed64 DistanceSquared(Vector3d point)
Parameters
pointVector3d
Returns
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
firstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64firstRadiusFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64secondRadiusFixed64
Returns
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
projectionAxisVector3dcylinderCenterVector3dcylinderAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64capsuleCenterVector3dcapsuleAxisDirectionVector3dcapsuleAxisLengthFixed64capsuleRadiusFixed64
Returns
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
projectionAxisVector3dfirstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64firstRadiusFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64secondRadiusFixed64
Returns
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
coneCenterVector3dbaseToApexDirectionVector3dconeHeightFixed64coneRadiusFixed64sphereCenterVector3dsphereRadiusFixed64
Returns
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
cylinderCenterVector3dcylinderAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64sphereCenterVector3dsphereRadiusFixed64
Returns
Equals(FixedSegment)
public bool Equals(FixedSegment other)
Parameters
otherFixedSegment
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
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
centerVector3drotationFixedQuaternionaxisLengthFixed64radiusFixed64directionVector3d
Returns
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
centerVector3drotationFixedQuaternionheightFixed64radiusFixed64directionVector3d
Returns
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
Returns
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
centerVector3drotationFixedQuaternionaxisLengthFixed64radiusFixed64directionVector3d
Returns
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
firstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64
Returns
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
otherFixedSegment
Returns
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
Returns
Remarks
The conceptual endpoints are
center +/- axisDirection * (axisLength / 2). They are never
constructed or narrowed before the closest-feature decision.
Exceptions
- ArgumentException
Thrown when
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLengthis 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
Returns
Remarks
The final value uses round-half-to-even. Points inside or on the capsule return zero.
Exceptions
- ArgumentException
Thrown when
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLengthorradiusis negative.
GetHashCode()
public override int GetHashCode()
Returns
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
Returns
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
totalDistanceis negative, or whendistanceis outside [0,totalDistance].- ArgumentException
Thrown when
totalDistanceis 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
pointVector3dcenterVector3dframeRotationFixedQuaternionlocalAxisDirectionVector3daxisLengthFixed64radiusFixed64localSurfaceDirectionVector3d
Returns
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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64surfaceDirectionVector3d
Returns
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
capsuleAxisFixedSegmentradiusFixed64radiusExpansionFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
capsuleAxisFixedSegmentradiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64
Returns
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
centerVector3drotationFixedQuaternionaxisLengthFixed64radiusFixed64radiusExpansionFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64
Returns
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
capsuleAxisFixedSegmentradiusFixed64radiusExpansionFixed64entryParameterFixed64exitParameterFixed64
Returns
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
radiusorradiusExpansionis 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
capsuleAxisFixedSegmentradiusFixed64radiusExpansionFixed64entryParameterFixed64exitParameterFixed64startContainedboolendContainedStrictbool
Returns
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
radiusorradiusExpansionis 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
capsuleAxisFixedSegmentradiusFixed64entryParameterFixed64exitParameterFixed64
Returns
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
radiusis 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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64entryParameterFixed64exitParameterFixed64
Returns
Exceptions
- ArgumentException
Thrown when
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLength,radiusorradiusExpansionis 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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64entryParameterFixed64exitParameterFixed64startContainedboolendContainedStrictbool
Returns
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
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLength,radiusorradiusExpansionis 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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64entryParameterFixed64exitParameterFixed64
Returns
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
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLengthorradiusis 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
Returns
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
projectionAxisVector3dcapsuleCenterVector3dcapsuleAxisDirectionVector3dcapsuleAxisLengthFixed64capsuleRadiusFixed64slabCenterVector3dslabCapsuleAxisDirectionVector2dslabCapsuleAxisLengthFixed64slabCapsuleRadiusFixed64slabHalfThicknessFixed64orientedAxisVector3ddepthFixed64depthIsClampedbool
Returns
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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64directionVector3dsupportVector3d
Returns
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
Returns
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
firstCenterVector3dfirstRotationFixedQuaternionfirstLocalAxisDirectionVector3dfirstAxisLengthFixed64firstRadiusFixed64secondCenterVector3dsecondRotationFixedQuaternionsecondLocalAxisDirectionVector3dsecondAxisLengthFixed64secondRadiusFixed64fallbackNormalVector3dcontactFixedContactAnchors
Returns
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
projectionAxisVector3dconeCenterVector3dbaseToApexDirectionVector3dconeHeightFixed64coneRadiusFixed64slabCenterVector3dslabCapsuleAxisDirectionVector2dslabCapsuleAxisLengthFixed64slabCapsuleRadiusFixed64slabHalfThicknessFixed64orientedAxisVector3ddepthFixed64depthIsClampedbool
Returns
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
centerVector3drotationFixedQuaternionheightFixed64baseRadiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
centerVector3dbaseToApexDirectionVector3dheightFixed64baseRadiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64
Returns
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
centerVector3dbaseToApexDirectionVector3dheightFixed64baseRadiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
centerVector3dThe midpoint between the apex and flat-base center.
baseToApexDirectionVector3dThe normalized direction from base to apex.
heightFixed64The positive full parametric axis extent between base and apex.
baseRadiusFixed64The nonnegative base radius.
entryParameterFixed64The first intersecting segment parameter in [0, 1].
exitParameterFixed64The last intersecting segment parameter in [0, 1].
Returns
Exceptions
- ArgumentException
baseToApexDirectionis zero or not normalized.- ArgumentOutOfRangeException
heightis not positive orbaseRadiusis 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
centerVector3dbaseToApexDirectionVector3dheightFixed64baseRadiusFixed64entryParameterFixed64exitParameterFixed64startContainedboolendContainedStrictbool
Returns
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
centerVector3dbaseToApexDirectionVector3dheightFixed64baseRadiusFixed64entryPointVector3dexitPointVector3d
Returns
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
centerVector3daxisDirectionVector3dheightFixed64radiusFixed64directionVector3dsupportVector3d
Returns
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
Returns
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
projectionAxisVector3dcylinderCenterVector3dcylinderAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64capsuleCenterVector3dcapsuleAxisDirectionVector3dcapsuleAxisLengthFixed64capsuleRadiusFixed64orientedAxisVector3ddepthFixed64
Returns
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
projectionAxisVector3dcylinderCenterVector3dcylinderAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64capsuleCenterVector3dcapsuleAxisDirectionVector3dcapsuleAxisLengthFixed64capsuleRadiusFixed64orientedAxisVector3ddepthFixed64depthIsClampedbool
Returns
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
cylinderCenterVector3dcylinderRotationFixedQuaternioncylinderLocalAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64capsuleCenterVector3dcapsuleRotationFixedQuaternioncapsuleLocalAxisDirectionVector3dcapsuleAxisLengthFixed64capsuleRadiusFixed64contactFixedContactAnchors
Returns
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
projectionAxisVector3dcylinderCenterVector3dcylinderAxisDirectionVector3dcylinderAxisLengthFixed64cylinderRadiusFixed64slabCenterVector3dslabCapsuleAxisDirectionVector2dslabCapsuleAxisLengthFixed64slabCapsuleRadiusFixed64slabHalfThicknessFixed64orientedAxisVector3ddepthFixed64depthIsClampedbool
Returns
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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64directionVector3dsupportVector3d
Returns
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
Returns
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
projectionAxisVector3dfirstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64firstRadiusFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64secondRadiusFixed64orientedAxisVector3ddepthFixed64
Returns
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
projectionAxisVector3dfirstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64firstRadiusFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64secondRadiusFixed64orientedAxisVector3ddepthFixed64depthIsClampedbool
Returns
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
firstCenterVector3dfirstRotationFixedQuaternionfirstLocalAxisDirectionVector3dfirstAxisLengthFixed64firstRadiusFixed64secondCenterVector3dsecondRotationFixedQuaternionsecondLocalAxisDirectionVector3dsecondAxisLengthFixed64secondRadiusFixed64contactFixedContactAnchors
Returns
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
pointVector3dcenterVector3dframeRotationFixedQuaternionlocalAxisDirectionVector3daxisLengthFixed64radiusFixed64localFallbackRadialDirectionVector3dsurfaceAnchorFixedPointAnchoroutwardNormalVector3dsignedDistanceFixed64
Returns
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
pointVector3dcenterVector3dframeRotationFixedQuaternionlocalAxisDirectionVector3dheightFixed64radiusFixed64localFallbackRadialDirectionVector3dsurfaceAnchorFixedPointAnchoroutwardNormalVector3dsignedDistanceFixed64
Returns
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
pointVector3dcenterVector3dbaseToApexDirectionVector3dheightFixed64radiusFixed64fallbackRadialDirectionVector3dsurfaceOffsetVector3doutwardNormalVector3dsignedDistanceFixed64
Returns
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
pointVector3dcenterVector3dframeRotationFixedQuaternionlocalAxisDirectionVector3daxisLengthFixed64radiusFixed64localFallbackRadialDirectionVector3dsurfaceAnchorFixedPointAnchoroutwardNormalVector3dsignedDistanceFixed64
Returns
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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64fallbackRadialDirectionVector3dsurfaceOffsetVector3doutwardNormalVector3dsignedDistanceFixed64
Returns
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
firstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64firstCenterOffsetVector3dsecondCenterOffsetVector3d
Returns
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
pointVector3dcenterVector3dbaseToApexDirectionVector3dheightFixed64radiusFixed64fallbackRadialDirectionVector3dsurfacePointVector3doutwardNormalVector3dsignedDistanceFixed64
Returns
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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64fallbackRadialDirectionVector3dsurfacePointVector3doutwardNormalVector3dsignedDistanceFixed64
Returns
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
firstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64firstPointVector3dsecondPointVector3d
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
firstCenterVector3dfirstAxisDirectionVector3dfirstAxisLengthFixed64secondCenterVector3dsecondAxisDirectionVector3dsecondAxisLengthFixed64distanceFixed64
Returns
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
Returns
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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64distanceFixed64
Returns
- bool
True when the final distance is representable; otherwise false and
distanceis MaxValue. Points inside or on the capsule return zero.
Remarks
The final value uses round-half-to-even.
Exceptions
- ArgumentException
Thrown when
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLengthorradiusis 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
apexVector3dapexToBaseDirectionVector3dheightFixed64baseRadiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64
Returns
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
apexVector3dapexToBaseDirectionVector3dheightFixed64baseRadiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
apexVector3dThe cone apex.
apexToBaseDirectionVector3dThe normalized direction from apex to base.
heightFixed64The positive parametric axis extent; the conceptual base center is
apex + apexToBaseDirection * height.baseRadiusFixed64The nonnegative base radius.
entryParameterFixed64The first intersecting segment parameter in [0, 1].
exitParameterFixed64The last intersecting segment parameter in [0, 1].
Returns
Exceptions
- ArgumentException
apexToBaseDirectionis zero or not normalized.- ArgumentOutOfRangeException
heightis not positive orbaseRadiusis 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
apexVector3dapexToBaseDirectionVector3dheightFixed64baseRadiusFixed64entryParameterFixed64exitParameterFixed64startContainedboolendContainedStrictbool
Returns
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
Returns
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
apexVector3dapexToBaseDirectionVector3dheightFixed64baseRadiusFixed64entryPointVector3dexitPointVector3d
Returns
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
cylinderAxisFixedSegmentradiusFixed64radiusExpansionFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
cylinderAxisFixedSegmentradiusFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64
Returns
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
centerVector3drotationFixedQuaternionaxisLengthFixed64radiusFixed64radiusExpansionFixed64axialExpansionFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64axialExpansionFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
cylinderAxisFixedSegmentradiusFixed64radiusExpansionFixed64entryParameterFixed64exitParameterFixed64
Returns
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
cylinderAxishas zero length.- ArgumentOutOfRangeException
Thrown when
radiusorradiusExpansionis 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
cylinderAxisFixedSegmentradiusFixed64radiusExpansionFixed64entryParameterFixed64exitParameterFixed64startContainedboolendContainedStrictbool
Returns
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
cylinderAxishas zero length.- ArgumentOutOfRangeException
Thrown when
radiusorradiusExpansionis 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
cylinderAxisFixedSegmentradiusFixed64entryParameterFixed64exitParameterFixed64
Returns
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
cylinderAxishas zero length because the segment alone cannot retain a flat-cap normal.- ArgumentOutOfRangeException
Thrown when
radiusis 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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64axialExpansionFixed64entryParameterFixed64exitParameterFixed64
Returns
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
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLengthis not positive, or whenradius,radiusExpansion, oraxialExpansionis 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
centerVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64radiusExpansionFixed64axialExpansionFixed64entryParameterFixed64exitParameterFixed64startContainedboolendContainedStrictbool
Returns
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
axisDirectionis zero or not normalized.- ArgumentOutOfRangeException
Thrown when
axisLengthis not positive, or whenradius,radiusExpansion, oraxialExpansionis 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
sphereFixedBoundSphereradiusExpansionFixed64totalDistanceFixed64entryDistanceFixed64exitDistanceFixed64startContainedboolendContainedStrictbool
Returns
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
sphereFixedBoundSpheretotalDistanceFixed64entryDistanceFixed64exitDistanceFixed64
Returns
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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64surfaceDirectionVector3dsurfaceOffsetVector3d
Returns
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
pointVector3dcenterVector3daxisDirectionVector3daxisLengthFixed64radiusFixed64surfaceDirectionVector3dsurfacePointVector3d
Returns
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
boxFixedBoundBoxUnexpanded axis-aligned box.
sphericalExpansionFixed64Nonnegative spherical dilation radius.
totalDistanceFixed64Nonnegative physical length represented by this segment.
distanceFixed64First intersection distance when one exists.
Returns
Exceptions
- ArgumentException
Thrown when
totalDistanceis 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
centerVector3dCylinder center.
axisDirectionVector3dNormalized cylinder axis direction.
halfAxisLengthFixed64Nonnegative distance from the center to either flat cap.
radiusFixed64Nonnegative unexpanded cylinder radius.
sphericalExpansionFixed64Nonnegative spherical dilation radius.
totalDistanceFixed64Nonnegative physical length represented by this segment.
distanceFixed64First intersection distance when one exists.
Returns
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
axisDirectionis not normalized, or whentotalDistanceis 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
centerVector3dCylinder center.
axisDirectionVector3dNormalized cylinder axis direction.
axisLengthFixed64Positive unexpanded cylinder axis length.
radiusFixed64Nonnegative unexpanded cylinder radius.
sphericalExpansionFixed64Nonnegative spherical dilation radius.
totalDistanceFixed64Nonnegative physical length represented by this segment.
distanceFixed64First intersection distance when one exists.
Returns
Exceptions
- ArgumentException
Thrown when
axisDirectionis not normalized, or whentotalDistanceis 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
centerVector3dCylinder center.
axisDirectionVector3dNormalized cylinder axis direction.
axisLengthFixed64Positive unexpanded cylinder axis length.
radiusFixed64Nonnegative unexpanded cylinder radius.
sphericalExpansionFixed64Nonnegative spherical dilation radius.
totalDistanceFixed64Nonnegative physical length represented by this segment.
entryDistanceFixed64First intersection distance when an interval exists.
exitDistanceFixed64Last intersection distance when an interval exists.
startContainedboolWhether the segment start lies in the closed dilation.
endContainedStrictboolWhether the segment end lies strictly inside the dilation.
Returns
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
axisDirectionis not normalized, or whentotalDistanceis 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
boxFixedOrientedBoxUnexpanded oriented box.
sphericalExpansionFixed64Nonnegative spherical dilation radius.
totalDistanceFixed64Nonnegative physical length represented by this segment.
distanceFixed64First intersection distance when one exists.
Returns
Exceptions
- ArgumentException
Thrown when
totalDistanceis 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
leftFixedSegmentrightFixedSegment
Returns
operator !=(FixedSegment, FixedSegment)
Determines whether two segments have different ordered endpoints.
public static bool operator !=(FixedSegment left, FixedSegment right)
Parameters
leftFixedSegmentrightFixedSegment