diff --git a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp index 7ed8aaf9d..e7f45b650 100644 --- a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp +++ b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp @@ -746,7 +746,10 @@ namespace pcl Real temp,dist2; if(!children){return this;} for(int i=0;i child_center; + Real child_width; + children[i].centerAndWidth(child_center, child_width); + temp=SquareDistance(child_center,p); if(!i || tempoffset[i] = node.offset[i];} + for(i=0;ioff[i] = node.off[i];} if(node.children){ initChildren(); for(i=0;i int OctNode::CompareForwardDepths(const void* v1,const void* v2){ - return ((const OctNode*)v1)->depth-((const OctNode*)v2)->depth; + return ((const OctNode*)v1)->depth()-((const OctNode*)v2)->depth(); } template< class NodeData , class Real > @@ -874,7 +877,7 @@ namespace pcl template int OctNode::CompareBackwardDepths(const void* v1,const void* v2){ - return ((const OctNode*)v2)->depth-((const OctNode*)v1)->depth; + return ((const OctNode*)v2)->depth()-((const OctNode*)v1)->depth(); } template