Choreonoid  1.8
BodyTrackingCameraItem.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODY_PLUGIN_BODY_TRACKING_CAMERA_ITEM_H
7 #define CNOID_BODY_PLUGIN_BODY_TRACKING_CAMERA_ITEM_H
8 
9 #include <cnoid/Item>
10 #include <cnoid/RenderableItem>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
15 class SgCamera;
16 class SgPosTransform;
17 
18 class CNOID_EXPORT BodyTrackingCameraItem : public Item, public RenderableItem
19 {
20 public:
21  static void initializeClass(ExtensionManager* ext);
22 
23  enum CameraType {
27  // deprecated
28  PERSPECTIVE = Perspective,
29  ORTHOGRAPHIC = Orthographic,
30  N_CAMERA_TYPE
31  };
32 
36 
37  virtual bool setName(const std::string& name) override;
38 
39  void setTargetLink(const std::string& name);
40  const std::string& targetLinkName() const;
41  void setRotationSyncEnabled(bool on);
42  bool isRotationSyncEnabled() const;
43  void setCameraType(CameraType type);
44  CameraType cameraType() const;
45  SgCamera* currentCamera();
46  SgPosTransform* cameraTransform();
47 
48  // RenderableItem
49  virtual SgNode* getScene() override;
50 
51 protected:
52  virtual Item* doDuplicate() const override;
53  virtual void onTreePathChanged() override;
54  virtual void doPutProperties(PutPropertyFunction& putProperty) override;
55  virtual bool store(Archive& archive) override;
56  virtual bool restore(const Archive& archive) override;
57 
58 private:
59  class Impl;
60  Impl* impl;
61 };
62 
64 
65 }
66 
67 #endif
cnoid::SgPosTransform
Definition: SceneGraph.h:357
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::PutPropertyFunction
Definition: PutPropertyFunction.h:51
cnoid::SgCamera
Definition: SceneCameras.h:14
cnoid::Archive
Definition: Archive.h:22
cnoid::BodyTrackingCameraItem::Orthographic
@ Orthographic
Definition: BodyTrackingCameraItem.h:25
cnoid::BodyTrackingCameraItem
Definition: BodyTrackingCameraItem.h:18
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::BodyTrackingCameraItem::NumCameraTypes
@ NumCameraTypes
Definition: BodyTrackingCameraItem.h:26
cnoid::RenderableItem
Definition: RenderableItem.h:11
cnoid::BodyTrackingCameraItem::Perspective
@ Perspective
Definition: BodyTrackingCameraItem.h:24
cnoid::BodyTrackingCameraItem::CameraType
CameraType
Definition: BodyTrackingCameraItem.h:23
cnoid::SgNode
Definition: SceneGraph.h:157
cnoid::BodyTrackingCameraItemPtr
ref_ptr< BodyTrackingCameraItem > BodyTrackingCameraItemPtr
Definition: BodyTrackingCameraItem.h:63