Renamed BlockVolume to Volume.

Renamed BlockVolumeIterator to VolumeIterator.
This commit is contained in:
David Williams
2009-03-19 22:04:34 +00:00
parent 1dcec5bd3b
commit d951f4d3b0
29 changed files with 202 additions and 202 deletions

View File

@ -1,7 +1,7 @@
#include "PolyVoxUtil/Serialization.h"
#include "PolyVoxCore/BlockVolume.h"
#include "PolyVoxCore/BlockVolumeIterator.h"
#include "PolyVoxCore/Volume.h"
#include "PolyVoxCore/VolumeIterator.h"
#include "PolyVoxCore/Utility.h"
using namespace std;
@ -10,7 +10,7 @@ namespace PolyVox
{
//Note: we don't do much error handling in here - exceptions will simply be propergated up to the caller.
//FIXME - think about pointer ownership issues. Or could return volume by value if the copy constructor is shallow
BlockVolume<uint8>* loadVolumeRaw(istream& stream)
Volume<uint8>* loadVolumeRaw(istream& stream)
{
//Read volume dimensions
uint8 volumeWidthPower = 0;
@ -21,7 +21,7 @@ namespace PolyVox
stream.read(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//FIXME - need to support non cubic volumes
BlockVolume<uint8>* volume = new BlockVolume<uint8>(volumeWidthPower);
Volume<uint8>* volume = new Volume<uint8>(volumeWidthPower);
uint16 volumeWidth = 0x0001 << volumeWidthPower;
uint16 volumeHeight = 0x0001 << volumeHeightPower;
@ -45,7 +45,7 @@ namespace PolyVox
return volume;
}
void saveVolumeRaw(std::ostream& stream, BlockVolume<uint8>& volume)
void saveVolumeRaw(std::ostream& stream, Volume<uint8>& volume)
{
//Write volume dimensions
uint16 volumeWidth = volume.getSideLength();
@ -61,7 +61,7 @@ namespace PolyVox
stream.write(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//Write data
BlockVolumeIterator<uint8> volIter(volume);
VolumeIterator<uint8> volIter(volume);
for(uint16 z = 0; z < volumeDepth; ++z)
{
for(uint16 y = 0; y < volumeHeight; ++y)
@ -78,7 +78,7 @@ namespace PolyVox
//Note: we don't do much error handling in here - exceptions will simply be propergated up to the caller.
//FIXME - think about pointer ownership issues. Or could return volume by value if the copy constructor is shallow
BlockVolume<uint8>* loadVolumeRle(istream& stream)
Volume<uint8>* loadVolumeRle(istream& stream)
{
//Read volume dimensions
uint8 volumeWidthPower = 0;
@ -89,7 +89,7 @@ namespace PolyVox
stream.read(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//FIXME - need to support non cubic volumes
BlockVolume<uint8>* volume = new BlockVolume<uint8>(volumeWidthPower);
Volume<uint8>* volume = new Volume<uint8>(volumeWidthPower);
uint16 volumeWidth = 0x0001 << volumeWidthPower;
uint16 volumeHeight = 0x0001 << volumeHeightPower;
@ -127,7 +127,7 @@ namespace PolyVox
return volume;
}
void saveVolumeRle(std::ostream& stream, BlockVolume<uint8>& volume)
void saveVolumeRle(std::ostream& stream, Volume<uint8>& volume)
{
//Write volume dimensions
uint16 volumeWidth = volume.getSideLength();
@ -143,7 +143,7 @@ namespace PolyVox
stream.write(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//Write data
BlockVolumeIterator<uint8> volIter(volume);
VolumeIterator<uint8> volIter(volume);
uint8 current = 0;
uint32 runLength = 0;
bool firstTime = true;

View File

@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "PolyVoxCore/SurfaceVertex.h"
#include "PolyVoxCore/Utility.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/BlockVolume.h"
#include "PolyVoxCore/BlockVolumeIterator.h"
#include "PolyVoxCore/Volume.h"
#include "PolyVoxCore/VolumeIterator.h"
using namespace std;
@ -50,7 +50,7 @@ namespace PolyVox
{
}
void VolumeChangeTracker::setVolumeData(BlockVolume<uint8>* volumeDataToSet)
void VolumeChangeTracker::setVolumeData(Volume<uint8>* volumeDataToSet)
{
volumeData = volumeDataToSet;
volRegionLastModified = new Block<int32>(PolyVox::logBase2(POLYVOX_VOLUME_SIDE_LENGTH_IN_REGIONS));
@ -102,12 +102,12 @@ namespace PolyVox
assert(uY < volumeData->getSideLength());
assert(uZ < volumeData->getSideLength());
BlockVolumeIterator<uint8> volIter(*volumeData);
VolumeIterator<uint8> volIter(*volumeData);
volIter.setPosition(uX,uY,uZ);
return volIter.getVoxel();
}
BlockVolume<uint8>* VolumeChangeTracker::getVolumeData(void) const
Volume<uint8>* VolumeChangeTracker::getVolumeData(void) const
{
return volumeData;
}
@ -117,7 +117,7 @@ namespace PolyVox
{
++m_iCurrentTime;
//FIXME - rather than creating a iterator each time we should have one stored
//BlockVolumeIterator<uint8> iterVol(*volumeData);
//VolumeIterator<uint8> iterVol(*volumeData);
/*iterVol.setPosition(x,y,z);
iterVol.setVoxel(value);*/
@ -166,7 +166,7 @@ namespace PolyVox
assert(m_bIsLocked);
//FIXME - rather than creating a iterator each time we should have one stored
/*BlockVolumeIterator<uint8> iterVol(*volumeData);
/*VolumeIterator<uint8> iterVol(*volumeData);
iterVol.setPosition(x,y,z);
iterVol.setVoxel(value);*/
volumeData->setVoxelAt(x,y,z,value);