Jolt Physics
A multi core friendly Game Physics Engine
|
Go to the source code of this file.
Functions | |
JPH_NAMESPACE_BEGIN JPH_INLINE float | RayCapsule (Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCapsuleHalfHeight, float inCapsuleRadius) |
JPH_NAMESPACE_BEGIN JPH_INLINE float RayCapsule | ( | Vec3Arg | inRayOrigin, |
Vec3Arg | inRayDirection, | ||
float | inCapsuleHalfHeight, | ||
float | inCapsuleRadius | ||
) |
Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a capsule centered around the origin with its axis along the Y axis and half height specified.
inRayDirection | Ray direction. Does not need to be normalized. |
inRayOrigin | Origin of the ray. If the ray starts inside the capsule, the returned fraction will be 0. |
inCapsuleHalfHeight | Distance from the origin to the center of the top sphere (or that of the bottom) |
inCapsuleRadius | Radius of the top/bottom sphere |