GUI export: added mesh quadric decimation factor option

This commit is contained in:
matlabbe
2015-08-24 12:49:45 -04:00
parent 698ae0eeda
commit 45877e7486
8 changed files with 144 additions and 27 deletions

View File

@@ -36,8 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <pcl/features/normal_3d.h>
#include <pcl/surface/mls.h>
#include <pcl/surface/texture_mapping.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/surface/vtk_smoothing/vtk_mesh_quadric_decimation.h>
namespace rtabmap
{
@@ -381,6 +380,16 @@ void adjustNormalsToViewPoints(
}
}
pcl::PolygonMesh::Ptr meshDecimation(const pcl::PolygonMesh::Ptr & mesh, float factor)
{
pcl::MeshQuadricDecimationVTK mqd;
mqd.setTargetReductionFactor(factor);
mqd.setInputMesh(mesh);
pcl::PolygonMesh::Ptr output(new pcl::PolygonMesh);
mqd.process (*output);
return output;
}
}
}