68 if (downsample_all_data_)
72 std::vector<pcl::PCLPointField> fields;
83 for (std::size_t i = 0; i < histsize_; i++)
85 history_[i].count = 0;
90 output.resize (input_->size ());
92 for (
const auto& point: *input_)
94 int ix =
static_cast<int> (std::floor (point.x * inverse_leaf_size_[0]));
95 int iy =
static_cast<int> (std::floor (point.y * inverse_leaf_size_[1]));
96 int iz =
static_cast<int> (std::floor (point.z * inverse_leaf_size_[2]));
97 unsigned int hash =
static_cast<unsigned int> ((ix * 7171 + iy * 3079 + iz * 4231) & (histsize_ - 1));
98 he *
hhe = &history_[hash];
99 if (
hhe->count && ((ix !=
hhe->ix) || (iy !=
hhe->iy) || (iz !=
hhe->iz)))
103 hhe->centroid.setZero ();
124 for (std::size_t i = 0; i < histsize_; i++)
126 he *
hhe = &history_[i];
void flush(PointCloud &output, std::size_t op, he *hhe, int rgba_index, int centroid_size)
Write a single point from the hash to the output cloud.