Kernel which performs collision detection on a pair of two particles and inserts the contact (if existent) into the contact storage passed in the constructor.
Call this kernel on each particle pair to perform contact detection and insert each contact in the contact storage.
#include <DetectAndStoreContacts.h>
Public Member Functions | |
DetectAndStoreContacts (data::ContactStorage &cs) | |
template<typename Accessor > | |
void | operator() (size_t idx1, size_t idx2, Accessor &ac, const domain::IDomain &domain, collision_detection::AnalyticContactDetection acd=collision_detection::AnalyticContactDetection()) |
Compute if particle 1 and particle 2 collide. More... | |
Private Attributes | |
data::ContactStorage & | cs_ |
|
inlineexplicit |
|
inline |
Compute if particle 1 and particle 2 collide.
If so, insert the contact into the contact storage.
idx1 | The index of particle 1 |
idx2 | The index of particle 2 |
ac | The accessor used to access the values of the particles. |
domain | The domain of the block (used to decide if the contact has to be treated by this process) |
acd | The collision detection to be used. Default parameter: AnalyticContactDetection() |
|
private |