]> git.mxchange.org Git - simgear.git/blobdiff - simgear/bvh/BVHLineSegmentVisitor.cxx
Fix #1783: repeated error message on console
[simgear.git] / simgear / bvh / BVHLineSegmentVisitor.cxx
index 1b93cd090bb8e9cf93595a42c5310527223d8261..86fdd659c76aebdbcaf15aea0e44124b1df47c87 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "BVHNode.hxx"
 #include "BVHGroup.hxx"
+#include "BVHPageNode.hxx"
 #include "BVHTransform.hxx"
 #include "BVHMotionTransform.hxx"
 #include "BVHLineGeometry.hxx"
@@ -47,6 +48,14 @@ BVHLineSegmentVisitor::apply(BVHGroup& group)
         return;
     group.traverse(*this);
 }
+
+void
+BVHLineSegmentVisitor::apply(BVHPageNode& pageNode)
+{
+    if (!intersects(_lineSegment, pageNode.getBoundingSphere()))
+        return;
+    pageNode.traverse(*this);
+}
     
 void
 BVHLineSegmentVisitor::apply(BVHTransform& transform)