I think it is possible to ignore certain stuff with %ignore. Not sure on the syntax, yet. I'm testing in c# now. So far my mesh has 0 indices, I probably need to set some of the cells to solid before it will work properly.
Do you frequent any irc channels where we could take this? Probably would be less tedious than refreshing the thread.
edit: Got it working
Code:
VolumeDensity8 volume = new VolumeDensity8(32, 32, 32);
Region region = new Region(new Vector3DInt16(0, 0, 0, 0), new Vector3DInt16(32, 32, 32, 32));
//Our new density value
byte uDensity = Density8.getMaxDensity();
//Get the old voxel
Density8 voxel = volume.getVoxelAt(16, 16, 16);
//Modify the density
voxel.setDensity(uDensity);
//Wrte the voxel value into the volume
volume.setVoxelAt(16, 16, 16, voxel);
SurfaceMeshPositionMaterialNormal surface = new SurfaceMeshPositionMaterialNormal();
SurfaceExtractorDensity8 surfaceExtractor = new SurfaceExtractorDensity8(volume, region, surface);
surfaceExtractor.execute(); // extract surface
uint indices = surface.getNoOfIndices();
Console.WriteLine("Surface indices: " + indices);
indices == 24
Now to get it rendering I need to somehow get it to marshal from a *std::vector<vertextype> to List<vertextype>. Currently its giving me "SWIGTYPE_p_std__vectorT_PolyVox__PositionMaterialNormal_t" for surface.getVertices().
http://yuval.bar-or.org/blog/2009/11/im ... -stdmap-2/ looks helpful on the subject
edit: Got it giving me an IEnumerable of PositionMaterialNormal now, using
Quote:
%template(PositionMaterialVector) std::vector<PolyVox::PositionMaterial>;
Going to try getting the vertices into a format I can batch render, now.