diff --git a/src/Demos/osgconv/orientationconverter.cpp b/src/Demos/osgconv/orientationconverter.cpp index fcbb9e824..b3d3b2b8f 100644 --- a/src/Demos/osgconv/orientationconverter.cpp +++ b/src/Demos/osgconv/orientationconverter.cpp @@ -9,10 +9,14 @@ class TransformFunctor : public osg::Drawable::AttributeFunctor public: osg::Matrix _m; + osg::Matrix _im; TransformFunctor(const osg::Matrix& m): - AttributeFunctor(osg::Drawable::COORDS|osg::Drawable::NORMALS), - _m(m) {} + AttributeFunctor(osg::Drawable::COORDS|osg::Drawable::NORMALS) + { + _m = m; + _im.invert(_m); + } virtual ~TransformFunctor() {} @@ -30,16 +34,8 @@ class TransformFunctor : public osg::Drawable::AttributeFunctor { for (osg::Vec3* itr=begin;itr