Creating a Perlin noise generator as a 'pager'.

This commit is contained in:
David Williams
2013-06-16 19:12:37 +02:00
parent f86ec57e14
commit 414a012230
5 changed files with 75 additions and 2 deletions

View File

@ -36,6 +36,7 @@ namespace PolyVox
/**
* Provides an interface for performing paging of data.
*/
template <typename VoxelType>
class FilePager : public Pager
{
public:
@ -58,6 +59,7 @@ namespace PolyVox
protected:
std::string m_strFolderName;
};
}
#endif //__PolyVox_FilePager_H__

View File

@ -248,6 +248,7 @@ namespace PolyVox
/// Constructor for creating a very large paging volume.
LargeVolume
(
Compressor* pCompressor,
polyvox_function<void(const ConstVolumeProxy<VoxelType>&, const Region&)> dataRequiredHandler,
polyvox_function<void(const ConstVolumeProxy<VoxelType>&, const Region&)> dataOverflowHandler,
uint16_t uBlockSideLength = 32

View File

@ -37,11 +37,13 @@ namespace PolyVox
template <typename VoxelType>
LargeVolume<VoxelType>::LargeVolume
(
Compressor* pCompressor,
polyvox_function<void(const ConstVolumeProxy<VoxelType>&, const Region&)> dataRequiredHandler,
polyvox_function<void(const ConstVolumeProxy<VoxelType>&, const Region&)> dataOverflowHandler,
uint16_t uBlockSideLength
)
:BaseVolume<VoxelType>(Region::MaxRegion)
,m_pCompressor(pCompressor)
{
m_funcDataRequiredHandler = dataRequiredHandler;
m_funcDataOverflowHandler = dataOverflowHandler;

View File

@ -33,6 +33,7 @@ namespace PolyVox
/**
* Provides an interface for performing paging of data.
*/
template <typename VoxelType>
class Pager
{
public:
@ -43,6 +44,7 @@ namespace PolyVox
virtual void dataRequiredHandler(const ConstVolumeProxy<VoxelType>& volumeProxy, const Region& region);
virtual void dataOverflowHandler(const ConstVolumeProxy<VoxelType>& volumeProxy, const Region& region);
};
}
#endif //__PolyVox_Pager_H__