- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgGA/AnimationPathManipulator
r12034 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 35 35 { 36 36 public: 37 37 38 38 AnimationPathManipulator( osg::AnimationPath* animationPath=0 ); 39 39 40 40 AnimationPathManipulator( const std::string& filename ); 41 41 42 42 virtual const char* className() const { return "AnimationPath"; } 43 43 44 44 void setTimeScale(double s) { _timeScale = s; } 45 45 double getTimeScale() const { return _timeScale; } 46 46 47 47 void setTimeOffset(double o) { _timeOffset = o; } 48 48 double getTimeOffset() const { return _timeOffset; } … … 59 59 void setPrintOutTimingInfo(bool printOutTimingInfo) { _printOutTimingInfo=printOutTimingInfo; } 60 60 bool getPrintOutTimingInfo() const { return _printOutTimingInfo; } 61 61 62 62 /** set the position of the matrix manipulator using a 4x4 Matrix.*/ 63 63 virtual void setByMatrix(const osg::Matrixd& matrix) { _matrix = matrix; } … … 70 70 71 71 /** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/ 72 virtual osg::Matrixd getInverseMatrix() const { return osg::Matrixd::inverse(_matrix); } 72 virtual osg::Matrixd getInverseMatrix() const { return osg::Matrixd::inverse(_matrix); } 73 73 74 74 75 75 void setAnimationPath( osg::AnimationPath* animationPath ) { _animationPath=animationPath; } 76 76 77 77 osg::AnimationPath* getAnimationPath() { return _animationPath.get(); } 78 78 79 79 const osg::AnimationPath* getAnimationPath() const { return _animationPath.get(); } 80 80 … … 90 90 /** Get the keyboard and mouse usage of this manipulator.*/ 91 91 virtual void getUsage(osg::ApplicationUsage& usage) const; 92 92 93 93 protected: 94 94 95 95 bool _valid; 96 96 97 97 bool _printOutTimingInfo; 98 98 … … 100 100 101 101 osg::ref_ptr<osg::AnimationPath> _animationPath; 102 102 103 103 double _timeOffset; 104 104 double _timeScale; … … 108 108 double _pauseTime; 109 109 bool _isPaused; 110 110 111 111 double _realStartOfTimedPeriod; 112 112 double _animStartOfTimedPeriod; 113 113 int _numOfFramesSinceStartOfTimedPeriod; 114 114 115 115 osg::Matrixd _matrix; 116 116
