line 106
children[getOctantContainingPoint(oldPoint->getPosition())]->insert(oldPoint);
children[getOctantContainingPoint(point->getPosition())]->insert(point);
Sometimes the two octants are equal so the oldPoint is overwritten. It arrives when the distance between the two points is less than the halfDimension.
I think I found an error:
line 106 children[getOctantContainingPoint(oldPoint->getPosition())]->insert(oldPoint); children[getOctantContainingPoint(point->getPosition())]->insert(point);
Sometimes the two octants are equal so the oldPoint is overwritten. It arrives when the distance between the two points is less than the halfDimension.
Am I wrong ?