Go to the source code of this file.
◆ RayCylinder() [1/2]
JPH_INLINE float RayCylinder |
( |
Vec3Arg |
inRayOrigin, |
|
|
Vec3Arg |
inRayDirection, |
|
|
float |
inCylinderHalfHeight, |
|
|
float |
inCylinderRadius |
|
) |
| |
Test a ray against a cylinder centered around the origin with its axis along the Y axis and half height specified.
- Returns
- FLT_MAX if there is no intersection, otherwise the fraction along the ray.
- Parameters
-
inRayDirection | Ray direction. Does not need to be normalized. |
inRayOrigin | Origin of the ray. If the ray starts inside the cylinder, the returned fraction will be 0. |
inCylinderRadius | Radius of the cylinder |
inCylinderHalfHeight | Distance from the origin to the top (or bottom) of the cylinder |
◆ RayCylinder() [2/2]
Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against an infinite cylinder centered along the Y axis
- Returns
- FLT_MAX if there is no intersection, otherwise the fraction along the ray.
- Parameters
-
inRayDirection | Direction of the ray. Does not need to be normalized. |
inRayOrigin | Origin of the ray. If the ray starts inside the cylinder, the returned fraction will be 0. |
inCylinderRadius | Radius of the infinite cylinder |