Navigation
API > API/Runtime > API/Runtime/Chaos
Helpers and Wrappers for use with GJK to select the appropriate margin and support function based on context. A different margin is used for sweeps and collisions, and margins are used or not depending on the shape pair type involved. Wraps an shape object (could be FImplicitObject or some other type with the required API) and provides the API required for GJK, treating the shape as if it has zero margin. This means spheres will be spheres (not points with padding), convexes will be the outer hull, etc.
See also TGJKShapeTransformed, TGJKCoreShape
E.g., to use GJK between two Convex implicit objects GJKDistance(TGJKShape(ConvexA), TGJKShapeTransformed(ConvexB, BToATransform), ...);
E.g., to use GJK between a convex and a sphere treated as a point with padding GJKDistance(TGJKShape(ConvexA), TGJKCoreShapeTransformed(SphereB, BToATransform), ...);
| Name | TGJKShape |
| Type | struct |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/GJKShape.h |
| Include Path | #include "Chaos/GJKShape.h" |
Syntax
template<typename T_SHAPE>
struct TGJKShape
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TGJKShape
(
const FShapeType& InShape |
Chaos/GJKShape.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FShapeType | T_SHAPE | Chaos/GJKShape.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Shape | const FShapeType & | Chaos/GJKShape.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FReal GetMargin() |
Chaos/GJKShape.h | ||
FRealSingle GetMarginf() |
Chaos/GJKShape.h | ||
FVec3 InverseTransformPositionNoScale
(
const FVec3& V |
Chaos/GJKShape.h | ||
bool IsConvex() |
Chaos/GJKShape.h | ||
FVec3 SupportCore
(
const FVec3 Dir, |
Chaos/GJKShape.h | ||
FString ToString() |
Chaos/GJKShape.h |