Choreonoid  1.8
BodyMotionEngine.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODYPLUGIN_BODY_MOTION_ENGINE_H
7 #define CNOID_BODYPLUGIN_BODY_MOTION_ENGINE_H
8 
9 #include <cnoid/TimeSyncItemEngine>
10 #include <string>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
15 class ExtensionManager;
16 class BodyItem;
17 class BodyMotionItem;
18 class AbstractSeqItem;
19 
20 
21 class CNOID_EXPORT BodyMotionEngine : public TimeSyncItemEngine
22 {
23 public:
24  static void initializeClass(ExtensionManager* ext);
25 
26  static void addExtraSeqEngineFactory(
27  const std::string& key, std::function<TimeSyncItemEngine*(BodyItem* bodyItem, AbstractSeqItem* seqItem)> factory);
28 
29  BodyMotionEngine(BodyItem* bodyItem, BodyMotionItem* motionItem);
30  virtual ~BodyMotionEngine();
31 
32  BodyItem* bodyItem();
33  BodyMotionItem* motionItem();
34 
35  virtual void onPlaybackStarted(double time) override;
36  virtual bool onTimeChanged(double time) override;
37  virtual void onPlaybackStopped(double time, bool isStoppedManually) override;
38 
39 private:
40  class Impl;
41  Impl* impl;
42 };
43 
45 
46 }
47 
48 #endif
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::TimeSyncItemEngine
Definition: TimeSyncItemEngine.h:17
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid::BodyMotionItem
Definition: BodyMotionItem.h:18
cnoid::BodyItem
Definition: BodyItem.h:28
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::AbstractSeqItem
Definition: AbstractSeqItem.h:15
cnoid::BodyMotionEngine
Definition: BodyMotionEngine.h:21
cnoid::BodyMotionEnginePtr
ref_ptr< BodyMotionEngine > BodyMotionEnginePtr
Definition: BodyMotionEngine.h:44