2015-12-12 17:52:06 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_KEYFRAMEMANAGER_H
|
|
|
|
#define OPENMW_COMPONENTS_KEYFRAMEMANAGER_H
|
|
|
|
|
|
|
|
#include <osg/ref_ptr>
|
|
|
|
#include <string>
|
|
|
|
|
2020-11-18 20:48:47 +00:00
|
|
|
#include <components/sceneutil/keyframe.hpp>
|
2015-12-12 17:52:06 +00:00
|
|
|
|
2017-02-09 02:32:40 +00:00
|
|
|
#include "resourcemanager.hpp"
|
2015-12-12 17:52:06 +00:00
|
|
|
|
|
|
|
namespace Resource
|
|
|
|
{
|
|
|
|
|
2020-11-18 20:48:47 +00:00
|
|
|
class SceneManager;
|
|
|
|
|
2015-12-12 17:52:06 +00:00
|
|
|
/// @brief Managing of keyframe resources
|
2016-02-05 23:15:12 +00:00
|
|
|
/// @note May be used from any thread.
|
2016-02-06 15:57:54 +00:00
|
|
|
class KeyframeManager : public ResourceManager
|
2015-12-12 17:52:06 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-11-18 20:48:47 +00:00
|
|
|
KeyframeManager(const VFS::Manager* vfs, SceneManager* sceneManager);
|
2015-12-12 17:52:06 +00:00
|
|
|
~KeyframeManager();
|
|
|
|
|
|
|
|
/// Retrieve a read-only keyframe resource by name (case-insensitive).
|
|
|
|
/// @note Throws an exception if the resource is not found.
|
2020-11-18 20:48:47 +00:00
|
|
|
osg::ref_ptr<const SceneUtil::KeyframeHolder> get(const std::string& name);
|
2017-02-22 01:18:18 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void reportStats(unsigned int frameNumber, osg::Stats* stats) const override;
|
2020-11-18 20:48:47 +00:00
|
|
|
private:
|
|
|
|
SceneManager* mSceneManager;
|
2015-12-12 17:52:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|