From d5f497c47de5dc214649f38824a9e48b5723f256 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 2 Jul 2016 19:27:19 +0200 Subject: [PATCH] Pass the node path instead of the node visitor --- components/sceneutil/riggeometry.cpp | 6 +++--- components/sceneutil/riggeometry.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/sceneutil/riggeometry.cpp b/components/sceneutil/riggeometry.cpp index 2dea6781e..3af5176f4 100644 --- a/components/sceneutil/riggeometry.cpp +++ b/components/sceneutil/riggeometry.cpp @@ -303,7 +303,7 @@ void RigGeometry::updateBounds(osg::NodeVisitor *nv) mSkeleton->updateBoneMatrices(nv->getTraversalNumber()); - updateGeomToSkelMatrix(nv); + updateGeomToSkelMatrix(nv->getNodePath()); osg::BoundingBox box; for (BoneSphereMap::const_iterator it = mBoneSphereMap.begin(); it != mBoneSphereMap.end(); ++it) @@ -321,11 +321,11 @@ void RigGeometry::updateBounds(osg::NodeVisitor *nv) getParent(i)->dirtyBound(); } -void RigGeometry::updateGeomToSkelMatrix(osg::NodeVisitor *nv) +void RigGeometry::updateGeomToSkelMatrix(const osg::NodePath& nodePath) { mSkelToGeomPath.clear(); bool foundSkel = false; - for (osg::NodePath::const_iterator it = nv->getNodePath().begin(); it != nv->getNodePath().end(); ++it) + for (osg::NodePath::const_iterator it = nodePath.begin(); it != nodePath.end(); ++it) { if (!foundSkel) { diff --git a/components/sceneutil/riggeometry.hpp b/components/sceneutil/riggeometry.hpp index fbd22427b..250c86b0e 100644 --- a/components/sceneutil/riggeometry.hpp +++ b/components/sceneutil/riggeometry.hpp @@ -80,7 +80,7 @@ namespace SceneUtil bool initFromParentSkeleton(osg::NodeVisitor* nv); - void updateGeomToSkelMatrix(osg::NodeVisitor* nv); + void updateGeomToSkelMatrix(const osg::NodePath& nodePath); }; }