13template <
class CollectorType>
23 CollectorType::Reset();
50template <
class CollectorType>
60 CollectorType::Reset();
68 float early_out = inResult.GetEarlyOutFraction();
69 if (!mHadHit || early_out <
mHit.GetEarlyOutFraction())
72 CollectorType::UpdateEarlyOutFraction(early_out);
93template <
class CollectorType>
103 CollectorType::Reset();
115 CollectorType::ForceEarlyOut();
131 bool mHadHit =
false;
#define JPH_NAMESPACE_END
Definition: Core.h:378
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
#define JPH_ASSERT(...)
Definition: IssueReporting.h:33
void QuickSort(Iterator inBegin, Iterator inEnd, Compare inCompare)
Implementation of the quick sort algorithm. The STL version implementation is not consistent across p...
Definition: QuickSort.h:53
Simple implementation that collects all hits and optionally sorts them on distance.
Definition: CollisionCollectorImpl.h:15
void Sort()
Order hits on closest first.
Definition: CollisionCollectorImpl.h:35
bool HadHit() const
Check if any hits were collected.
Definition: CollisionCollectorImpl.h:41
typename CollectorType::ResultType ResultType
Redeclare ResultType.
Definition: CollisionCollectorImpl.h:18
Array< ResultType > mHits
Definition: CollisionCollectorImpl.h:46
virtual void AddHit(const ResultType &inResult) override
Definition: CollisionCollectorImpl.h:29
virtual void Reset() override
Definition: CollisionCollectorImpl.h:21
Simple implementation that collects any hit.
Definition: CollisionCollectorImpl.h:95
virtual void Reset() override
Definition: CollisionCollectorImpl.h:101
virtual void AddHit(const ResultType &inResult) override
Definition: CollisionCollectorImpl.h:109
typename CollectorType::ResultType ResultType
Redeclare ResultType.
Definition: CollisionCollectorImpl.h:98
bool HadHit() const
Check if this collector has had a hit.
Definition: CollisionCollectorImpl.h:123
ResultType mHit
Definition: CollisionCollectorImpl.h:128
bool empty() const
Returns true if there are no elements in the array.
Definition: Array.h:312
const_iterator begin() const
Iterators.
Definition: Array.h:412
void clear()
Destruct all elements and set length to zero.
Definition: Array.h:143
void push_back(const T &inValue)
Add element to the back of the array.
Definition: Array.h:275
const_iterator end() const
Definition: Array.h:417
Simple implementation that collects the closest / deepest hit.
Definition: CollisionCollectorImpl.h:52
virtual void Reset() override
Definition: CollisionCollectorImpl.h:58
virtual void AddHit(const ResultType &inResult) override
Definition: CollisionCollectorImpl.h:66
ResultType mHit
Definition: CollisionCollectorImpl.h:86
bool HadHit() const
Check if this collector has had a hit.
Definition: CollisionCollectorImpl.h:81
typename CollectorType::ResultType ResultType
Redeclare ResultType.
Definition: CollisionCollectorImpl.h:55