From 10644544ab22c433eea6f5e9dcad6ffa862193b8 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 21 Apr 2015 20:31:20 +0200 Subject: [PATCH] Dead code removal --- components/nifosg/nifloader.cpp | 41 --------------------------------- 1 file changed, 41 deletions(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 301c487da..b28412cb6 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -253,47 +253,6 @@ namespace } }; - // NodeCallback used to set the inverse of the parent bone's matrix in skeleton space - // on the MatrixTransform that the NodeCallback is attached to. This is used so we can - // attach skinned meshes to their actual parent node, while still having the skinning - // work in skeleton space as expected. - // Must be set on a MatrixTransform. - class InvertBoneMatrix : public osg::NodeCallback - { - public: - InvertBoneMatrix() {} - - InvertBoneMatrix(const InvertBoneMatrix& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) - : osg::Object(copy, copyop), osg::NodeCallback(copy, copyop) {} - - META_Object(NifOsg, InvertBoneMatrix) - - void operator()(osg::Node* node, osg::NodeVisitor* nv) - { - if (nv && nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR) - { - osg::NodePath path = nv->getNodePath(); - path.pop_back(); - - osg::MatrixTransform* trans = dynamic_cast(node); - - for (osg::NodePath::iterator it = path.begin(); it != path.end(); ++it) - { - if (dynamic_cast(*it)) - { - path.erase(path.begin(), it+1); - // the bone's transform in skeleton space - osg::Matrix boneMat = osg::computeLocalToWorld( path ); - trans->setMatrix(osg::Matrix::inverse(boneMat)); - break; - } - } - } - traverse(node,nv); - } - }; - - // NodeVisitor that adds keyframe controllers to an existing scene graph, used when loading .kf files /* class LoadKfVisitor : public osg::NodeVisitor