mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 22:56:40 +00:00 
			
		
		
		
	* nodecallback.hpp * lightmanager.hpp * lightmanager.cpp * lightmanager.hpp * nodecallback.hpp * nodecallback.hpp * [ci skip] * lightmanager.hpp * nodecallback.hpp * nodecallback.hpp * lightmanager.cpp * lightmanager.cpp * nodecallback.hpp * [ci skip] * [ci skip] * controller.cpp * [ci skip] * osgacontroller.cpp * keyframe.hpp * controller.hpp * keyframe.hpp * [ci skip] * keyframe.hpp * animation.hpp * [ci skip] * weaponanimation.cpp * nodecallback.hpp
		
			
				
	
	
		
			66 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef OPENMW_COMPONENTS_SCENEUTIL_KEYFRAME_HPP
 | |
| #define OPENMW_COMPONENTS_SCENEUTIL_KEYFRAME_HPP
 | |
| 
 | |
| #include <map>
 | |
| 
 | |
| #include <osg/Callback>
 | |
| 
 | |
| #include <components/sceneutil/controller.hpp>
 | |
| #include <components/sceneutil/textkeymap.hpp>
 | |
| #include <components/resource/animation.hpp>
 | |
| 
 | |
| namespace SceneUtil
 | |
| {
 | |
|     class KeyframeController : public SceneUtil::Controller, public virtual osg::Callback
 | |
|     {
 | |
|     public:
 | |
|         KeyframeController() {}
 | |
| 
 | |
|         KeyframeController(const KeyframeController& copy, const osg::CopyOp& copyop)
 | |
|             : osg::Callback(copy, copyop)
 | |
|             , SceneUtil::Controller(copy)
 | |
|         {}
 | |
|         META_Object(SceneUtil, KeyframeController)
 | |
| 
 | |
|         virtual osg::Vec3f getTranslation(float time) const  { return osg::Vec3f(); }
 | |
|     };
 | |
| 
 | |
|     /// Wrapper object containing an animation track as a ref-countable osg::Object.
 | |
|     struct TextKeyMapHolder : public osg::Object
 | |
|     {
 | |
|     public:
 | |
|         TextKeyMapHolder() {}
 | |
|         TextKeyMapHolder(const TextKeyMapHolder& copy, const osg::CopyOp& copyop)
 | |
|             : osg::Object(copy, copyop)
 | |
|             , mTextKeys(copy.mTextKeys)
 | |
|         {}
 | |
| 
 | |
|         TextKeyMap mTextKeys;
 | |
| 
 | |
|         META_Object(SceneUtil, TextKeyMapHolder)
 | |
| 
 | |
|     };
 | |
| 
 | |
|     /// Wrapper object containing the animation track and its KeyframeControllers.
 | |
|     class KeyframeHolder : public osg::Object
 | |
|     {
 | |
|     public:
 | |
|         KeyframeHolder() {}
 | |
|         KeyframeHolder(const KeyframeHolder& copy, const osg::CopyOp& copyop)
 | |
|             : mTextKeys(copy.mTextKeys)
 | |
|             , mKeyframeControllers(copy.mKeyframeControllers)
 | |
|         {
 | |
|         }
 | |
| 
 | |
|         TextKeyMap mTextKeys;
 | |
| 
 | |
|         META_Object(SceneUtil, KeyframeHolder)
 | |
| 
 | |
|         /// Controllers mapped to node name.
 | |
|         typedef std::map<std::string, osg::ref_ptr<const KeyframeController> > KeyframeControllerMap;
 | |
|         KeyframeControllerMap mKeyframeControllers;
 | |
|     };
 | |
| 
 | |
| }
 | |
| 
 | |
| #endif
 |