It's actually pretty easy once you read up on manual object in ogre.
http://www.ogre3d.org/tikiwiki/ManualObjectI have some code I will post it, not that much to it once you have a PolyVox::SurfaceMesh.
Code:
void
VolumeMapView::_manualFromMesh(bool isUpdate, PolyVox::SurfaceMesh<PositionMaterial>* mesh, Ogre::ManualObject* manual)
{
using std::vector;
const vector<uint32_t>& indices = mesh->getIndices();
const vector<PositionMaterial>& vertices = mesh->getVertices();
if(vertices.size() < 1)
return;
_manual->estimateIndexCount(indices.size());
_manual->estimateVertexCount(vertices.size());
_manual->begin("PRJZ/Minecraft", Ogre::RenderOperation::OT_TRIANGLE_LIST, "PROJECT_ZOMBIE");
//_manual->begin("testatlas", Ogre::RenderOperation::OT_TRIANGLE_LIST, "PROJECT_ZOMBIE");
for (vector<PositionMaterial>::const_iterator itVertex = vertices.begin(); itVertex != vertices.end(); ++itVertex)
{
const PositionMaterial& vertex = *itVertex;
const Vector3DFloat& vertPos = vertex.getPosition();
manual->position(vertPos.getX(), vertPos.getY(), vertPos.getZ());
size_t material = vertex.getMaterial() + 0.5f;
manual->textureCoord(material / 256.0f, 0.0, 0.0, 0.0);
}
//Then iterate through the indices add create the indices list.
for (vector<uint32_t>::const_iterator itIdx = indices.begin(); itIdx != indices.end(); ++itIdx)
{
manual->index(*itIdx);
uint32_t ix = *itIdx;
}
manual->end();
}