12template <
class Vec,
class Mat,
class RayCastType>
23 RayCastType
Transformed(
typename Mat::ArgType inTransform)
const
25 Vec ray_origin = inTransform *
mOrigin;
27 return { ray_origin, ray_direction };
31 RayCastType
Translated(
typename Vec::ArgType inTranslation)
const
EBackFaceMode
How collision detection functions will treat back facing triangles.
Definition BackFaceMode.h:11
@ IgnoreBackFaces
Ignore collision with back facing surfaces/triangles.
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:31
Mat44 RMat44
Definition Real.h:31
Vec3 RVec3
Definition Real.h:29
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Settings to be passed with a ray cast.
Definition RayCast.h:70
JPH_OVERRIDE_NEW_DELETE void SetBackFaceMode(EBackFaceMode inMode)
Set the backfacing mode for all shapes.
Definition RayCast.h:75
EBackFaceMode mBackFaceModeTriangles
How backfacing triangles should be treated (should we report back facing hits for triangle based shap...
Definition RayCast.h:78
bool mTreatConvexAsSolid
If convex shapes should be treated as solid. When true, a ray starting inside a convex shape will gen...
Definition RayCast.h:84
EBackFaceMode mBackFaceModeConvex
How backfacing convex objects should be treated (should we report back facing hits for convex shapes?...
Definition RayCast.h:81
RRayCast(const RayCast &inRay)
Convert from RayCast, converts single to double precision.
Definition RayCast.h:56
Structure that holds a single ray cast.
Definition RayCast.h:14
RayCastT(const RayCastT< Vec, Mat, RayCastType > &)=default
JPH_OVERRIDE_NEW_DELETE RayCastT()=default
Constructors.
RayCastType Translated(typename Vec::ArgType inTranslation) const
Translate ray using inTranslation.
Definition RayCast.h:31
RayCastT(typename Vec::ArgType inOrigin, Vec3Arg inDirection)
Definition RayCast.h:19
Vec3 mDirection
Direction and length of the ray (anything beyond this length will not be reported as a hit)
Definition RayCast.h:43
RayCastType Transformed(typename Mat::ArgType inTransform) const
Transform this ray using inTransform.
Definition RayCast.h:23
Vec GetPointOnRay(float inFraction) const
Get point with fraction inFraction on ray (0 = start of ray, 1 = end of ray)
Definition RayCast.h:37
Vec mOrigin
Origin of the ray.
Definition RayCast.h:42