2#include <muda/ext/geo/spatial_hash/sparse_spatial_hash_impl.h>
4namespace muda::spatial_hash
9 __device__
bool operator()(
int i,
int j) {
return true; }
12template <
typename Hash = Morton<u
int32_t>>
40 template <
typename Pred = DefaultPredication>
46 m_impl.detect(spheres,
false, collisionPairs, std::forward<Pred>(pred));
91 template <
typename Pred = DefaultPredication>
97 MUDA_KERNEL_ASSERT(level >= 0,
"invalid level");
99 m_impl.detect(spheres,
true, collisionPairs, std::forward<Pred>(pred));
Definition buffer_view.h:24
A std::vector like wrapper of cuda device memory, allows user to:
Definition device_buffer.h:46
RAII wrapper for cudaStream.
Definition stream.h:18
Definition sparse_spatial_hash.h:7
Definition sparse_spatial_hash.h:14
void detect(CBufferView< BoundingSphere > spheres, DeviceBuffer< CollisionPair > &collisionPairs, Pred &&pred={})
Detect collision pairs from bounding spheres. Note that:
Definition sparse_spatial_hash.h:41
void detect(int level, CBufferView< BoundingSphere > spheres, DeviceBuffer< CollisionPair > &collisionPairs, Pred &&pred={})
Detect collision pairs from bounding spheres at a specific level (level >= 0). This is used for hiera...
Definition sparse_spatial_hash.h:92
Definition sparse_spatial_hash_impl.h:169