dear @fatlipp ,
I am using your code to perfomr Octree search I compiled the code and When I ecxute it I face the following problem.

I traced the error to the following part
for (int depth = 0; depth < config.maxDepth; ++depth)
{
const auto leafs = GetNodeByDepth<3>(depth);
for (int leaf = 0; leaf < leafs; ++leaf)
{
const Octree* const subTree = &tree2[leaf];
auto A = subTree->PointsCount();
if ((A < config.minPointsToDivide ||
depth == config.maxDepth - 1) && A > 0)
{
totalCount += subTree->PointsCount();
}
}
// leafs+=1;
tree2 += leafs;
}
Apperantly the subTree does not return any points in the part :
subTree->PointsCount();
could you help to resolve this issue ?
Kind Regards,
Hassan
dear @fatlipp ,

I am using your code to perfomr Octree search I compiled the code and When I ecxute it I face the following problem.
I traced the error to the following part
Apperantly the subTree does not return any points in the part :
subTree->PointsCount();could you help to resolve this issue ?
Kind Regards,
Hassan