Skip to content

Class muda::spatial_hash::details::SparseSpatialHashImpl

template <typename Hash>

ClassList > muda > spatial_hash > details > SparseSpatialHashImpl

Public Types

Type Name
typedef SpatialPartitionCell Cell
typedef int32_t I32
typedef uint32_t U32
typedef Eigen::Vector3f Vector3
typedef Eigen::Vector3< I32 > Vector3i
typedef Eigen::Vector3< U32 > Vector3u

Public Attributes

Type Name
DeviceBuffer< Vector3 > allCoords
DeviceBuffer< float > allRadius
DeviceBuffer< int > cellArrayKey
DeviceBuffer< int > cellArrayKeySorted
DeviceBuffer< SpatialPartitionCell > cellArrayValue
DeviceBuffer< SpatialPartitionCell > cellArrayValueSorted
DeviceVar< int > cellCount
DeviceBuffer< int > cellToCollisionPairUpperBound
DeviceBuffer< int > cellToCollisionPairUpperBoundPrefixSum
DeviceBuffer< CollisionPair > collisionPairBuffer
DeviceBuffer< int > collisionPairCount
DeviceBuffer< int > collisionPairPrefixSum
bool empty_level = = false
SpatialHashTableInfo< Hash > h_spatialHashConfig
int level = = 0
muda::Stream & m_stream
DeviceVar< float > maxRadius
DeviceVar< Vector3 > minCoord
DeviceBuffer< int > objCountInCell
DeviceBuffer< int > objCountInCellPrefixSum
DeviceVar< int > pairCount
size_t pairListOffset = = 0
DeviceBuffer< int > potentialCollisionPairIdToCellIndex
DeviceBuffer< int > potentialCollisionPairIdToCellIndexBuffer
DeviceVar< SpatialHashTableInfo< Hash > > spatialHashConfig
CBufferView< BoundingSphere > spheres
int sum
DeviceBuffer< int > uniqueKey
DeviceVar< int > uniqueKeyCount
int validCellCount
DeviceVar< int > validCollisionPairCount

Public Functions

Type Name
SparseSpatialHashImpl (muda::Stream & stream=muda::Stream::Default())
void alloc_collision_pair_list (DeviceBuffer< CollisionPair > & collisionPairs, int totalCollisionPairCount)
void balanced_setup_collision_pairs (bool append, DeviceBuffer< CollisionPair > & collisionPairs, Pred && pred)
void calculate_hash_table_basic_info ()
void count_object_per_cell ()
void detect (CBufferView< BoundingSphere > boundingSphereList, bool append, DeviceBuffer< CollisionPair > & collisionPairs, Pred && pred)
void fill_hash_cells ()
void setup_hash_table ()
void simple_count_collision_pairs (Pred && pred)
void simple_fill_collision_pair_list (DeviceBuffer< CollisionPair > & collisionPairs, Pred && pred)
void simple_setup_collision_pairs (Pred && pred, DeviceBuffer< CollisionPair > & collisionPairs)

Public Types Documentation

typedef Cell

using muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::Cell =  SpatialPartitionCell;

typedef I32

using muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::I32 =  int32_t;

typedef U32

using muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::U32 =  uint32_t;

typedef Vector3

using muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::Vector3 =  Eigen::Vector3f;

typedef Vector3i

using muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::Vector3i =  Eigen::Vector3<I32>;

typedef Vector3u

using muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::Vector3u =  Eigen::Vector3<U32>;

Public Attributes Documentation

variable allCoords

DeviceBuffer<Vector3> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::allCoords;

variable allRadius

DeviceBuffer<float> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::allRadius;

variable cellArrayKey

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::cellArrayKey;

variable cellArrayKeySorted

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::cellArrayKeySorted;

variable cellArrayValue

DeviceBuffer<SpatialPartitionCell> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::cellArrayValue;

variable cellArrayValueSorted

DeviceBuffer<SpatialPartitionCell> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::cellArrayValueSorted;

variable cellCount

DeviceVar<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::cellCount;

variable cellToCollisionPairUpperBound

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::cellToCollisionPairUpperBound;

