11 # if defined(__GNUC__) && (__GNUC__ >= 3)
14 # include <hash_map.h>
28 #define _MUL 950706376UL
29 #define _MOD 2147483647UL
32 size_t res = ((
unsigned long)(p[0] *
_MUL)) %
_MOD;
33 res = ((res + (
unsigned long)(p[1]) *
_MUL)) %
_MOD;
34 return ((res + (
unsigned long)(p[2]) *
_MUL)) %
_MOD;
74 GridHashTable::const_iterator found =
_cells.find(p);
75 if (found !=
_cells.end()) {
76 found_cell = (*found).second;
Base class to define a cell grid surrounding the bounding box of the scene.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
map< Vec3u, Cell * > GridHashTable
virtual void fillCell(const Vec3u &p, Cell &cell)
virtual Cell * getCell(const Vec3u &p)
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb)
size_t operator()(const Vec3u &p) const