mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:24:00 +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() {
|
||||
bool success;
|
||||
glm::vec3 currentPosition = getPosition(success);
|
||||
if (success) {
|
||||
AACube currentQueryAACube = getQueryAACube(success);
|
||||
if (success) {
|
||||
if (! currentQueryAACube.contains(currentPosition)) {
|
||||
_queryAACubeSet = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
forEachChild([&](SpatiallyNestablePointer object) {
|
||||
object->locationChanged();
|
||||
});
|
||||
|
@ -549,7 +538,9 @@ void SpatiallyNestable::locationChanged() {
|
|||
|
||||
void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) {
|
||||
_queryAACube = queryAACube;
|
||||
_queryAACubeSet = true;
|
||||
if (queryAACube.getScale() > 0.0f) {
|
||||
_queryAACubeSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
AACube SpatiallyNestable::getMaximumAACube(bool& success) const {
|
||||
|
|
Loading…
Reference in a new issue