52 for (
int x = 0; x <
res_x_; ++x)
56 for (
int y = 0; y <
res_y_; ++y)
58 const int z_start = y_start + y *
res_z_;
60 for (
int z = 0; z <
res_z_; ++z)
63 std::vector<float> nn_sqr_dists (1, 0.0f);
67 p.getVector3fMap () = point;
69 tree_->nearestKSearch (p, 1, nn_indices, nn_sqr_dists);
73 const Eigen::Vector3f normal = (*input_)[nn_indices[0]].getNormalVector3fMap ();
75 if (!std::isnan (normal (0)) && normal.norm () > 0.5f)
76 grid_[z_start + z] = normal.dot (
77 point - (*
input_)[nn_indices[0]].getVector3fMap ());