From c84fa5f82133b28b849c238eb8d95f9813711ffd Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Mon, 21 Dec 2015 14:45:18 -0800 Subject: [PATCH] cleanups --- libraries/entities/src/EntityScriptingInterface.cpp | 1 - libraries/physics/src/EntityMotionState.cpp | 1 - libraries/shared/src/SpatiallyNestable.cpp | 6 ++++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp index 56dc13a126..0581f380aa 100644 --- a/libraries/entities/src/EntityScriptingInterface.cpp +++ b/libraries/entities/src/EntityScriptingInterface.cpp @@ -281,7 +281,6 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& // if we've moved an entity with children, check/update the queryAACube of all descendents and tell the server // if they've changed. - // TODO -- ancestors of this entity may also need to expand their queryAACubes. entity->forEachDescendant([&](SpatiallyNestablePointer descendant) { if (descendant->getNestableType() == NestableType::Entity) { EntityItemPointer entityDescendant = std::static_pointer_cast(descendant); diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index 4dd61608cc..430db2b2aa 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -513,7 +513,6 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q // if we've moved an entity with children, check/update the queryAACube of all descendents and tell the server // if they've changed. - // TODO -- ancestors of this entity may also need to expand their queryAACubes. _entity->forEachDescendant([&](SpatiallyNestablePointer descendant) { if (descendant->getNestableType() == NestableType::Entity) { EntityItemPointer entityDescendant = std::static_pointer_cast(descendant); diff --git a/libraries/shared/src/SpatiallyNestable.cpp b/libraries/shared/src/SpatiallyNestable.cpp index 416b6646c2..288bda5dfa 100644 --- a/libraries/shared/src/SpatiallyNestable.cpp +++ b/libraries/shared/src/SpatiallyNestable.cpp @@ -14,6 +14,8 @@ #include "DependencyManager.h" #include "SpatiallyNestable.h" +const float defaultAACubeSize = 1.0f; + SpatiallyNestable::SpatiallyNestable(NestableType nestableType, QUuid id) : _nestableType(nestableType), _id(id), @@ -539,7 +541,7 @@ void SpatiallyNestable::locationChanged() { } AACube SpatiallyNestable::getMaximumAACube(bool& success) const { - return AACube(getPosition(success) - glm::vec3(0.5f), 1.0f); // XXX + return AACube(getPosition(success) - glm::vec3(defaultAACubeSize / 2.0f), defaultAACubeSize); } void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) { @@ -607,7 +609,7 @@ AACube SpatiallyNestable::getQueryAACube(bool& success) const { return _queryAACube; } success = false; - return AACube(getPosition(success) - glm::vec3(0.5f), 1.0f); // XXX + return AACube(getPosition(success) - glm::vec3(defaultAACubeSize / 2.0f), defaultAACubeSize); } AACube SpatiallyNestable::getQueryAACube() const {