Merge branch 'near-grab-via-parenting' of github.com:sethalves/hifi into near-grab-via-parenting

This commit is contained in:
Seth Alves 2015-12-18 16:28:34 -08:00
commit d7e08876da

View file

@ -556,6 +556,18 @@ bool SpatiallyNestable::queryAABoxNeedsUpdate() const {
qDebug() << "can't getMaximumAACube for" << getID();
return false;
}
// make sure children are still in their boxes, also.
bool childNeedsUpdate = false;
getThisPointer()->forEachDescendant([&](SpatiallyNestablePointer descendant) {
if (descendant->queryAABoxNeedsUpdate()) {
childNeedsUpdate = true;
}
});
if (childNeedsUpdate) {
return true;
}
if (_queryAACubeSet && _queryAACube.contains(currentAACube)) {
return false;
}