Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ClosestHitPerBodyCollisionCollector< CollectorType > Class Template Reference

Implementation that collects the closest / deepest hit for each body and optionally sorts them on distance. More...

#include <CollisionCollectorImpl.h>

Inheritance diagram for ClosestHitPerBodyCollisionCollector< CollectorType >:

Public Types

using ResultType = typename CollectorType::ResultType
 Redeclare ResultType.
 

Public Member Functions

virtual void Reset () override
 
virtual void OnBody (const Body &inBody) override
 
virtual void AddHit (const ResultType &inResult) override
 
virtual void OnBodyEnd () override
 
void Sort ()
 Order hits on closest first.
 
bool HadHit () const
 Check if any hits were collected.
 

Public Attributes

Array< ResultTypemHits
 

Detailed Description

template<class CollectorType>
class ClosestHitPerBodyCollisionCollector< CollectorType >

Implementation that collects the closest / deepest hit for each body and optionally sorts them on distance.

Member Typedef Documentation

◆ ResultType

template<class CollectorType >
using ClosestHitPerBodyCollisionCollector< CollectorType >::ResultType = typename CollectorType::ResultType

Redeclare ResultType.

Member Function Documentation

◆ AddHit()

template<class CollectorType >
virtual void ClosestHitPerBodyCollisionCollector< CollectorType >::AddHit ( const ResultType inResult)
inlineoverridevirtual

◆ HadHit()

template<class CollectorType >
bool ClosestHitPerBodyCollisionCollector< CollectorType >::HadHit ( ) const
inline

Check if any hits were collected.

◆ OnBody()

template<class CollectorType >
virtual void ClosestHitPerBodyCollisionCollector< CollectorType >::OnBody ( const Body inBody)
inlineoverridevirtual

◆ OnBodyEnd()

template<class CollectorType >
virtual void ClosestHitPerBodyCollisionCollector< CollectorType >::OnBodyEnd ( )
inlineoverridevirtual

◆ Reset()

template<class CollectorType >
virtual void ClosestHitPerBodyCollisionCollector< CollectorType >::Reset ( )
inlineoverridevirtual

◆ Sort()

template<class CollectorType >
void ClosestHitPerBodyCollisionCollector< CollectorType >::Sort ( )
inline

Order hits on closest first.

Member Data Documentation

◆ mHits

template<class CollectorType >
Array<ResultType> ClosestHitPerBodyCollisionCollector< CollectorType >::mHits

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