Fix SWIG bindings
The bindings now compile and in Python a mesh can be extracted from a volume. The only extractor currently bound is SurfaceExtractor<SimpleVolume, Material8>. The bindings are still commented out in library/CMakeLists.txt by default.
This commit is contained in:
@ -2,10 +2,29 @@
|
||||
%{
|
||||
#include "SimpleVolume.h"
|
||||
#include "SurfaceExtractor.h"
|
||||
#include "PolyVoxCore/Material.h"
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
class SurfaceExtractorSimpleVolumeMaterial8 : public SurfaceExtractor<SimpleVolume, Material8>
|
||||
{
|
||||
public:
|
||||
SurfaceExtractorSimpleVolumeMaterial8(SimpleVolume<Material8>* volData, Region region, SurfaceMesh<PositionMaterialNormal>* result)
|
||||
: SurfaceExtractor<SimpleVolume, Material8>(volData, region, result) {}
|
||||
void execute() { SurfaceExtractor<SimpleVolume, Material8>::execute(); }
|
||||
};
|
||||
};
|
||||
%}
|
||||
|
||||
%include "SimpleVolume.h"
|
||||
%include "SurfaceExtractor.h"
|
||||
|
||||
%template(SurfaceExtractorMaterial8) PolyVox::SurfaceExtractor<PolyVox::Material8>;
|
||||
%template(SurfaceExtractorDensity8) PolyVox::SurfaceExtractor<PolyVox::Density8>;
|
||||
namespace PolyVox
|
||||
{
|
||||
class SurfaceExtractorSimpleVolumeMaterial8 : public SurfaceExtractor<SimpleVolume, Material8>
|
||||
{
|
||||
public:
|
||||
SurfaceExtractorSimpleVolumeMaterial8(SimpleVolume<Material8>* volData, Region region, SurfaceMesh<PositionMaterialNormal>* result);
|
||||
void execute();
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user