less magic

This commit is contained in:
Andrew Meadows 2017-07-20 08:18:19 -07:00
parent 9ca3ec4313
commit 4f1489f8b4

View file

@ -999,7 +999,9 @@ bool SpatiallyNestable::computePuffedQueryAACube() {
bool success;
AACube currentAACube = getMaximumAACube(success);
// make an AACube with edges thrice as long and centered on the object
_queryAACube = AACube(currentAACube.getCorner() - glm::vec3(currentAACube.getScale()), currentAACube.getScale() * 3.0f);
const float PUFF_COEFICIENT = _children.size() > 0 ? 3.0f : 1.0f;
float scale = currentAACube.getScale();
_queryAACube = AACube(currentAACube.getCorner() - glm::vec3(scale), scale * PUFF_COEFICIENT);
_queryAACubeSet = true;
getThisPointer()->forEachDescendant([&](SpatiallyNestablePointer descendant) {