variable cellToCollisionPairUpperBoundPrefixSum

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::cellToCollisionPairUpperBoundPrefixSum;

variable collisionPairBuffer

DeviceBuffer<CollisionPair> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::collisionPairBuffer;

variable collisionPairCount

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::collisionPairCount;

variable collisionPairPrefixSum

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::collisionPairPrefixSum;

variable empty_level

bool muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::empty_level;

variable h_spatialHashConfig

SpatialHashTableInfo<Hash> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::h_spatialHashConfig;

variable level

int muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::level;

variable m_stream

muda::Stream& muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::m_stream;

variable maxRadius

DeviceVar<float> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::maxRadius;

variable minCoord

DeviceVar<Vector3> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::minCoord;

variable objCountInCell

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::objCountInCell;

variable objCountInCellPrefixSum

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::objCountInCellPrefixSum;

variable pairCount

DeviceVar<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::pairCount;

variable pairListOffset

size_t muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::pairListOffset;

variable potentialCollisionPairIdToCellIndex

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::potentialCollisionPairIdToCellIndex;

variable potentialCollisionPairIdToCellIndexBuffer

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::potentialCollisionPairIdToCellIndexBuffer;

variable spatialHashConfig

DeviceVar<SpatialHashTableInfo<Hash> > muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::spatialHashConfig;

variable spheres

CBufferView<BoundingSphere> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::spheres;

variable sum

int muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::sum;

variable uniqueKey

DeviceBuffer<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::uniqueKey;

variable uniqueKeyCount

DeviceVar<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::uniqueKeyCount;

variable validCellCount

int muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::validCellCount;

variable validCollisionPairCount

DeviceVar<int> muda::spatial_hash::details::SparseSpatialHashImpl< Hash >::validCollisionPairCount;

Public Functions Documentation

function SparseSpatialHashImpl

inline muda::spatial_hash::details::SparseSpatialHashImpl::SparseSpatialHashImpl (
    muda::Stream & stream=muda::Stream::Default()
) 

function alloc_collision_pair_list

void muda::spatial_hash::details::SparseSpatialHashImpl::alloc_collision_pair_list (
    DeviceBuffer < CollisionPair > & collisionPairs,
    int totalCollisionPairCount
) 

function balanced_setup_collision_pairs

template<typename Pred>
void muda::spatial_hash::details::SparseSpatialHashImpl::balanced_setup_collision_pairs (
    bool append,
    DeviceBuffer < CollisionPair > & collisionPairs,
    Pred && pred
) 

function calculate_hash_table_basic_info

void muda::spatial_hash::details::SparseSpatialHashImpl::calculate_hash_table_basic_info () 

function count_object_per_cell

void muda::spatial_hash::details::SparseSpatialHashImpl::count_object_per_cell () 

function detect

template<typename Pred>
void muda::spatial_hash::details::SparseSpatialHashImpl::detect (
    CBufferView < BoundingSphere > boundingSphereList,
    bool append,
    DeviceBuffer < CollisionPair > & collisionPairs,
    Pred && pred
) 

function fill_hash_cells

void muda::spatial_hash::details::SparseSpatialHashImpl::fill_hash_cells () 

function setup_hash_table

void muda::spatial_hash::details::SparseSpatialHashImpl::setup_hash_table () 

function simple_count_collision_pairs

template<typename Pred>
void muda::spatial_hash::details::SparseSpatialHashImpl::simple_count_collision_pairs (
    Pred && pred
) 

function simple_fill_collision_pair_list

template<typename Pred>
void muda::spatial_hash::details::SparseSpatialHashImpl::simple_fill_collision_pair_list (
    DeviceBuffer < CollisionPair > & collisionPairs,
    Pred && pred
) 

function simple_setup_collision_pairs

template<typename Pred>
void muda::spatial_hash::details::SparseSpatialHashImpl::simple_setup_collision_pairs (
    Pred && pred,
    DeviceBuffer < CollisionPair > & collisionPairs
) 


The documentation for this class was generated from the following file src/muda/ext/geo/spatial_hash/sparse_spatial_hash_impl.h