Navigation
API > API/Runtime > API/Runtime/Chaos
Description
The WarmStartData is an input and output parameter. If the function is called with a small change in BToATM there's it will converge much faster, usually in 1 iteration for polygonal shapes.
This version returns OutClosestB in B's local space, compated to GJKPenetration where all output is in the space of A
| Name | Chaos::GJKPenetrationWarmStartable |
| Type | function |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/GJK.h |
| Include Path | #include "Chaos/GJK.h" |
namespace Chaos
{
template<typename T, typename TGeometryA, typename TGeometryB>
bool Chaos::GJKPenetrationWarmStartable
(
const TGeometryA & A,
const TGeometryB & B,
const TRigidTransform < T, 3 > & BToATM,
T & OutPenetration,
TVec3< T > & OutClosestA,
TVec3< T > & OutClosestB,
TVec3< T > & OutNormalA,
TVec3< T > & OutNormalB,
int32 & OutVertexA,
int32 & OutVertexB,
TGJKSimplexData < T > & InOutSimplexData,
T & OutMaxSupportDelta,
const T Epsilon,
const T EPAEpsilon
)
}
true if the results are populated (always for this implementation, but
Parameters
| Name | Remarks |
|---|---|
| T | Number type (float or double) |
| TGeometryA | The first shape type |
| TGeometryB | The second shape type |
| A | The first shape |
| B | The second shape |
| BToATM | A transform from B-local space to A-local space |
| OutPenetration | The overlap distance (+ve for overlap, -ve for separation) |
| OutClosestA | The closest point on A, in A-local space |
| OutClosestB | The closest point on B, in B-local space |
| OutNormalA | The contact normal pointing away from A in A-local space |
| OutNormalB | The contact normal pointing away from A in B-local space |
| OutVertexA | The closest vertex on A |
| OutVertexB | The closest vertex on B |
| SimplexData | In/out simplex data used to initialize and update GJK. Can be stored to improve convergence on subsequent calls for "small" changes in relative rotation. |
| OutMaxContactDelta | The maximum error in the contact position as a result of using a margin. This is the difference between the core shape + margin and the outer shape on the supporting vertices |
| Epsilon | The separation distance below which GJK aborts and switches to EPA |
See Also
- EPA())