19 head_(ind.x(), ind.y(), ind.z()) =
static_cast<uint32>(i);
33 nCells_((sBox.maxPoint() - sBox.minPoint()) / dx +
realx3(1.0)),
36 next_(
"next", pos.size()),
37 head_(
"head", nCells_.x(), nCells_.y(), nCells_.z())
49 if(!searchBox_.isInside(p))
return false;
51 const auto ind = pointIndex(p);
52 const auto startInd =
max(ind - 1 ,
int32x3(0));
53 const auto endInd =
min( ind+1 ,nCells_-1);
55 for(
int32 i=startInd.x(); i<=endInd.x(); i++)
57 for(
int32 j=startInd.y(); j<=endInd.y(); j++)
59 for(
int32 k=startInd.z(); k<=endInd.z(); k++)
63 while(
n !=
static_cast<uint32>(-1))
65 if( ((position_[
n]-p).
length() - 0.5*(diameters_[
n]+d )) <= 0.0 )
81 size_t n = position_.size()-1;
82 if( next_.size() !=
n )
85 "size mismatch of next and position"<<
endl;
88 next_.push_back(
static_cast<uint32>(-1));
89 const auto& p = position_[
n];
91 if(!searchBox_.isInside(p))
94 "Point "<< p <<
" is not inside the search box"<<
endl;
98 const auto ind = pointIndex(p);
100 next_[
n] = head_(ind.x(), ind.y(), ind.z());
101 head_(ind.x(), ind.y(), ind.z()) =
static_cast<uint32>(
n);