mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:37:58 +02:00
fix method names for CR feedback
This commit is contained in:
parent
ca3cf6d517
commit
29bbeadbc7
11 changed files with 31 additions and 32 deletions
|
@ -29,7 +29,7 @@ AddEntityOperator::AddEntityOperator(EntityTree* tree,
|
||||||
_newEntityBox = _newEntity->getAACube().clamp(0.0f, 1.0f);
|
_newEntityBox = _newEntity->getAACube().clamp(0.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AddEntityOperator::PreRecursion(OctreeElement* element) {
|
bool AddEntityOperator::preRecursion(OctreeElement* element) {
|
||||||
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
||||||
|
|
||||||
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
||||||
|
@ -59,7 +59,7 @@ bool AddEntityOperator::PreRecursion(OctreeElement* element) {
|
||||||
return keepSearching; // if we haven't yet found it, keep looking
|
return keepSearching; // if we haven't yet found it, keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AddEntityOperator::PostRecursion(OctreeElement* element) {
|
bool AddEntityOperator::postRecursion(OctreeElement* element) {
|
||||||
// Post-recursion is the unwinding process. For this operation, while we
|
// Post-recursion is the unwinding process. For this operation, while we
|
||||||
// unwind we want to mark the path as being dirty if we changed it below.
|
// unwind we want to mark the path as being dirty if we changed it below.
|
||||||
// We might have two paths, one for the old entity and one for the new entity.
|
// We might have two paths, one for the old entity and one for the new entity.
|
||||||
|
@ -73,7 +73,7 @@ bool AddEntityOperator::PostRecursion(OctreeElement* element) {
|
||||||
return keepSearching; // if we haven't yet found it, keep looking
|
return keepSearching; // if we haven't yet found it, keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
OctreeElement* AddEntityOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) {
|
OctreeElement* AddEntityOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) {
|
||||||
// If we're getting called, it's because there was no child element at this index while recursing.
|
// If we're getting called, it's because there was no child element at this index while recursing.
|
||||||
// We only care if this happens while still searching for the new entity location.
|
// We only care if this happens while still searching for the new entity location.
|
||||||
// Check to see if
|
// Check to see if
|
||||||
|
|
|
@ -16,9 +16,9 @@ class AddEntityOperator : public RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
AddEntityOperator(EntityTree* tree, EntityItem* newEntity);
|
AddEntityOperator(EntityTree* tree, EntityItem* newEntity);
|
||||||
|
|
||||||
virtual bool PreRecursion(OctreeElement* element);
|
virtual bool preRecursion(OctreeElement* element);
|
||||||
virtual bool PostRecursion(OctreeElement* element);
|
virtual bool postRecursion(OctreeElement* element);
|
||||||
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);
|
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
|
||||||
private:
|
private:
|
||||||
EntityTree* _tree;
|
EntityTree* _tree;
|
||||||
EntityItem* _newEntity;
|
EntityItem* _newEntity;
|
||||||
|
|
|
@ -74,7 +74,7 @@ bool DeleteEntityOperator::subTreeContainsSomeEntitiesToDelete(OctreeElement* el
|
||||||
return containsEntity;
|
return containsEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DeleteEntityOperator::PreRecursion(OctreeElement* element) {
|
bool DeleteEntityOperator::preRecursion(OctreeElement* element) {
|
||||||
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
||||||
|
|
||||||
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
||||||
|
@ -114,7 +114,7 @@ bool DeleteEntityOperator::PreRecursion(OctreeElement* element) {
|
||||||
return keepSearching; // if we haven't yet found it, keep looking
|
return keepSearching; // if we haven't yet found it, keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DeleteEntityOperator::PostRecursion(OctreeElement* element) {
|
bool DeleteEntityOperator::postRecursion(OctreeElement* element) {
|
||||||
// Post-recursion is the unwinding process. For this operation, while we
|
// Post-recursion is the unwinding process. For this operation, while we
|
||||||
// unwind we want to mark the path as being dirty if we changed it below.
|
// unwind we want to mark the path as being dirty if we changed it below.
|
||||||
// We might have two paths, one for the old entity and one for the new entity.
|
// We might have two paths, one for the old entity and one for the new entity.
|
||||||
|
|
|
@ -34,8 +34,8 @@ public:
|
||||||
~DeleteEntityOperator();
|
~DeleteEntityOperator();
|
||||||
|
|
||||||
void addEntityIDToDeleteList(const EntityItemID& searchEntityID);
|
void addEntityIDToDeleteList(const EntityItemID& searchEntityID);
|
||||||
virtual bool PreRecursion(OctreeElement* element);
|
virtual bool preRecursion(OctreeElement* element);
|
||||||
virtual bool PostRecursion(OctreeElement* element);
|
virtual bool postRecursion(OctreeElement* element);
|
||||||
private:
|
private:
|
||||||
EntityTree* _tree;
|
EntityTree* _tree;
|
||||||
QSet<EntityToDeleteDetails> _entitiesToDelete;
|
QSet<EntityToDeleteDetails> _entitiesToDelete;
|
||||||
|
|
|
@ -1008,12 +1008,11 @@ void EntityTree::debugDumpMap() {
|
||||||
|
|
||||||
class DebugOperator : public RecurseOctreeOperator {
|
class DebugOperator : public RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
virtual bool PreRecursion(OctreeElement* element);
|
virtual bool preRecursion(OctreeElement* element);
|
||||||
virtual bool PostRecursion(OctreeElement* element) { return true; };
|
virtual bool postRecursion(OctreeElement* element) { return true; }
|
||||||
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DebugOperator::PreRecursion(OctreeElement* element) {
|
bool DebugOperator::preRecursion(OctreeElement* element) {
|
||||||
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
||||||
qDebug() << "EntityTreeElement [" << entityTreeElement << "]";
|
qDebug() << "EntityTreeElement [" << entityTreeElement << "]";
|
||||||
entityTreeElement->debugDump();
|
entityTreeElement->debugDump();
|
||||||
|
|
|
@ -67,7 +67,7 @@ bool MovingEntitiesOperator::shouldRecurseSubTree(OctreeElement* element) {
|
||||||
return containsEntity;
|
return containsEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MovingEntitiesOperator::PreRecursion(OctreeElement* element) {
|
bool MovingEntitiesOperator::preRecursion(OctreeElement* element) {
|
||||||
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
||||||
|
|
||||||
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
||||||
|
@ -111,7 +111,7 @@ bool MovingEntitiesOperator::PreRecursion(OctreeElement* element) {
|
||||||
return keepSearching; // if we haven't yet found it, keep looking
|
return keepSearching; // if we haven't yet found it, keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MovingEntitiesOperator::PostRecursion(OctreeElement* element) {
|
bool MovingEntitiesOperator::postRecursion(OctreeElement* element) {
|
||||||
// Post-recursion is the unwinding process. For this operation, while we
|
// Post-recursion is the unwinding process. For this operation, while we
|
||||||
// unwind we want to mark the path as being dirty if we changed it below.
|
// unwind we want to mark the path as being dirty if we changed it below.
|
||||||
// We might have two paths, one for the old entity and one for the new entity.
|
// We might have two paths, one for the old entity and one for the new entity.
|
||||||
|
@ -129,7 +129,7 @@ bool MovingEntitiesOperator::PostRecursion(OctreeElement* element) {
|
||||||
return keepSearching; // if we haven't yet found it, keep looking
|
return keepSearching; // if we haven't yet found it, keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
OctreeElement* MovingEntitiesOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) {
|
OctreeElement* MovingEntitiesOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) {
|
||||||
// If we're getting called, it's because there was no child element at this index while recursing.
|
// If we're getting called, it's because there was no child element at this index while recursing.
|
||||||
// We only care if this happens while still searching for the new entity locations.
|
// We only care if this happens while still searching for the new entity locations.
|
||||||
if (_foundNewCount < _lookingCount) {
|
if (_foundNewCount < _lookingCount) {
|
||||||
|
|
|
@ -37,9 +37,9 @@ public:
|
||||||
~MovingEntitiesOperator();
|
~MovingEntitiesOperator();
|
||||||
|
|
||||||
void addEntityToMoveList(EntityItem* entity, const AACube& oldCube, const AACube& newCube);
|
void addEntityToMoveList(EntityItem* entity, const AACube& oldCube, const AACube& newCube);
|
||||||
virtual bool PreRecursion(OctreeElement* element);
|
virtual bool preRecursion(OctreeElement* element);
|
||||||
virtual bool PostRecursion(OctreeElement* element);
|
virtual bool postRecursion(OctreeElement* element);
|
||||||
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);
|
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
|
||||||
bool hasMovingEntities() const { return _entitiesToMove.size() > 0; }
|
bool hasMovingEntities() const { return _entitiesToMove.size() > 0; }
|
||||||
private:
|
private:
|
||||||
EntityTree* _tree;
|
EntityTree* _tree;
|
||||||
|
|
|
@ -121,7 +121,7 @@ bool UpdateEntityOperator::subTreeContainsNewEntity(OctreeElement* element) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool UpdateEntityOperator::PreRecursion(OctreeElement* element) {
|
bool UpdateEntityOperator::preRecursion(OctreeElement* element) {
|
||||||
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
|
||||||
|
|
||||||
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
// In Pre-recursion, we're generally deciding whether or not we want to recurse this
|
||||||
|
@ -194,7 +194,7 @@ bool UpdateEntityOperator::PreRecursion(OctreeElement* element) {
|
||||||
return keepSearching; // if we haven't yet found it, keep looking
|
return keepSearching; // if we haven't yet found it, keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UpdateEntityOperator::PostRecursion(OctreeElement* element) {
|
bool UpdateEntityOperator::postRecursion(OctreeElement* element) {
|
||||||
// Post-recursion is the unwinding process. For this operation, while we
|
// Post-recursion is the unwinding process. For this operation, while we
|
||||||
// unwind we want to mark the path as being dirty if we changed it below.
|
// unwind we want to mark the path as being dirty if we changed it below.
|
||||||
// We might have two paths, one for the old entity and one for the new entity.
|
// We might have two paths, one for the old entity and one for the new entity.
|
||||||
|
@ -226,7 +226,7 @@ bool UpdateEntityOperator::PostRecursion(OctreeElement* element) {
|
||||||
return keepSearching; // if we haven't yet found it, keep looking
|
return keepSearching; // if we haven't yet found it, keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
OctreeElement* UpdateEntityOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) {
|
OctreeElement* UpdateEntityOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) {
|
||||||
// If we're getting called, it's because there was no child element at this index while recursing.
|
// If we're getting called, it's because there was no child element at this index while recursing.
|
||||||
// We only care if this happens while still searching for the new entity location.
|
// We only care if this happens while still searching for the new entity location.
|
||||||
// Check to see if
|
// Check to see if
|
||||||
|
|
|
@ -18,9 +18,9 @@ public:
|
||||||
EntityItem* existingEntity, const EntityItemProperties& properties);
|
EntityItem* existingEntity, const EntityItemProperties& properties);
|
||||||
~UpdateEntityOperator();
|
~UpdateEntityOperator();
|
||||||
|
|
||||||
virtual bool PreRecursion(OctreeElement* element);
|
virtual bool preRecursion(OctreeElement* element);
|
||||||
virtual bool PostRecursion(OctreeElement* element);
|
virtual bool postRecursion(OctreeElement* element);
|
||||||
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);
|
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
|
||||||
private:
|
private:
|
||||||
EntityTree* _tree;
|
EntityTree* _tree;
|
||||||
EntityItem* _existingEntity;
|
EntityItem* _existingEntity;
|
||||||
|
|
|
@ -155,14 +155,14 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (operatorObject->PreRecursion(element)) {
|
if (operatorObject->preRecursion(element)) {
|
||||||
for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
|
for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
|
||||||
OctreeElement* child = element->getChildAtIndex(i);
|
OctreeElement* child = element->getChildAtIndex(i);
|
||||||
|
|
||||||
// If there is no child at that location, the Operator may want to create a child at that location.
|
// If there is no child at that location, the Operator may want to create a child at that location.
|
||||||
// So give the operator a chance to do so....
|
// So give the operator a chance to do so....
|
||||||
if (!child) {
|
if (!child) {
|
||||||
child = operatorObject->PossiblyCreateChildAt(element, i);
|
child = operatorObject->possiblyCreateChildAt(element, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (child) {
|
if (child) {
|
||||||
|
@ -173,7 +173,7 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return operatorObject->PostRecursion(element);
|
return operatorObject->postRecursion(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,9 @@ class Shape;
|
||||||
/// derive from this class to use the Octree::recurseTreeWithOperator() method
|
/// derive from this class to use the Octree::recurseTreeWithOperator() method
|
||||||
class RecurseOctreeOperator {
|
class RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
virtual bool PreRecursion(OctreeElement* element) = 0;
|
virtual bool preRecursion(OctreeElement* element) = 0;
|
||||||
virtual bool PostRecursion(OctreeElement* element) = 0;
|
virtual bool postRecursion(OctreeElement* element) = 0;
|
||||||
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
|
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Callback function, for recuseTreeWithOperation
|
// Callback function, for recuseTreeWithOperation
|
||||||
|
|
Loading…
Reference in a new issue