23 const int new_num_points = batch->
points.size() - to_remove.size();
24 std::vector<Eigen::Vector3f> points;
25 points.reserve(new_num_points);
26 std::vector<float> intensities;
28 intensities.reserve(new_num_points);
30 std::vector<FloatColor> colors;
31 if (!batch->
colors.empty()) {
32 colors.reserve(new_num_points);
35 for (
size_t i = 0; i < batch->
points.size(); ++i) {
36 if (to_remove.count(i) == 1) {
39 points.push_back(batch->
points[i]);
40 if (!batch->
colors.empty()) {
41 colors.push_back(batch->
colors[i]);
47 batch->
points = std::move(points);
49 batch->
colors = std::move(colors);
void RemovePoints(std::unordered_set< int > to_remove, PointsBatch *batch)
std::vector< FloatColor > colors
std::vector< float > intensities
std::vector< Eigen::Vector3f > points