22    float cylinder = 
RayCylinder(inRayOrigin, inRayDirection, inCapsuleRadius);
 
   23    if (cylinder == FLT_MAX)
 
   27    if (abs(inRayOrigin.
GetY() + cylinder * inRayDirection.
GetY()) <= inCapsuleHalfHeight)
 
   31    Vec3 sphere_center(0, inCapsuleHalfHeight, 0);
 
   32    float upper = 
RaySphere(inRayOrigin, inRayDirection, sphere_center, inCapsuleRadius);
 
   33    float lower = 
RaySphere(inRayOrigin, inRayDirection, -sphere_center, inCapsuleRadius);
 
   34    return min(upper, lower);
 
#define JPH_NAMESPACE_END
Definition: Core.h:378
 
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
 
JPH_NAMESPACE_BEGIN JPH_INLINE float RayCapsule(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCapsuleHalfHeight, float inCapsuleRadius)
Definition: RayCapsule.h:19
 
JPH_NAMESPACE_BEGIN JPH_INLINE float RayCylinder(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCylinderRadius)
Definition: RayCylinder.h:17
 
JPH_NAMESPACE_BEGIN JPH_INLINE float RaySphere(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, Vec3Arg inSphereCenter, float inSphereRadius)
Definition: RaySphere.h:17
 
JPH_INLINE float GetY() const
Definition: Vec3.h:125