File Naive.cpp
File List > algos > mesh_to_pointcloud > Naive.cpp
Go to the documentation of this file
#include "mesh_to_pointcloud/Naive.h"
#include "mesh/Mesh.h"
#include "point_cloud/PointCloud.h"
// Algo naif
namespace Argos {
PointCloud Naive::sample(const Mesh &mesh) {
const std::vector<Vector3D<double>> &vertices = mesh.getVertices();
PointCloud points;
for (const Vector3D<double> &v: vertices) {
points.addPoint(v);
}
return points;
}
}