From 6b4c7686e6d4fad202ed6be74a4e6281ee571e92 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Sun, 24 Apr 2011 20:52:53 +0200 Subject: [PATCH] Fix for extractSubset() not copying the region. --- library/PolyVoxCore/include/SurfaceMesh.inl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/PolyVoxCore/include/SurfaceMesh.inl b/library/PolyVoxCore/include/SurfaceMesh.inl index 47c39568..ff431cc2 100644 --- a/library/PolyVoxCore/include/SurfaceMesh.inl +++ b/library/PolyVoxCore/include/SurfaceMesh.inl @@ -400,6 +400,8 @@ namespace PolyVox polyvox_shared_ptr< SurfaceMesh > extractSubset(SurfaceMesh& inputMesh, std::set setMaterials) { polyvox_shared_ptr< SurfaceMesh > result(new SurfaceMesh); + + result->m_Region = inputMesh.m_Region; if(inputMesh.m_vecVertices.size() == 0) //FIXME - I don't think we should need this test, but I have seen crashes otherwise... {