Collision Detection
Collision Detection
Collision Detection
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Spatial Hashing Motivation: large grids are usually very sparse –we need to store data only for non-empty cells –but we need fast O(1) access based on (x,y,z) Given point p=(x,y,z) laying within cell c=(i,j,k) wedefine spatial hashing function as hash(i,j,k) = (ip 1xor jp 2xor jp 3) mod n Where p 1, p 2, p 3are large prime numbers and n isthe size of hash table Hash collision are solved with buckets