Compile fixes for Linux.
Added SWIG files to make bindings build.
This commit is contained in:
parent
0d839c4a51
commit
839f366174
@ -84,14 +84,14 @@ class PerlinNoisePager : public PolyVox::Pager<MaterialDensityPair44>
|
|||||||
public:
|
public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
PerlinNoisePager()
|
PerlinNoisePager()
|
||||||
:Pager()
|
:Pager<MaterialDensityPair44>()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
virtual ~PerlinNoisePager() {};
|
virtual ~PerlinNoisePager() {};
|
||||||
|
|
||||||
virtual void pageIn(const Region& region, Block<MaterialDensityPair44>* pBlockData)
|
virtual void pageIn(const PolyVox::Region& region, Block<MaterialDensityPair44>* pBlockData)
|
||||||
{
|
{
|
||||||
pBlockData->createUncompressedData();
|
pBlockData->createUncompressedData();
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void pageOut(const Region& region, Block<MaterialDensityPair44>* pBlockData)
|
virtual void pageOut(const PolyVox::Region& region, Block<MaterialDensityPair44>* pBlockData)
|
||||||
{
|
{
|
||||||
std::cout << "warning unloading region: " << region.getLowerCorner() << " -> " << region.getUpperCorner() << std::endl;
|
std::cout << "warning unloading region: " << region.getLowerCorner() << " -> " << region.getUpperCorner() << std::endl;
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
RLECompressor<MaterialDensityPair44, uint16_t>* compressor = new RLECompressor<MaterialDensityPair44, uint16_t>();
|
RLECompressor<MaterialDensityPair44, uint16_t>* compressor = new RLECompressor<MaterialDensityPair44, uint16_t>();
|
||||||
PerlinNoisePager* pager = new PerlinNoisePager();
|
PerlinNoisePager* pager = new PerlinNoisePager();
|
||||||
LargeVolume<MaterialDensityPair44> volData(Region::MaxRegion, compressor, pager, 256);
|
LargeVolume<MaterialDensityPair44> volData(PolyVox::Region::MaxRegion, compressor, pager, 256);
|
||||||
volData.setMaxNumberOfBlocksInMemory(4096);
|
volData.setMaxNumberOfBlocksInMemory(4096);
|
||||||
volData.setMaxNumberOfUncompressedBlocks(64);
|
volData.setMaxNumberOfUncompressedBlocks(64);
|
||||||
|
|
||||||
|
@ -38,12 +38,12 @@ namespace PolyVox
|
|||||||
* Provides an interface for performing paging of data.
|
* Provides an interface for performing paging of data.
|
||||||
*/
|
*/
|
||||||
template <typename VoxelType>
|
template <typename VoxelType>
|
||||||
class FilePager : public Pager<typename VoxelType>
|
class FilePager : public Pager<VoxelType>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
FilePager(const std::string& strFolderName)
|
FilePager(const std::string& strFolderName)
|
||||||
:Pager()
|
:Pager<VoxelType>()
|
||||||
,m_strFolderName(strFolderName)
|
,m_strFolderName(strFolderName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
6
library/bindings/FilePager.i
Normal file
6
library/bindings/FilePager.i
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
%module FilePager
|
||||||
|
%{
|
||||||
|
#include "FilePager.h"
|
||||||
|
%}
|
||||||
|
|
||||||
|
%include "FilePager.h"
|
6
library/bindings/Pager.i
Normal file
6
library/bindings/Pager.i
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
%module Pager
|
||||||
|
%{
|
||||||
|
#include "Pager.h"
|
||||||
|
%}
|
||||||
|
|
||||||
|
%include "Pager.h"
|
@ -76,6 +76,8 @@ EXTRACTOR(shortname, LargeVolume)
|
|||||||
%include "DefaultMarchingCubesController.i"
|
%include "DefaultMarchingCubesController.i"
|
||||||
%include "Region.i"
|
%include "Region.i"
|
||||||
%include "Compressor.i"
|
%include "Compressor.i"
|
||||||
|
%include "Pager.i"
|
||||||
|
%include "FilePager.i"
|
||||||
%include "MinizCompressor.i"
|
%include "MinizCompressor.i"
|
||||||
%include "RLECompressor.i"
|
%include "RLECompressor.i"
|
||||||
%include "BaseVolume.i"
|
%include "BaseVolume.i"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user