Work on SWIG bindings for PolyVox.

This commit is contained in:
David Williams 2010-12-28 09:49:18 +00:00
parent 26081fd4ba
commit 89df1c8824
4 changed files with 15 additions and 7 deletions

View File

@ -29,7 +29,11 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
#ifdef SWIG
class Region
#else
class POLYVOXCORE_API Region class POLYVOXCORE_API Region
#endif
{ {
public: public:
Region(); Region();

View File

@ -153,7 +153,7 @@ namespace PolyVox
///Resises the volume to the specified dimensions ///Resises the volume to the specified dimensions
void resize(uint16_t uWidth, uint16_t uHeight, uint16_t uDepth, uint16_t uBlockSideLength = 32); void resize(uint16_t uWidth, uint16_t uHeight, uint16_t uDepth, uint16_t uBlockSideLength = 32);
void tidyUpMemory(uint32_t uNoOfBlocksToProcess = (std::numeric_limits<uint32_t>::max)()); void tidyUpMemory(uint32_t uNoOfBlocksToProcess = 1000000);
private: private:
polyvox_shared_ptr< Block<VoxelType> > getHomogenousBlock(VoxelType tHomogenousValue); polyvox_shared_ptr< Block<VoxelType> > getHomogenousBlock(VoxelType tHomogenousValue);

View File

@ -8,4 +8,8 @@
//%include "PolyVoxCStdInt.i" //%include "PolyVoxCStdInt.i"
//%include "Utility.i" //%include "Utility.i"
//%include "PolyVoxForwardDeclarations.i" //Shouldn't be needed //%include "PolyVoxForwardDeclarations.i" //Shouldn't be needed
//
%include "stdint.i"
%include "Vector.i" %include "Vector.i"
%include "Region.i"
%include "Volume.i"

View File

@ -8,11 +8,11 @@
%template(Vector3DFloat) PolyVox::Vector<3,float>; %template(Vector3DFloat) PolyVox::Vector<3,float>;
%template(Vector3DDouble) PolyVox::Vector<3,double>; %template(Vector3DDouble) PolyVox::Vector<3,double>;
//%template(Vector3DInt8) PolyVox::Vector<3,int8>; %template(Vector3DInt8) PolyVox::Vector<3,int8_t>;
//%template(Vector3DUint8) PolyVox::Vector<3,uint8>; %template(Vector3DUint8) PolyVox::Vector<3,uint8_t>;
//%template(Vector3DInt16) PolyVox::Vector<3,int16>; %template(Vector3DInt16) PolyVox::Vector<3,int16_t>;
//%template(Vector3DUint16) PolyVox::Vector<3,uint16>; %template(Vector3DUint16) PolyVox::Vector<3,uint16_t>;
//%template(Vector3DInt32) PolyVox::Vector<3,int32>; %template(Vector3DInt32) PolyVox::Vector<3,int32_t>;
//%template(Vector3DUint32) PolyVox::Vector<3,uint32>; %template(Vector3DUint32) PolyVox::Vector<3,uint32_t>;
%rename(assign) Vector3DFloat::operator=; %rename(assign) Vector3DFloat::operator=;