]> git.mxchange.org Git - simgear.git/blobdiff - simgear/bvh/BVHNearestPointVisitor.hxx
Fix HTTP unit-test
[simgear.git] / simgear / bvh / BVHNearestPointVisitor.hxx
index 1c07c66acb8fd99352383181ba24216d8c158a51..7b3a5bbf4f650b2f7c4a64d07cb6e1577678f7b0 100644 (file)
@@ -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()))
@@ -140,7 +147,7 @@ public:
     { return _linearVelocity; }
     const SGVec3d& getAngularVelocity() const
     { return _angularVelocity; }
-    const SGMaterial* getMaterial() const
+    const BVHMaterial* getMaterial() const
     { return _material; }
     BVHNode::Id getId() const
     { return _id; }
@@ -155,7 +162,7 @@ private:
     SGVec3d _point;
     SGVec3d _linearVelocity;
     SGVec3d _angularVelocity;
-    const SGMaterial* _material;
+    const BVHMaterial* _material;
     BVHNode::Id _id;
 
     bool _havePoint;