Unified · Split
| @@ -29,7 +29,7 @@ AddEntityOperator::AddEntityOperator(EntityTree* tree, · 28 unmodified lines | ||
| 29 | 29 | _newEntityBox = _newEntity->getAACube().clamp(0.0f, 1.0f); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | −bool AddEntityOperator::PreRecursion(OctreeElement* element) { | |
| 32 | +bool AddEntityOperator::preRecursion(OctreeElement* element) { | |
| 33 | 33 | EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element); |
| 34 | 34 | |
| 35 | 35 | // In Pre-recursion, we're generally deciding whether or not we want to recurse this |
| @@ -59,7 +59,7 @@ bool AddEntityOperator::PreRecursion(OctreeElement* element) { · 23 unmodified lines | ||
| 59 | 59 | return keepSearching; // if we haven't yet found it, keep looking |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | −bool AddEntityOperator::PostRecursion(OctreeElement* element) { | |
| 62 | +bool AddEntityOperator::postRecursion(OctreeElement* element) { | |
| 63 | 63 | // Post-recursion is the unwinding process. For this operation, while we |
| 64 | 64 | // unwind we want to mark the path as being dirty if we changed it below. |
| 65 | 65 | // 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) { · 7 unmodified lines | ||
| 73 | 73 | return keepSearching; // if we haven't yet found it, keep looking |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | −OctreeElement* AddEntityOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) { | |
| 76 | +OctreeElement* AddEntityOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) { | |
| 77 | 77 | // If we're getting called, it's because there was no child element at this index while recursing. |
| 78 | 78 | // We only care if this happens while still searching for the new entity location. |
| 79 | 79 | // Check to see if |
| @@ -16,9 +16,9 @@ class AddEntityOperator : public RecurseOctreeOperator { · 15 unmodified lines | ||
| 16 | 16 | public: |
| 17 | 17 | AddEntityOperator(EntityTree* tree, EntityItem* newEntity); |
| 18 | 18 | |
| 19 | − virtual bool PreRecursion(OctreeElement* element); | |
| 20 | − virtual bool PostRecursion(OctreeElement* element); | |
| 21 | − virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex); | |
| 19 | + virtual bool preRecursion(OctreeElement* element); | |
| 20 | + virtual bool postRecursion(OctreeElement* element); | |
| 21 | + virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex); | |
| 22 | 22 | private: |
| 23 | 23 | EntityTree* _tree; |
| 24 | 24 | EntityItem* _newEntity; |
| @@ -74,7 +74,7 @@ bool DeleteEntityOperator::subTreeContainsSomeEntitiesToDelete(OctreeElement* el · 73 unmodified lines | ||
| 74 | 74 | return containsEntity; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | −bool DeleteEntityOperator::PreRecursion(OctreeElement* element) { | |
| 77 | +bool DeleteEntityOperator::preRecursion(OctreeElement* element) { | |
| 78 | 78 | EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element); |
| 79 | 79 | |
| 80 | 80 | // In Pre-recursion, we're generally deciding whether or not we want to recurse this |
| @@ -114,7 +114,7 @@ bool DeleteEntityOperator::PreRecursion(OctreeElement* element) { · 33 unmodified lines | ||
| 114 | 114 | return keepSearching; // if we haven't yet found it, keep looking |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | −bool DeleteEntityOperator::PostRecursion(OctreeElement* element) { | |
| 117 | +bool DeleteEntityOperator::postRecursion(OctreeElement* element) { | |
| 118 | 118 | // Post-recursion is the unwinding process. For this operation, while we |
| 119 | 119 | // unwind we want to mark the path as being dirty if we changed it below. |
| 120 | 120 | // We might have two paths, one for the old entity and one for the new entity. |
| @@ -34,8 +34,8 @@ public: · 33 unmodified lines | ||
| 34 | 34 | ~DeleteEntityOperator(); |
| 35 | 35 | |
| 36 | 36 | void addEntityIDToDeleteList(const EntityItemID& searchEntityID); |
| 37 | − virtual bool PreRecursion(OctreeElement* element); | |
| 38 | − virtual bool PostRecursion(OctreeElement* element); | |
| 37 | + virtual bool preRecursion(OctreeElement* element); | |
| 38 | + virtual bool postRecursion(OctreeElement* element); | |
| 39 | 39 | private: |
| 40 | 40 | EntityTree* _tree; |
| 41 | 41 | QSet<EntityToDeleteDetails> _entitiesToDelete; |
| @@ -1008,12 +1008,11 @@ void EntityTree::debugDumpMap() { · 1007 unmodified lines | ||
| 1008 | 1008 | |
| 1009 | 1009 | class DebugOperator : public RecurseOctreeOperator { |
| 1010 | 1010 | public: |
| 1011 | − virtual bool PreRecursion(OctreeElement* element); | |
| 1012 | − virtual bool PostRecursion(OctreeElement* element) { return true; }; | |
| 1013 | − virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; } | |
| 1011 | + virtual bool preRecursion(OctreeElement* element); | |
| 1012 | + virtual bool postRecursion(OctreeElement* element) { return true; } | |
| 1014 | 1013 | }; |
| 1015 | 1014 | |
| 1016 | −bool DebugOperator::PreRecursion(OctreeElement* element) { | |
| 1015 | +bool DebugOperator::preRecursion(OctreeElement* element) { | |
| 1017 | 1016 | EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element); |
| 1018 | 1017 | qDebug() << "EntityTreeElement [" << entityTreeElement << "]"; |
| 1019 | 1018 | entityTreeElement->debugDump(); |
| @@ -67,7 +67,7 @@ bool MovingEntitiesOperator::shouldRecurseSubTree(OctreeElement* element) { · 66 unmodified lines | ||
| 67 | 67 | return containsEntity; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | −bool MovingEntitiesOperator::PreRecursion(OctreeElement* element) { | |
| 70 | +bool MovingEntitiesOperator::preRecursion(OctreeElement* element) { | |
| 71 | 71 | EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element); |
| 72 | 72 | |
| 73 | 73 | // In Pre-recursion, we're generally deciding whether or not we want to recurse this |
| @@ -111,7 +111,7 @@ bool MovingEntitiesOperator::PreRecursion(OctreeElement* element) { · 37 unmodified lines | ||
| 111 | 111 | return keepSearching; // if we haven't yet found it, keep looking |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | −bool MovingEntitiesOperator::PostRecursion(OctreeElement* element) { | |
| 114 | +bool MovingEntitiesOperator::postRecursion(OctreeElement* element) { | |
| 115 | 115 | // Post-recursion is the unwinding process. For this operation, while we |
| 116 | 116 | // unwind we want to mark the path as being dirty if we changed it below. |
| 117 | 117 | // 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) { · 11 unmodified lines | ||
| 129 | 129 | return keepSearching; // if we haven't yet found it, keep looking |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | −OctreeElement* MovingEntitiesOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) { | |
| 132 | +OctreeElement* MovingEntitiesOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) { | |
| 133 | 133 | // If we're getting called, it's because there was no child element at this index while recursing. |
| 134 | 134 | // We only care if this happens while still searching for the new entity locations. |
| 135 | 135 | if (_foundNewCount < _lookingCount) { |
| @@ -37,9 +37,9 @@ public: · 36 unmodified lines | ||
| 37 | 37 | ~MovingEntitiesOperator(); |
| 38 | 38 | |
| 39 | 39 | void addEntityToMoveList(EntityItem* entity, const AACube& oldCube, const AACube& newCube); |
| 40 | − virtual bool PreRecursion(OctreeElement* element); | |
| 41 | − virtual bool PostRecursion(OctreeElement* element); | |
| 42 | − virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex); | |
| 40 | + virtual bool preRecursion(OctreeElement* element); | |
| 41 | + virtual bool postRecursion(OctreeElement* element); | |
| 42 | + virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex); | |
| 43 | 43 | bool hasMovingEntities() const { return _entitiesToMove.size() > 0; } |
| 44 | 44 | private: |
| 45 | 45 | EntityTree* _tree; |
| @@ -121,7 +121,7 @@ bool UpdateEntityOperator::subTreeContainsNewEntity(OctreeElement* element) { · 120 unmodified lines | ||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | |
| 124 | −bool UpdateEntityOperator::PreRecursion(OctreeElement* element) { | |
| 124 | +bool UpdateEntityOperator::preRecursion(OctreeElement* element) { | |
| 125 | 125 | EntityTreeElement* entityTreeElement = static_cast<EntityTreeElement*>(element); |
| 126 | 126 | |
| 127 | 127 | // In Pre-recursion, we're generally deciding whether or not we want to recurse this |
| @@ -194,7 +194,7 @@ bool UpdateEntityOperator::PreRecursion(OctreeElement* element) { · 66 unmodified lines | ||
| 194 | 194 | return keepSearching; // if we haven't yet found it, keep looking |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | −bool UpdateEntityOperator::PostRecursion(OctreeElement* element) { | |
| 197 | +bool UpdateEntityOperator::postRecursion(OctreeElement* element) { | |
| 198 | 198 | // Post-recursion is the unwinding process. For this operation, while we |
| 199 | 199 | // unwind we want to mark the path as being dirty if we changed it below. |
| 200 | 200 | // 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) { · 25 unmodified lines | ||
| 226 | 226 | return keepSearching; // if we haven't yet found it, keep looking |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | −OctreeElement* UpdateEntityOperator::PossiblyCreateChildAt(OctreeElement* element, int childIndex) { | |
| 229 | +OctreeElement* UpdateEntityOperator::possiblyCreateChildAt(OctreeElement* element, int childIndex) { | |
| 230 | 230 | // If we're getting called, it's because there was no child element at this index while recursing. |
| 231 | 231 | // We only care if this happens while still searching for the new entity location. |
| 232 | 232 | // Check to see if |
| @@ -18,9 +18,9 @@ public: · 17 unmodified lines | ||
| 18 | 18 | EntityItem* existingEntity, const EntityItemProperties& properties); |
| 19 | 19 | ~UpdateEntityOperator(); |
| 20 | 20 | |
| 21 | − virtual bool PreRecursion(OctreeElement* element); | |
| 22 | − virtual bool PostRecursion(OctreeElement* element); | |
| 23 | − virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex); | |
| 21 | + virtual bool preRecursion(OctreeElement* element); | |
| 22 | + virtual bool postRecursion(OctreeElement* element); | |
| 23 | + virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex); | |
| 24 | 24 | private: |
| 25 | 25 | EntityTree* _tree; |
| 26 | 26 | EntityItem* _existingEntity; |
| @@ -155,14 +155,14 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe · 154 unmodified lines | ||
| 155 | 155 | return false; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | − if (operatorObject->PreRecursion(element)) { | |
| 158 | + if (operatorObject->preRecursion(element)) { | |
| 159 | 159 | for (int i = 0; i < NUMBER_OF_CHILDREN; i++) { |
| 160 | 160 | OctreeElement* child = element->getChildAtIndex(i); |
| 161 | 161 | |
| 162 | 162 | // If there is no child at that location, the Operator may want to create a child at that location. |
| 163 | 163 | // So give the operator a chance to do so.... |
| 164 | 164 | if (!child) { |
| 165 | − child = operatorObject->PossiblyCreateChildAt(element, i); | |
| 165 | + child = operatorObject->possiblyCreateChildAt(element, i); | |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | if (child) { |
| @@ -173,7 +173,7 @@ bool Octree::recurseElementWithOperator(OctreeElement* element, RecurseOctreeOpe · 4 unmodified lines | ||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | − return operatorObject->PostRecursion(element); | |
| 176 | + return operatorObject->postRecursion(element); | |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | |
| @@ -39,9 +39,9 @@ class Shape; · 38 unmodified lines | ||
| 39 | 39 | /// derive from this class to use the Octree::recurseTreeWithOperator() method |
| 40 | 40 | class RecurseOctreeOperator { |
| 41 | 41 | public: |
| 42 | − virtual bool PreRecursion(OctreeElement* element) = 0; | |
| 43 | − virtual bool PostRecursion(OctreeElement* element) = 0; | |
| 44 | − virtual OctreeElement* PossiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; } | |
| 42 | + virtual bool preRecursion(OctreeElement* element) = 0; | |
| 43 | + virtual bool postRecursion(OctreeElement* element) = 0; | |
| 44 | + virtual OctreeElement* possiblyCreateChildAt(OctreeElement* element, int childIndex) { return NULL; } | |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | 47 | // Callback function, for recuseTreeWithOperation |