38 #ifndef HPP_FCL_BROADPHASE_SPATIALHASH_INL_H
39 #define HPP_FCL_BROADPHASE_SPATIALHASH_INL_H
50 : cell_size(cell_size_), scene_limit(scene_limit_) {
52 static_cast<unsigned int>(std::ceil(scene_limit.width() / cell_size));
54 static_cast<unsigned int>(std::ceil(scene_limit.height() / cell_size));
56 static_cast<unsigned int>(std::ceil(scene_limit.depth() / cell_size));
61 unsigned int min_x =
static_cast<unsigned int>(
63 unsigned int max_x =
static_cast<unsigned int>(
65 unsigned int min_y =
static_cast<unsigned int>(
67 unsigned int max_y =
static_cast<unsigned int>(
69 unsigned int min_z =
static_cast<unsigned int>(
71 unsigned int max_z =
static_cast<unsigned int>(
74 std::vector<unsigned int> keys(
75 static_cast<size_t>((max_x - min_x) * (max_y - min_y) * (max_z - min_z)));
77 for (
unsigned int x = min_x;
x < max_x; ++
x) {
78 for (
unsigned int y = min_y;
y < max_y; ++
y) {
79 for (
unsigned int z = min_z; z < max_z; ++z) {