fix method names for CR feedback

This commit is contained in:
ZappoMan 2014-09-03 12:44:57 -07:00
parent ca3cf6d517
commit 29bbeadbc7
11 changed files with 31 additions and 32 deletions

View file

@ -29,7 +29,7 @@ AddEntityOperator::AddEntityOperator(EntityTree* tree,
_newEntityBox = _newEntity->getAACube().clamp(0.0f, 1.0f);
}
bool AddEntityOperator::PreRecursion(OctreeElement* element) {
bool AddEntityOperator::preRecursion(OctreeElement* element) {
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
// 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
}
bool AddEntityOperator::PostRecursion(OctreeElement* element) {
bool AddEntityOperator::postRecursion(OctreeElement* element) {
// 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.
// 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
}
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.
// We only care if this happens while still searching for the new entity location.
// Check to see if

View file

@ -16,9 +16,9 @@ class AddEntityOperator : public RecurseOctreeOperator {
public:
AddEntityOperator(EntityTree* tree, EntityItem* newEntity);
virtual bool PreRecursion(OctreeElement* element);
virtual bool PostRecursion(OctreeElement* element);
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);
virtual bool preRecursion(OctreeElement* element);
virtual bool postRecursion(OctreeElement* element);
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
private:
EntityTree* _tree;
EntityItem* _newEntity;

View file

@ -74,7 +74,7 @@ bool DeleteEntityOperator::subTreeContainsSomeEntitiesToDelete(OctreeElement* el
return containsEntity;
}
bool DeleteEntityOperator::PreRecursion(OctreeElement* element) {
bool DeleteEntityOperator::preRecursion(OctreeElement* element) {
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
// 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
}
bool DeleteEntityOperator::PostRecursion(OctreeElement* element) {
bool DeleteEntityOperator::postRecursion(OctreeElement* element) {
// 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.
// We might have two paths, one for the old entity and one for the new entity.

View file

@ -34,8 +34,8 @@ public:
~DeleteEntityOperator();
void addEntityIDToDeleteList(const EntityItemID& searchEntityID);
virtual bool PreRecursion(OctreeElement* element);
virtual bool PostRecursion(OctreeElement* element);
virtual bool preRecursion(OctreeElement* element);
virtual bool postRecursion(OctreeElement* element);
private:
EntityTree* _tree;
QSet<EntityToDeleteDetails> _entitiesToDelete;

View file

@ -1008,12 +1008,11 @@ void EntityTree::debugDumpMap() {
class DebugOperator : public RecurseOctreeOperator {
public:
virtual bool PreRecursion(OctreeElement* element);
virtual bool PostRecursion(OctreeElement* element) { return true; };
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
virtual bool preRecursion(OctreeElement* element);
virtual bool postRecursion(OctreeElement* element) { return true; }
};
bool DebugOperator::PreRecursion(OctreeElement* element) {
bool DebugOperator::preRecursion(OctreeElement* element) {
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
qDebug() << "EntityTreeElement [" << entityTreeElement << "]";
entityTreeElement->debugDump();

View file

@ -67,7 +67,7 @@ bool MovingEntitiesOperator::shouldRecurseSubTree(OctreeElement* element) {
return containsEntity;
}
bool MovingEntitiesOperator::PreRecursion(OctreeElement* element) {
bool MovingEntitiesOperator::preRecursion(OctreeElement* element) {
EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element);
// 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
}
bool MovingEntitiesOperator::PostRecursion(OctreeElement* element) {
bool MovingEntitiesOperator::postRecursion(OctreeElement* element) {
// 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.
// 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
}
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.
// We only care if this happens while still searching for the new entity locations.
if (_foundNewCount < _lookingCount) {

View file

@ -37,9 +37,9 @@ public:
~MovingEntitiesOperator();
void addEntityToMoveList(EntityItem* entity, const AACube& oldCube, const AACube& newCube);
virtual bool PreRecursion(OctreeElement* element);
virtual bool PostRecursion(OctreeElement* element);
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);
virtual bool preRecursion(OctreeElement* element);
virtual bool postRecursion(OctreeElement* element);
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
bool hasMovingEntities() const { return _entitiesToMove.size() > 0; }
private:
EntityTree* _tree;

View file

@ -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);
// 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
}
bool UpdateEntityOperator::PostRecursion(OctreeElement* element) {
bool UpdateEntityOperator::postRecursion(OctreeElement* element) {
// 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.
// 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
}
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.
// We only care if this happens while still searching for the new entity location.
// Check to see if

View file

@ -18,9 +18,9 @@ public:
EntityItem* existingEntity, const EntityItemProperties& properties);
~UpdateEntityOperator();
virtual bool PreRecursion(OctreeElement* element);
virtual bool PostRecursion(OctreeElement* element);
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex);
virtual bool preRecursion(OctreeElement* element);
virtual bool postRecursion(OctreeElement* element);
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex);
private:
EntityTree* _tree;
EntityItem* _existingEntity;

View file

@ -155,14 +155,14 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe
return false;
}
if (operatorObject->PreRecursion(element)) {
if (operatorObject->preRecursion(element)) {
for (int i = 0; i < NUMBER_OF_CHILDREN; 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.
// So give the operator a chance to do so....
if (!child) {
child = operatorObject->PossiblyCreateChildAt(element, i);
child = operatorObject->possiblyCreateChildAt(element, i);
}
if (child) {
@ -173,7 +173,7 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe
}
}
return operatorObject->PostRecursion(element);
return operatorObject->postRecursion(element);
}

View file

@ -39,9 +39,9 @@ class Shape;
/// derive from this class to use the Octree::recurseTreeWithOperator() method
class RecurseOctreeOperator {
public:
virtual bool PreRecursion(OctreeElement* element) = 0;
virtual bool PostRecursion(OctreeElement* element) = 0;
virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
virtual bool preRecursion(OctreeElement* element) = 0;
virtual bool postRecursion(OctreeElement* element) = 0;
virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; }
};
// Callback function, for recuseTreeWithOperation