Choreonoid  1.5
SceneItem.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BASE_SCENE_ITEM_H
6 #define CNOID_BASE_SCENE_ITEM_H
7 
8 #include "Item.h"
9 #include <cnoid/SceneGraph>
10 #include <cnoid/SceneProvider>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
15 class CNOID_EXPORT SceneItem : public Item, public SceneProvider
16 {
17 public:
18  static void initializeClass(ExtensionManager* ext);
19 
20  SceneItem();
21  SceneItem(const SceneItem& org);
22  virtual ~SceneItem();
23 
24  virtual void setName(const std::string& name);
25  virtual SgNode* getScene();
26 
27  SgPosTransform* topNode() { return topNode_; }
28  const SgPosTransform* topNode() const { return topNode_; }
29 
30 protected:
31  virtual Item* doDuplicate() const;
32  virtual bool store(Archive& archive);
33  virtual bool restore(const Archive& archive);
34  virtual void doPutProperties(PutPropertyFunction& putProperty);
35 
36 private:
37  SgPosTransformPtr topNode_;
38 
39  bool onTranslationChanged(const std::string& value);
40  bool onRotationChanged(const std::string& value);
41 };
42 
44 }
45 
46 #endif
Definition: SceneProvider.h:16
Definition: SceneItem.h:15
Definition: SceneGraph.h:142
Definition: Archive.h:21
Definition: ExtensionManager.h:26
Definition: PutPropertyFunction.h:35
Definition: SceneGraph.h:279
ref_ptr< SceneItem > SceneItemPtr
Definition: SceneItem.h:43
const SgPosTransform * topNode() const
Definition: SceneItem.h:28
Definition: Item.h:38
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
SgPosTransform * topNode()
Definition: SceneItem.h:27