X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fbvh%2FBVHNearestPointVisitor.hxx;h=7b3a5bbf4f650b2f7c4a64d07cb6e1577678f7b0;hb=8ddcef914296ff7ef2a099097ffd704742492484;hp=5b5e1975291b05cc5959dd578eefc417665b5ecf;hpb=7a879e2abf3c3601741971c964ba05ebaef57770;p=simgear.git diff --git a/simgear/bvh/BVHNearestPointVisitor.hxx b/simgear/bvh/BVHNearestPointVisitor.hxx index 5b5e1975..7b3a5bbf 100644 --- a/simgear/bvh/BVHNearestPointVisitor.hxx +++ b/simgear/bvh/BVHNearestPointVisitor.hxx @@ -24,6 +24,7 @@ #include "BVHNode.hxx" #include "BVHGroup.hxx" +#include "BVHPageNode.hxx" #include "BVHTransform.hxx" #include "BVHLineGeometry.hxx" #include "BVHStaticGeometry.hxx" @@ -52,6 +53,12 @@ public: return; leaf.traverse(*this); } + virtual void apply(BVHPageNode& leaf) + { + if (!intersects(_sphere, leaf.getBoundingSphere())) + return; + leaf.traverse(*this); + } virtual void apply(BVHTransform& transform) { if (!intersects(_sphere, transform.getBoundingSphere()))