From ca3737e002cab86a6bfb79999817312f6472a90f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 5 Feb 2014 11:08:39 +0000 Subject: [PATCH] Tweaked the detection of when the position transform for the hull is required. --- src/osgPresentation/deprecated/SlideShowConstructor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPresentation/deprecated/SlideShowConstructor.cpp b/src/osgPresentation/deprecated/SlideShowConstructor.cpp index c3a471126..7046a95b9 100644 --- a/src/osgPresentation/deprecated/SlideShowConstructor.cpp +++ b/src/osgPresentation/deprecated/SlideShowConstructor.cpp @@ -2840,7 +2840,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position osg::ref_ptr hull = osgDB::readNodeFile(volumeData.hull, _options.get()); if (hull.valid()) { - if (volumeData.hullPositionData.requiresPosition() || volumeData.hullPositionData.requiresScale() || volumeData.hullPositionData.requiresRotate()) + if (volumeData.hullPositionData.position!=osg::Vec3(0.0f,0.0f,0.0f) || volumeData.hullPositionData.requiresScale() || volumeData.hullPositionData.requiresRotate()) { osg::Matrix matrix(osg::Matrix::scale(1.0f/volumeData.hullPositionData.scale.x(),1.0f/volumeData.hullPositionData.scale.y(),1.0f/volumeData.hullPositionData.scale.z())* osg::Matrix::rotate(osg::DegreesToRadians(volumeData.hullPositionData.rotate[0]),volumeData.hullPositionData.rotate[1],volumeData.hullPositionData.rotate[2],volumeData.hullPositionData.rotate[3])*