Files
Webcam/include/engine/motion/scene_motion.h
2026-06-22 11:49:35 +02:00

47 lines
982 B
C++

/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NMOTIONSET__
#define __NMOTIONSET__
#include "motion/motion.h"
#include "container/nmap.h"
namespace GS {
namespace Core {
/// A motion set holds a reference to several motions.
struct SceneMotion
{
String name;
struct ItemMotion
{
uint uid;
SharedPtr <Motion> motion;
};
AutoList <ItemMotion *> item_motions;
void Clone(const SceneMotion &src, const TimeRange &range, bool enforce_loop);
Motion *GetItemMotion(uint uid, bool create_if_missing = false);
TimeRange GetTimeRange() const;
Time GetDuration() const { return GetTimeRange().valueRange(); }
bool FromMetaTag(NML::Tag &, const Map <uint, uint> *uid_map = 0);
NML::Tag *AsMetaTag();
};
} // Core
} // GS
#endif // __NMOTIONSET__