From 4ad410969ef359bcdcdc26a2844dbc8ba052ecf8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 10 Nov 2020 15:44:51 +0000 Subject: [PATCH] Added Node::accept() usage from IntersectionVisitor to IntersectVisitor --- src/osgUtil/IntersectVisitor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osgUtil/IntersectVisitor.cpp b/src/osgUtil/IntersectVisitor.cpp index 0f05b5f4d..250dcff68 100644 --- a/src/osgUtil/IntersectVisitor.cpp +++ b/src/osgUtil/IntersectVisitor.cpp @@ -664,9 +664,9 @@ void IntersectVisitor::apply(Geode& geode) { if (!enterNode(geode)) return; - for(unsigned int i = 0; i < geode.getNumDrawables(); i++ ) + for(unsigned int i = 0; i < geode.getNumChildren(); i++ ) { - intersect(*geode.getDrawable(i)); + geode.getChild(i)->accept(*this); } leaveNode(); @@ -680,7 +680,7 @@ void IntersectVisitor::apply(Billboard& node) // IntersectVisitor doesn't have getEyeLocal(), can we use NodeVisitor::getEyePoint()? const Vec3& eye_local = getEyePoint(); - for(unsigned int i = 0; i < node.getNumDrawables(); i++ ) + for(unsigned int i = 0; i < node.getNumChildren(); i++ ) { const Vec3& pos = node.getPosition(i); osg::ref_ptr billboard_matrix = new RefMatrix; @@ -688,7 +688,7 @@ void IntersectVisitor::apply(Billboard& node) pushMatrix(billboard_matrix.get(), osg::Transform::RELATIVE_RF); - intersect(*node.getDrawable(i)); + node.getChild(i)->accept(*this); popMatrix();