mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 06:19:02 +02:00
a non-set queryAACube is one with no volume
This commit is contained in:
parent
473212e5b7
commit
2dd2a49141
1 changed files with 3 additions and 12 deletions
|
@ -531,17 +531,6 @@ void SpatiallyNestable::forEachDescendant(std::function<void(SpatiallyNestablePo
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpatiallyNestable::locationChanged() {
|
void SpatiallyNestable::locationChanged() {
|
||||||
bool success;
|
|
||||||
glm::vec3 currentPosition = getPosition(success);
|
|
||||||
if (success) {
|
|
||||||
AACube currentQueryAACube = getQueryAACube(success);
|
|
||||||
if (success) {
|
|
||||||
if (! currentQueryAACube.contains(currentPosition)) {
|
|
||||||
_queryAACubeSet = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forEachChild([&](SpatiallyNestablePointer object) {
|
forEachChild([&](SpatiallyNestablePointer object) {
|
||||||
object->locationChanged();
|
object->locationChanged();
|
||||||
});
|
});
|
||||||
|
@ -549,7 +538,9 @@ void SpatiallyNestable::locationChanged() {
|
||||||
|
|
||||||
void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) {
|
void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) {
|
||||||
_queryAACube = queryAACube;
|
_queryAACube = queryAACube;
|
||||||
_queryAACubeSet = true;
|
if (queryAACube.getScale() > 0.0f) {
|
||||||
|
_queryAACubeSet = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AACube SpatiallyNestable::getMaximumAACube(bool& success) const {
|
AACube SpatiallyNestable::getMaximumAACube(bool& success) const {
|
||||||
|
|
Loading…
Reference in a new issue