From 0b55a21b97bde9552d0cc8b9903c84d014473a2c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2016 12:10:31 +0100 Subject: [PATCH] Added initializers --- src/osgGA/AnimationPathManipulator.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osgGA/AnimationPathManipulator.cpp b/src/osgGA/AnimationPathManipulator.cpp index f9f62e7b4..f03f29938 100644 --- a/src/osgGA/AnimationPathManipulator.cpp +++ b/src/osgGA/AnimationPathManipulator.cpp @@ -6,11 +6,13 @@ using namespace osgGA; AnimationPathManipulator::AnimationPathManipulator(osg::AnimationPath* animationPath) { + _valid = (animationPath!=0); _printOutTimingInfo = true; _animationPath = animationPath; _timeOffset = 0.0; _timeScale = 1.0; + _pauseTime = 0.0; _isPaused = false; _realStartOfTimedPeriod = 0.0; @@ -20,17 +22,21 @@ AnimationPathManipulator::AnimationPathManipulator(osg::AnimationPath* animation AnimationPathManipulator::AnimationPathManipulator( const std::string& filename ) { + _valid = true; _printOutTimingInfo = true; _animationPath = new osg::AnimationPath; _animationPath->setLoopMode(osg::AnimationPath::LOOP); _timeOffset = 0.0; _timeScale = 1.0; + _pauseTime = 0.0; _isPaused = false; + _realStartOfTimedPeriod = 0.0; + _animStartOfTimedPeriod = 0.0; + _numOfFramesSinceStartOfTimedPeriod = -1; // need to init. osgDB::ifstream in(filename.c_str()); - if (!in) { OSG_WARN << "AnimationPathManipulator: Cannot open animation path file \"" << filename << "\".\n";