diff --git a/libraries/models/src/ModelTree.cpp b/libraries/models/src/ModelTree.cpp index 466d4c5273..ba9376f96b 100644 --- a/libraries/models/src/ModelTree.cpp +++ b/libraries/models/src/ModelTree.cpp @@ -353,21 +353,21 @@ public: QVector _foundModels; }; -bool ModelTree::findInCubeForUpdateOperation(OctreeElement* element, void* extraData) { +bool ModelTree::findInCubeOperation(OctreeElement* element, void* extraData) { FindModelsInCubeArgs* args = static_cast< FindModelsInCubeArgs*>(extraData); const AACube& elementCube = element->getAACube(); if (elementCube.touches(args->_cube)) { ModelTreeElement* modelTreeElement = static_cast(element); - modelTreeElement->getModelsForUpdate(args->_cube, args->_foundModels); + modelTreeElement->getModels(args->_cube, args->_foundModels); return true; } return false; } -void ModelTree::findModelsForUpdate(const AACube& cube, QVector foundModels) { +void ModelTree::findModels(const AACube& cube, QVector foundModels) { FindModelsInCubeArgs args(cube); lockForRead(); - recurseTreeWithOperation(findInCubeForUpdateOperation, &args); + recurseTreeWithOperation(findInCubeOperation, &args); unlock(); // swap the two lists of model pointers instead of copy foundModels.swap(args._foundModels); diff --git a/libraries/models/src/ModelTree.h b/libraries/models/src/ModelTree.h index f8b982ab0d..7c84b11834 100644 --- a/libraries/models/src/ModelTree.h +++ b/libraries/models/src/ModelTree.h @@ -67,7 +67,7 @@ public: /// \param cube the query cube /// \param foundModels[out] vector of non-const ModelItem* /// \remark Side effect: any initial contents in models will be lost - void findModelsForUpdate(const AACube& cube, QVector foundModels); + void findModels(const AACube& cube, QVector foundModels); void addNewlyCreatedHook(NewlyCreatedModelHook* hook); void removeNewlyCreatedHook(NewlyCreatedModelHook* hook); @@ -97,13 +97,12 @@ private: static bool findByIDOperation(OctreeElement* element, void* extraData); static bool findAndDeleteOperation(OctreeElement* element, void* extraData); static bool findAndUpdateModelItemIDOperation(OctreeElement* element, void* extraData); - static bool findInCubeForUpdateOperation(OctreeElement* element, void* extraData); + static bool findInCubeOperation(OctreeElement* element, void* extraData); void notifyNewlyCreatedModel(const ModelItem& newModel, const SharedNodePointer& senderNode); QReadWriteLock _newlyCreatedHooksLock; - std::vector _newlyCreatedHooks; - + QVector _newlyCreatedHooks; QReadWriteLock _recentlyDeletedModelsLock; QMultiMap _recentlyDeletedModelItemIDs; diff --git a/libraries/models/src/ModelTreeElement.cpp b/libraries/models/src/ModelTreeElement.cpp index 3a4e93125a..5d74dfe5cc 100644 --- a/libraries/models/src/ModelTreeElement.cpp +++ b/libraries/models/src/ModelTreeElement.cpp @@ -468,7 +468,7 @@ void ModelTreeElement::getModels(const glm::vec3& searchPosition, float searchRa } } -void ModelTreeElement::getModelsForUpdate(const AACube& box, QVector& foundModels) { +void ModelTreeElement::getModels(const AACube& box, QVector& foundModels) { QList::iterator modelItr = _modelItems->begin(); QList::iterator modelEnd = _modelItems->end(); AACube modelCube; diff --git a/libraries/models/src/ModelTreeElement.h b/libraries/models/src/ModelTreeElement.h index 86e000efb3..b5a84b1c74 100644 --- a/libraries/models/src/ModelTreeElement.h +++ b/libraries/models/src/ModelTreeElement.h @@ -135,7 +135,7 @@ public: /// finds all models that touch a box /// \param box the query box /// \param models[out] vector of non-const ModelItem* - void getModelsForUpdate(const AACube& box, QVector& foundModels); + void getModels(const AACube& box, QVector& foundModels); const ModelItem* getModelWithID(uint32_t id) const; diff --git a/libraries/particles/src/ParticleTree.cpp b/libraries/particles/src/ParticleTree.cpp index cd79ff303e..02e48f031f 100644 --- a/libraries/particles/src/ParticleTree.cpp +++ b/libraries/particles/src/ParticleTree.cpp @@ -320,21 +320,21 @@ public: QVector _foundParticles; }; -bool ParticleTree::findInCubeForUpdateOperation(OctreeElement* element, void* extraData) { +bool ParticleTree::findInCubeOperation(OctreeElement* element, void* extraData) { FindParticlesInCubeArgs* args = static_cast< FindParticlesInCubeArgs*>(extraData); const AACube& elementBox = element->getAACube(); if (elementBox.touches(args->_cube)) { ParticleTreeElement* particleTreeElement = static_cast(element); - particleTreeElement->getParticlesForUpdate(args->_cube, args->_foundParticles); + particleTreeElement->getParticles(args->_cube, args->_foundParticles); return true; } return false; } -void ParticleTree::findParticlesForUpdate(const AACube& cube, QVector foundParticles) { +void ParticleTree::findParticles(const AACube& cube, QVector foundParticles) { FindParticlesInCubeArgs args(cube); lockForRead(); - recurseTreeWithOperation(findInCubeForUpdateOperation, &args); + recurseTreeWithOperation(findInCubeOperation, &args); unlock(); // swap the two lists of particle pointers instead of copy foundParticles.swap(args._foundParticles); diff --git a/libraries/particles/src/ParticleTree.h b/libraries/particles/src/ParticleTree.h index eba00d60da..9cb3e637f3 100644 --- a/libraries/particles/src/ParticleTree.h +++ b/libraries/particles/src/ParticleTree.h @@ -60,7 +60,7 @@ public: /// \param box the query box /// \param foundParticles[out] vector of non-const Particle* /// \remark Side effect: any initial contents in particles will be lost - void findParticlesForUpdate(const AACube& box, QVector foundParticles); + void findParticles(const AACube& box, QVector foundParticles); void addNewlyCreatedHook(NewlyCreatedParticleHook* hook); void removeNewlyCreatedHook(NewlyCreatedParticleHook* hook); @@ -84,7 +84,8 @@ private: static bool findByIDOperation(OctreeElement* element, void* extraData); static bool findAndDeleteOperation(OctreeElement* element, void* extraData); static bool findAndUpdateParticleIDOperation(OctreeElement* element, void* extraData); - static bool findInCubeForUpdateOperation(OctreeElement* element, void* extraData); + + static bool findInCubeOperation(OctreeElement* element, void* extraData); void notifyNewlyCreatedParticle(const Particle& newParticle, const SharedNodePointer& senderNode); diff --git a/libraries/particles/src/ParticleTreeElement.cpp b/libraries/particles/src/ParticleTreeElement.cpp index ad93e82b85..9d3826d8c2 100644 --- a/libraries/particles/src/ParticleTreeElement.cpp +++ b/libraries/particles/src/ParticleTreeElement.cpp @@ -245,7 +245,7 @@ void ParticleTreeElement::getParticles(const glm::vec3& searchPosition, float se } } -void ParticleTreeElement::getParticlesForUpdate(const AACube& box, QVector& foundParticles) { +void ParticleTreeElement::getParticles(const AACube& box, QVector& foundParticles) { QList::iterator particleItr = _particles->begin(); QList::iterator particleEnd = _particles->end(); AACube particleCube; diff --git a/libraries/particles/src/ParticleTreeElement.h b/libraries/particles/src/ParticleTreeElement.h index c53eb608a2..bb7e3c72d5 100644 --- a/libraries/particles/src/ParticleTreeElement.h +++ b/libraries/particles/src/ParticleTreeElement.h @@ -114,7 +114,7 @@ public: /// finds all particles that touch a box /// \param box the query box /// \param particles[out] vector of non-const Particle* - void getParticlesForUpdate(const AACube& box, QVector& foundParticles); + void getParticles(const AACube& box, QVector& foundParticles); const Particle* getParticleWithID(uint32_t id) const;