From 0c9214636fb07e5101198b6d972e3d865172d1ee Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 25 Aug 2008 15:03:31 +0000 Subject: [PATCH] From Paul Martz, "This change fixes a problem with PAT nodes during FLT export." Note, Paul Martz has merged this patch into OpenSceneGraph-2.6. --- src/osgPlugins/OpenFlight/FltExportVisitor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osgPlugins/OpenFlight/FltExportVisitor.cpp b/src/osgPlugins/OpenFlight/FltExportVisitor.cpp index 9d0809446..e28a9529c 100644 --- a/src/osgPlugins/OpenFlight/FltExportVisitor.cpp +++ b/src/osgPlugins/OpenFlight/FltExportVisitor.cpp @@ -280,11 +280,11 @@ FltExportVisitor::apply( osg::PositionAttitudeTransform& node ) _firstNode = false; ScopedStatePushPop guard( this, node.getStateSet() ); - osg::ref_ptr m = new osg::RefMatrix; - - const osg::Vec3d& trans = node.getPosition(); - const osg::Quat& rot = node.getAttitude(); - m->set(osg::Matrix::translate(trans) * osg::Matrix::rotate(rot) ); + osg::ref_ptr m = new osg::RefMatrix( + osg::Matrix::translate( -node.getPivotPoint() ) * + osg::Matrix::scale( node.getScale() ) * + osg::Matrix::rotate( node.getAttitude() ) * + osg::Matrix::translate( node.getPosition() ) ); std::vector< osg::Referenced* > saveUserDataList; unsigned int idx;