55 const unsigned int N =
static_cast<unsigned int> (input_->size ());
56 Eigen::MatrixXd
M (2*N, 2*N),
75 Eigen::MatrixXd w (2*N, 1);
78 w =
M.fullPivLu ().solve (d);
80 std::vector<double> weights (2*N);
81 std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> >
centers (2*N);
82 for (
unsigned int i = 0; i < N; ++i)
85 centers[i + N] = Eigen::Vector3f ((*input_)[i].
getVector3fMap ()).cast<
double> () + Eigen::Vector3f ((*input_)[i].getNormalVector3fMap ()).
cast<double> () * off_surface_epsilon_;
86 weights[i] = w (i, 0);
87 weights[i + N] = w (i + N, 0);
90 for (
int x = 0; x < res_x_; ++x)
91 for (
int y = 0; y < res_y_; ++y)
92 for (
int z = 0; z < res_z_; ++z)
94 const Eigen::Vector3f
point_f = (size_voxel_ * Eigen::Array3f (x, y, z)
95 + lower_boundary_).
matrix ();
96 const Eigen::Vector3d point =
point_f.cast<
double> ();
99 std::vector<double>::const_iterator
w_it (weights.begin());
100 for (std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d> >::const_iterator
c_it =
centers.begin ();
104 grid_[x * res_y_*res_z_ + y * res_z_ + z] =
float (f);