Choreonoid  1.8
BodyElementOverwriteItem.h
Go to the documentation of this file.
1 #ifndef CNOID_BODY_PLUGIN_BODY_ELEMENT_OVERWRITE_ITEM_H
2 #define CNOID_BODY_PLUGIN_BODY_ELEMENT_OVERWRITE_ITEM_H
3 
4 #include <cnoid/Item>
5 #include "exportdecl.h"
6 
7 namespace cnoid {
8 
9 class BodyItem;
10 class BodyOverwriteAddon;
11 
15 class CNOID_EXPORT BodyElementOverwriteItem : public Item
16 {
17 public:
18  static void initializeClass(ExtensionManager* ext);
19 
20  BodyItem* bodyItem() { return bodyItem_; }
21  BodyOverwriteAddon* bodyOverwrite();
22 
23 protected:
26 
27  void setBodyItem(BodyItem* item) { bodyItem_ = item; }
28 
30  BodyItem* newBodyItem() { return newBodyItem_; }
31 
32  virtual bool onNewTreePositionCheck(
33  bool isManualOperation, std::function<void()>& out_callbackWhenAdded) override final;
34  virtual void onTreePathChanged() override final;
35  virtual bool onCheckNewOverwritePosition(bool isManualOperation);
36  virtual void onDisconnectedFromBodyItem();
37 
38 private:
39  BodyItem* bodyItem_;
40  BodyItem* newBodyItem_;
41  bool isNewBodyItemValid;
42 };
43 
45 
46 }
47 
48 #endif
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::BodyElementOverwriteItem::setBodyItem
void setBodyItem(BodyItem *item)
Definition: BodyElementOverwriteItem.h:27
cnoid::BodyElementOverwriteItem::bodyItem
BodyItem * bodyItem()
Definition: BodyElementOverwriteItem.h:20
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid::BodyItem
Definition: BodyItem.h:28
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::BodyElementOverwriteItem::newBodyItem
BodyItem * newBodyItem()
The next candidate of the target BodyItem when the item position is updated.
Definition: BodyElementOverwriteItem.h:30
cnoid::BodyElementOverwriteItem
Definition: BodyElementOverwriteItem.h:15
cnoid::BodyOverwriteAddon
Definition: BodyOverwriteAddon.h:16