Navigation
API > API/Runtime > API/Runtime/Chaos
Description
Sweeps one geometry against the other @A The first geometry @B The second geometry @StartTM B's starting configuration in A's local space @RayDir The ray's direction (normalized) @RayLength The ray's length @OutTime The time along the ray when the objects first overlap @OutPosition The first point of impact (in A's local space) when the objects first overlap. Invalid if time of impact is 0 @OutNormal The impact normal (in A's local space) when the objects first overlap. Invalid if time of impact is 0 @ThicknessA The amount of geometry inflation for Geometry A (for example if the surface distance of two geometries with thickness 0 would be 2, a thickness of 0.5 would give a distance of 1.5) @InitialDir The first direction we use to search the CSO @ThicknessB The amount of geometry inflation for Geometry B (for example if the surface distance of two geometries with thickness 0 would be 2, a thickness of 0.5 would give a distance of 1.5)
If A overlaps B at the start of the ray ("initial overlap" condition) then this function returns true, and sets OutTime = 0, but does not set any other output variables.
| Name | Chaos::GJKRaycast |
| 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::GJKRaycast
(
const TGeometryA & A,
const TGeometryB & B,
const TRigidTransform < T, 3 > & StartTM,
const TVector < T, 3 > & RayDir,
const T RayLength,
T & OutTime,
TVector < T, 3 > & OutPosition,
TVector < T, 3 > & OutNormal,
const T ThicknessA,
const TVector < T, 3 > & InitialDir,
const T ThicknessB
)
}
True if the geometries overlap during the sweep, False otherwise