History

more cruft removal getting rid of false color in VoxelTreeElement

ZappoMan committed 12 years ago

Commit 5b72f011 parent b66c3466 files · +26 −79Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+3−20
@@ -2117,15 +2117,9 @@ bool VoxelSystem::hideAllSubTreeOperation(OctreeElement* element, void* extraDat · 2116 unmodified lines
2117 args->nodesOutside++;2117 args->nodesOutside++;
2118 if (voxel->isKnownBufferIndex()) {2118 if (voxel->isKnownBufferIndex()) {
2119 args->nodesRemoved++;2119 args->nodesRemoved++;
2120 bool falseColorize = false;2120 VoxelSystem* thisVoxelSystem = args->thisVoxelSystem;
2121 if (falseColorize) {2121 thisVoxelSystem->_voxelsUpdated += thisVoxelSystem->forceRemoveNodeFromArrays(voxel);
2122 voxel->setFalseColor(255,0,0); // false colorize2122 thisVoxelSystem->setupNewVoxelsForDrawingSingleNode();
2123 } else {
2124 VoxelSystem* thisVoxelSystem = args->thisVoxelSystem;
2125 thisVoxelSystem->_voxelsUpdated += thisVoxelSystem->forceRemoveNodeFromArrays(voxel);
2126 thisVoxelSystem->setupNewVoxelsForDrawingSingleNode();
2127 }
2128
2129 }2123 }
2130 2124
2131 return true;2125 return true;
@@ -2158,20 +2152,9 @@ bool VoxelSystem::showAllSubTreeOperation(OctreeElement* element, void* extraDat · 26 unmodified lines
2158 voxel->setShouldRender(shouldRender);2152 voxel->setShouldRender(shouldRender);
2159 2153
2160 if (shouldRender && !voxel->isKnownBufferIndex()) {2154 if (shouldRender && !voxel->isKnownBufferIndex()) {
2161 bool falseColorize = false;
2162 if (falseColorize) {
2163 voxel->setFalseColor(0,0,255); // false colorize
2164 }
2165 // These are both needed to force redraw...2155 // These are both needed to force redraw...
2166 voxel->setDirtyBit();2156 voxel->setDirtyBit();
2167 voxel->markWithChangedTime();2157 voxel->markWithChangedTime();
2168 // and this?
2169// no, not needed, because markWithChangedTime notifies hooks, which calls elementUpdated, which calls updateNodeInArrays
2170// {
2171// VoxelSystem* thisVoxelSystem = args->thisVoxelSystem;
2172// thisVoxelSystem->_voxelsUpdated += thisVoxelSystem->updateNodeInArrays(voxel, true, true);
2173// thisVoxelSystem->setupNewVoxelsForDrawingSingleNode();
2174// }
2175 args->nodesShown++;2158 args->nodesShown++;
2176 }2159 }
2177 2160