Removed setVoxel() function from BlockVolumeIterator and added setVoxelAt() function to BlockVolume.h

Improved OpenGL example.
This commit is contained in:
David Williams
2009-03-12 21:48:14 +00:00
parent 7100e558f3
commit 0f4a4c0e2b
7 changed files with 148 additions and 114 deletions

View File

@ -117,9 +117,11 @@ namespace PolyVox
{
++m_iCurrentTime;
//FIXME - rather than creating a iterator each time we should have one stored
BlockVolumeIterator<uint8> iterVol(*volumeData);
iterVol.setPosition(x,y,z);
iterVol.setVoxel(value);
//BlockVolumeIterator<uint8> iterVol(*volumeData);
/*iterVol.setPosition(x,y,z);
iterVol.setVoxel(value);*/
volumeData->setVoxelAt(x,y,z,value);
//If we are not on a boundary, just mark one region.
if((x % POLYVOX_REGION_SIDE_LENGTH != 0) &&
@ -164,9 +166,10 @@ namespace PolyVox
assert(m_bIsLocked);
//FIXME - rather than creating a iterator each time we should have one stored
BlockVolumeIterator<uint8> iterVol(*volumeData);
/*BlockVolumeIterator<uint8> iterVol(*volumeData);
iterVol.setPosition(x,y,z);
iterVol.setVoxel(value);
iterVol.setVoxel(value);*/
volumeData->setVoxelAt(x,y,z,value);
}
void VolumeChangeTracker::lockRegion(const Region& regToLock)