Renamed Volume to LargeVolume.

This commit is contained in:
David Williams
2011-04-28 21:21:59 +01:00
parent 96ff5e890a
commit ea309ab15b
46 changed files with 239 additions and 237 deletions

View File

@ -21,7 +21,7 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "Volume.h"
#include "LargeVolume.h"
#include "PolyVoxImpl/Utility.h"
namespace PolyVox
@ -29,7 +29,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
template <typename VoxelType>
polyvox_shared_ptr< Volume<VoxelType> > loadVolumeRaw(std::istream& stream, VolumeSerializationProgressListener* progressListener)
polyvox_shared_ptr< LargeVolume<VoxelType> > loadVolumeRaw(std::istream& stream, VolumeSerializationProgressListener* progressListener)
{
assert(false); //THIS FUNCTION IS DEPRECATED. REMOVE THIS ASSERT TO CONTINUE, BUT SWITCH TO 'loadVolume()' ASAP.
@ -46,7 +46,7 @@ namespace PolyVox
uint16_t volumeDepth = 0x0001 << volumeDepthPower;
//FIXME - need to support non cubic volumes
polyvox_shared_ptr< Volume<VoxelType> > volume(new Volume<VoxelType>(volumeWidth, volumeHeight, volumeDepth));
polyvox_shared_ptr< LargeVolume<VoxelType> > volume(new LargeVolume<VoxelType>(volumeWidth, volumeHeight, volumeDepth));
//Read data
for(uint16_t z = 0; z < volumeDepth; ++z)
@ -80,7 +80,7 @@ namespace PolyVox
}
template <typename VoxelType>
void saveVolumeRaw(std::ostream& stream, Volume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
void saveVolumeRaw(std::ostream& stream, LargeVolume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
{
assert(false); //THIS FUNCTION IS DEPRECATED. REMOVE THIS ASSERT TO CONTINUE, BUT SWITCH TO 'saveVolume()' ASAP.
@ -98,7 +98,7 @@ namespace PolyVox
stream.write(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//Write data
Volume<VoxelType>::Sampler volIter(&volume);
LargeVolume<VoxelType>::Sampler volIter(&volume);
for(uint16_t z = 0; z < volumeDepth; ++z)
{
//Update progress once per slice.
@ -129,7 +129,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
template <typename VoxelType>
polyvox_shared_ptr< Volume<VoxelType> > loadVolumeRle(std::istream& stream, VolumeSerializationProgressListener* progressListener)
polyvox_shared_ptr< LargeVolume<VoxelType> > loadVolumeRle(std::istream& stream, VolumeSerializationProgressListener* progressListener)
{
assert(false); //THIS FUNCTION IS DEPRECATED. REMOVE THIS ASSERT TO CONTINUE, BUT SWITCH TO 'loadVolume()' ASAP.
@ -146,7 +146,7 @@ namespace PolyVox
uint16_t volumeDepth = 0x0001 << volumeDepthPower;
//FIXME - need to support non cubic volumes
polyvox_shared_ptr< Volume<VoxelType> > volume(new Volume<VoxelType>(volumeWidth, volumeHeight, volumeDepth));
polyvox_shared_ptr< LargeVolume<VoxelType> > volume(new LargeVolume<VoxelType>(volumeWidth, volumeHeight, volumeDepth));
//Read data
bool firstTime = true;
@ -194,7 +194,7 @@ namespace PolyVox
}
template <typename VoxelType>
void saveVolumeRle(std::ostream& stream, Volume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
void saveVolumeRle(std::ostream& stream, LargeVolume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
{
assert(false); //THIS FUNCTION IS DEPRECATED. REMOVE THIS ASSERT TO CONTINUE, BUT SWITCH TO 'saveVolume()' ASAP.
@ -212,7 +212,7 @@ namespace PolyVox
stream.write(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//Write data
Volume<VoxelType>::Sampler volIter(&volume);
LargeVolume<VoxelType>::Sampler volIter(&volume);
VoxelType current;
uint32_t runLength = 0;
bool firstTime = true;
@ -269,7 +269,7 @@ namespace PolyVox
////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType>
bool loadVolume(std::istream& stream, Volume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
bool loadVolume(std::istream& stream, LargeVolume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
{
char pIdentifier[8];
stream.read(pIdentifier, 7);
@ -294,7 +294,7 @@ namespace PolyVox
}
template <typename VoxelType>
bool saveVolume(std::ostream& stream, Volume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
bool saveVolume(std::ostream& stream, LargeVolume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
{
char pIdentifier[] = "PolyVox";
stream.write(pIdentifier, 7);
@ -308,7 +308,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
template <typename VoxelType>
bool loadVersion0(std::istream& stream, Volume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
bool loadVersion0(std::istream& stream, LargeVolume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
{
//Read volume dimensions
uint16_t volumeWidth = 0;
@ -368,7 +368,7 @@ namespace PolyVox
}
template <typename VoxelType>
bool saveVersion0(std::ostream& stream, Volume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
bool saveVersion0(std::ostream& stream, LargeVolume<VoxelType>& volume, VolumeSerializationProgressListener* progressListener)
{
//Write volume dimensions
uint16_t volumeWidth = volume.getWidth();
@ -380,7 +380,7 @@ namespace PolyVox
stream.write(reinterpret_cast<char*>(&volumeDepth), sizeof(volumeDepth));
//Write data
Volume<VoxelType>::Sampler volIter(&volume);
LargeVolume<VoxelType>::Sampler volIter(&volume);
VoxelType current;
uint32_t runLength = 0;
bool firstTime = true;