mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 13:35:06 +02:00
cleanups
This commit is contained in:
parent
76df582a6c
commit
c84fa5f821
3 changed files with 4 additions and 4 deletions
|
@ -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 we've moved an entity with children, check/update the queryAACube of all descendents and tell the server
|
||||||
// if they've changed.
|
// if they've changed.
|
||||||
// TODO -- ancestors of this entity may also need to expand their queryAACubes.
|
|
||||||
entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
|
entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
|
||||||
if (descendant->getNestableType() == NestableType::Entity) {
|
if (descendant->getNestableType() == NestableType::Entity) {
|
||||||
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);
|
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);
|
||||||
|
|
|
@ -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 we've moved an entity with children, check/update the queryAACube of all descendents and tell the server
|
||||||
// if they've changed.
|
// if they've changed.
|
||||||
// TODO -- ancestors of this entity may also need to expand their queryAACubes.
|
|
||||||
_entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
|
_entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
|
||||||
if (descendant->getNestableType() == NestableType::Entity) {
|
if (descendant->getNestableType() == NestableType::Entity) {
|
||||||
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);
|
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include "DependencyManager.h"
|
#include "DependencyManager.h"
|
||||||
#include "SpatiallyNestable.h"
|
#include "SpatiallyNestable.h"
|
||||||
|
|
||||||
|
const float defaultAACubeSize = 1.0f;
|
||||||
|
|
||||||
SpatiallyNestable::SpatiallyNestable(NestableType nestableType, QUuid id) :
|
SpatiallyNestable::SpatiallyNestable(NestableType nestableType, QUuid id) :
|
||||||
_nestableType(nestableType),
|
_nestableType(nestableType),
|
||||||
_id(id),
|
_id(id),
|
||||||
|
@ -539,7 +541,7 @@ void SpatiallyNestable::locationChanged() {
|
||||||
}
|
}
|
||||||
|
|
||||||
AACube SpatiallyNestable::getMaximumAACube(bool& success) const {
|
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) {
|
void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) {
|
||||||
|
@ -607,7 +609,7 @@ AACube SpatiallyNestable::getQueryAACube(bool& success) const {
|
||||||
return _queryAACube;
|
return _queryAACube;
|
||||||
}
|
}
|
||||||
success = false;
|
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 {
|
AACube SpatiallyNestable::getQueryAACube() const {
|
||||||
|
|
Loading…
Reference in a new issue