octree_poisson.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. diff --git a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp
  2. index 7ed8aaf9d..e7f45b650 100644
  3. --- a/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp
  4. +++ b/surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp
  5. @@ -746,7 +746,10 @@ namespace pcl
  6. Real temp,dist2;
  7. if(!children){return this;}
  8. for(int i=0;i<Cube::CORNERS;i++){
  9. - temp=SquareDistance(children[i].center,p);
  10. + Point3D<Real> child_center;
  11. + Real child_width;
  12. + children[i].centerAndWidth(child_center, child_width);
  13. + temp=SquareDistance(child_center,p);
  14. if(!i || temp<dist2){
  15. dist2=temp;
  16. nearest=i;
  17. @@ -807,7 +810,7 @@ namespace pcl
  18. children=NULL;
  19. d=node.depth ();
  20. - for(i=0;i<DIMENSION;i++){this->offset[i] = node.offset[i];}
  21. + for(i=0;i<DIMENSION;i++){this->off[i] = node.off[i];}
  22. if(node.children){
  23. initChildren();
  24. for(i=0;i<Cube::CORNERS;i++){children[i] = node.children[i];}
  25. @@ -817,7 +820,7 @@ namespace pcl
  26. template <class NodeData,class Real>
  27. int OctNode<NodeData,Real>::CompareForwardDepths(const void* v1,const void* v2){
  28. - return ((const OctNode<NodeData,Real>*)v1)->depth-((const OctNode<NodeData,Real>*)v2)->depth;
  29. + return ((const OctNode<NodeData,Real>*)v1)->depth()-((const OctNode<NodeData,Real>*)v2)->depth();
  30. }
  31. template< class NodeData , class Real >
  32. @@ -874,7 +877,7 @@ namespace pcl
  33. template <class NodeData,class Real>
  34. int OctNode<NodeData,Real>::CompareBackwardDepths(const void* v1,const void* v2){
  35. - return ((const OctNode<NodeData,Real>*)v2)->depth-((const OctNode<NodeData,Real>*)v1)->depth;
  36. + return ((const OctNode<NodeData,Real>*)v2)->depth()-((const OctNode<NodeData,Real>*)v1)->depth();
  37. }
  38. template <class NodeData,class Real>