History

clean up application access to deleteVoxelAt()/createVoxel()/getVoxelAt() to access VoxelTree directly

ZappoMan committed 12 years ago

Commit ded73281 parent f09521f6 files · +13 −53Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 6 files). Show all

Unified · Split

interface/src/VoxelSystem.cpp+0−28
@@ -2302,34 +2302,6 @@ bool VoxelSystem::findCapsulePenetration(const glm::vec3& start, const glm::vec3 · 2301 unmodified lines
23022302 return result;
23032303 }
23042304
2305−void VoxelSystem::deleteVoxelAt(float x, float y, float z, float s) {
2306− PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
2307− "VoxelSystem::deleteVoxelAt()");
2308− _tree->lockForWrite();
2309− _tree->deleteVoxelAt(x, y, z, s);
2310− _tree->unlock();
2311−
2312− // redraw!
2313− setupNewVoxelsForDrawing(); // do we even need to do this? Or will the next network receive kick in?
2314−};
2315−
2316−VoxelTreeElement* VoxelSystem::getVoxelAt(float x, float y, float z, float s) const {
2317− return _tree->getVoxelAt(x, y, z, s);
2318−};
2319−
2320−void VoxelSystem::createVoxel(float x, float y, float z, float s,
2321− unsigned char red, unsigned char green, unsigned char blue, bool destructive) {
2322−
2323− PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
2324− "VoxelSystem::createVoxel()");
2325−
2326− _tree->lockForWrite();
2327− _tree->createVoxel(x, y, z, s, red, green, blue, destructive);
2328− _tree->unlock();
2329−
2330− setupNewVoxelsForDrawing();
2331−};
2332−
23332305 void VoxelSystem::copySubTreeIntoNewTree(VoxelTreeElement* startNode, VoxelSystem* destination, bool rebaseToRoot) {
23342306 _tree->copySubTreeIntoNewTree(startNode, destination->_tree, rebaseToRoot);
23352307 destination->setupNewVoxelsForDrawing();