Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
BroadPhaseCastResult Class Reference

Structure that holds a ray cast or other object cast hit. More...

#include <CastResult.h>

Inheritance diagram for BroadPhaseCastResult:
RayCastResult

Public Member Functions

JPH_OVERRIDE_NEW_DELETE float GetEarlyOutFraction () const
 Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For rays/cast shapes we can just use the collision fraction. More...
 
void Reset ()
 Reset this result so it can be reused for a new cast. More...
 

Public Attributes

BodyID mBodyID
 Body that was hit. More...
 
float mFraction = 1.0f + FLT_EPSILON
 Hit fraction of the ray/object [0, 1], HitPoint = Start + mFraction * (End - Start) More...
 

Detailed Description

Structure that holds a ray cast or other object cast hit.

Member Function Documentation

◆ GetEarlyOutFraction()

JPH_OVERRIDE_NEW_DELETE float BroadPhaseCastResult::GetEarlyOutFraction ( ) const
inline

Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For rays/cast shapes we can just use the collision fraction.

◆ Reset()

void BroadPhaseCastResult::Reset ( )
inline

Reset this result so it can be reused for a new cast.

Member Data Documentation

◆ mBodyID

BodyID BroadPhaseCastResult::mBodyID

Body that was hit.

◆ mFraction

float BroadPhaseCastResult::mFraction = 1.0f + FLT_EPSILON

Hit fraction of the ray/object [0, 1], HitPoint = Start + mFraction * (End - Start)


The documentation for this class was generated from the following file: