Quote:
The CubicSurfaceExtractorWithNormals is removed in recent versions of PolyVox (just CubicSurfaceExtractor is present) so I can't easily test this at the moment.
I saw there was a BitBucket repository and a note that said to take the master branch version but it wasn't changed in two years so I just grabbed the zip. I hope that is okay.
Quote:
That's very strange... does this seem to occur in the PolyVox examples?
I didn't build the examples, sorry. I get 36 indicies(single solid cube) correctly with the following code. So, maybe it's just an issue with only 1,1,1 volume.
Code:
PolyVox::SimpleVolume<Uint8> terrainVolume(PolyVox::Region(PolyVox::Vector3DInt32(0, 0, 0), PolyVox::Vector3DInt32(3, 3, 3)));
terrainVolume.setVoxelAt(1, 1, 1, 255);
PolyVox::SurfaceMesh<PolyVox::PositionMaterialNormal> terrainMesh;
PolyVox::CubicSurfaceExtractorWithNormals<PolyVox::SimpleVolume<Uint8>> surfaceExtractor(&terrainVolume, terrainVolume.getEnclosingRegion(), &terrainMesh);
surfaceExtractor.execute();
std::vector<GLuint> indicies(terrainMesh.getIndices());
for (std::vector<GLuint>::size_type i(0); i < indicies.size(); i++)
{
Log("indicies", indicies[i]);
Log("indicies", "\n");
}