Class DepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>
- Namespace
- BepuPhysics.CollisionDetection
- Assembly
- BepuPhysics.dll
Incrementally refines a sample direction to approach a local minimum depth between two convex bodies.
public static class DepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB> where TShapeA : IConvexShape where TShapeWideA : IShapeWide<TShapeA> where TSupportFinderA : ISupportFinder<TShapeA, TShapeWideA> where TShapeB : IConvexShape where TShapeWideB : IShapeWide<TShapeB> where TSupportFinderB : ISupportFinder<TShapeB, TShapeWideB>
Type Parameters
TShapeAType of the first shape.
TShapeWideASIMD type of the first shape.
TSupportFinderAType providing support sampling for the first shape.
TShapeBType of the second shape.
TShapeWideBSIMD type of the second shape.
TSupportFinderBType providing support sampling for the second shape.
- Inheritance
-
DepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>
- Inherited Members
Remarks
The DepthRefiner implements a Tootbird search: an incremental algorithm that takes steps towards the Tootbird. The Tootbird is the origin projected on the support plane of the best(lowest depth) support direction observed so far. This uses a simplex that updates with rules similar to a simplified version of GJK.The Tootbird is definitionally not inside the minkowski sum.
Methods
Create(in Vector3Wide, in Vector3Wide, out Simplex)
public static void Create(in Vector3Wide normal, in Vector3Wide support, out DepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.Simplex simplex)
Parameters
normalVector3WidesupportVector3WidesimplexDepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.Simplex
Create(in Vector3Wide, in Vector3Wide, in Vector3Wide, out SimplexWithWitness)
public static void Create(in Vector3Wide normal, in Vector3Wide support, in Vector3Wide supportOnA, out DepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.SimplexWithWitness simplex)
Parameters
normalVector3WidesupportVector3WidesupportOnAVector3WidesimplexDepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.SimplexWithWitness
FindMinimumDepth(in TShapeWideA, in TShapeWideB, in Vector3Wide, in Matrix3x3Wide, ref TSupportFinderA, ref TSupportFinderB, ref Simplex, in Vector3Wide, in Vector<float>, in Vector<int>, in Vector<float>, in Vector<float>, out Vector<float>, out Vector3Wide, int)
public static void FindMinimumDepth(in TShapeWideA a, in TShapeWideB b, in Vector3Wide localOffsetB, in Matrix3x3Wide localOrientationB, ref TSupportFinderA supportFinderA, ref TSupportFinderB supportFinderB, ref DepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.Simplex simplex, in Vector3Wide initialNormal, in Vector<float> initialDepth, in Vector<int> inactiveLanes, in Vector<float> convergenceThreshold, in Vector<float> minimumDepthThreshold, out Vector<float> refinedDepth, out Vector3Wide refinedNormal, int maximumIterations = 50)
Parameters
aTShapeWideAbTShapeWideBlocalOffsetBVector3WidelocalOrientationBMatrix3x3WidesupportFinderATSupportFinderAsupportFinderBTSupportFinderBsimplexDepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.SimplexinitialNormalVector3WideinitialDepthVector<float>inactiveLanesVector<int>convergenceThresholdVector<float>minimumDepthThresholdVector<float>refinedDepthVector<float>refinedNormalVector3WidemaximumIterationsint
FindMinimumDepth(in TShapeWideA, in TShapeWideB, in Vector3Wide, in Matrix3x3Wide, ref TSupportFinderA, ref TSupportFinderB, ref SimplexWithWitness, in Vector3Wide, in Vector<float>, in Vector<int>, in Vector<float>, in Vector<float>, out Vector<float>, out Vector3Wide, out Vector3Wide, int)
public static void FindMinimumDepth(in TShapeWideA a, in TShapeWideB b, in Vector3Wide localOffsetB, in Matrix3x3Wide localOrientationB, ref TSupportFinderA supportFinderA, ref TSupportFinderB supportFinderB, ref DepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.SimplexWithWitness simplex, in Vector3Wide initialNormal, in Vector<float> initialDepth, in Vector<int> inactiveLanes, in Vector<float> convergenceThreshold, in Vector<float> minimumDepthThreshold, out Vector<float> refinedDepth, out Vector3Wide refinedNormal, out Vector3Wide witnessOnA, int maximumIterations = 50)
Parameters
aTShapeWideAbTShapeWideBlocalOffsetBVector3WidelocalOrientationBMatrix3x3WidesupportFinderATSupportFinderAsupportFinderBTSupportFinderBsimplexDepthRefiner<TShapeA, TShapeWideA, TSupportFinderA, TShapeB, TShapeWideB, TSupportFinderB>.SimplexWithWitnessinitialNormalVector3WideinitialDepthVector<float>inactiveLanesVector<int>convergenceThresholdVector<float>minimumDepthThresholdVector<float>refinedDepthVector<float>refinedNormalVector3WidewitnessOnAVector3WidemaximumIterationsint
FindMinimumDepth(in TShapeWideA, in TShapeWideB, in Vector3Wide, in Matrix3x3Wide, ref TSupportFinderA, ref TSupportFinderB, in Vector3Wide, in Vector<int>, in Vector<float>, in Vector<float>, out Vector<float>, out Vector3Wide, out Vector3Wide, int)
public static void FindMinimumDepth(in TShapeWideA a, in TShapeWideB b, in Vector3Wide localOffsetB, in Matrix3x3Wide localOrientationB, ref TSupportFinderA supportFinderA, ref TSupportFinderB supportFinderB, in Vector3Wide initialNormal, in Vector<int> inactiveLanes, in Vector<float> searchEpsilon, in Vector<float> minimumDepthThreshold, out Vector<float> depth, out Vector3Wide refinedNormal, out Vector3Wide witnessOnA, int maximumIterations = 25)
Parameters
aTShapeWideAbTShapeWideBlocalOffsetBVector3WidelocalOrientationBMatrix3x3WidesupportFinderATSupportFinderAsupportFinderBTSupportFinderBinitialNormalVector3WideinactiveLanesVector<int>searchEpsilonVector<float>minimumDepthThresholdVector<float>depthVector<float>refinedNormalVector3WidewitnessOnAVector3WidemaximumIterationsint
FindMinimumDepth(in TShapeWideA, in TShapeWideB, in Vector3Wide, in Matrix3x3Wide, ref TSupportFinderA, ref TSupportFinderB, in Vector3Wide, in Vector<int>, in Vector<float>, in Vector<float>, out Vector<float>, out Vector3Wide, int)
public static void FindMinimumDepth(in TShapeWideA a, in TShapeWideB b, in Vector3Wide localOffsetB, in Matrix3x3Wide localOrientationB, ref TSupportFinderA supportFinderA, ref TSupportFinderB supportFinderB, in Vector3Wide initialNormal, in Vector<int> inactiveLanes, in Vector<float> searchEpsilon, in Vector<float> minimumDepthThreshold, out Vector<float> depth, out Vector3Wide refinedNormal, int maximumIterations = 25)
Parameters
aTShapeWideAbTShapeWideBlocalOffsetBVector3WidelocalOrientationBMatrix3x3WidesupportFinderATSupportFinderAsupportFinderBTSupportFinderBinitialNormalVector3WideinactiveLanesVector<int>searchEpsilonVector<float>minimumDepthThresholdVector<float>depthVector<float>refinedNormalVector3WidemaximumIterationsint
FindSupport(in TShapeWideA, in TShapeWideB, in Vector3Wide, in Matrix3x3Wide, ref TSupportFinderA, ref TSupportFinderB, in Vector3Wide, in Vector<int>, out Vector3Wide)
public static void FindSupport(in TShapeWideA a, in TShapeWideB b, in Vector3Wide localOffsetB, in Matrix3x3Wide localOrientationB, ref TSupportFinderA supportFinderA, ref TSupportFinderB supportFinderB, in Vector3Wide direction, in Vector<int> terminatedLanes, out Vector3Wide support)
Parameters
aTShapeWideAbTShapeWideBlocalOffsetBVector3WidelocalOrientationBMatrix3x3WidesupportFinderATSupportFinderAsupportFinderBTSupportFinderBdirectionVector3WideterminatedLanesVector<int>supportVector3Wide
FindSupport(in TShapeWideA, in TShapeWideB, in Vector3Wide, in Matrix3x3Wide, ref TSupportFinderA, ref TSupportFinderB, in Vector3Wide, in Vector<int>, out Vector3Wide, out Vector3Wide)
public static void FindSupport(in TShapeWideA a, in TShapeWideB b, in Vector3Wide localOffsetB, in Matrix3x3Wide localOrientationB, ref TSupportFinderA supportFinderA, ref TSupportFinderB supportFinderB, in Vector3Wide direction, in Vector<int> terminatedLanes, out Vector3Wide support, out Vector3Wide supportOnA)