Skip to content
Snippets Groups Projects
Commit d276f08c authored by Studer Gabriel's avatar Studer Gabriel
Browse files

simplify index generation in DynamicSpatialOrganizer => speedups

thanks Gerardo for pointing that out
parent 724e899c
No related branches found
No related tags found
No related merge requests found
......@@ -286,9 +286,8 @@ private:
mutable WithinList result_buffer_;
Index gen_index(const geom::Vec3& pos) const {
Index nrvo(static_cast<int>(std::floor(pos[0]/delta_ + Real(0.5))),
static_cast<int>(std::floor(pos[1]/delta_ + Real(0.5))),
static_cast<int>(std::floor(pos[2]/delta_ + Real(0.5))));
Index nrvo(std::floor(pos[0]/delta_), std::floor(pos[1]/delta_),
std::floor(pos[2]/delta_));
return nrvo;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment