Choreonoid  1.5
PointSetItem.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BASE_POINT_SET_ITEM_H
6 #define CNOID_BASE_POINT_SET_ITEM_H
7 
8 #include <cnoid/Item>
9 #include <cnoid/RectRegionMarker>
10 #include <cnoid/SceneProvider>
11 #include <boost/optional.hpp>
12 #include "exportdecl.h"
13 
14 namespace cnoid {
15 
16 class SgPointSet;
17 class PointSetItemImpl;
18 
20 {
21 public:
22  static void initializeClass(ExtensionManager* ext);
23 
24  PointSetItem();
25  PointSetItem(const PointSetItem& org);
26  virtual ~PointSetItem();
27 
28  virtual void setName(const std::string& name);
29  virtual SgNode* getScene();
30 
31  const SgPointSet* pointSet() const;
32  SgPointSet* pointSet();
33 
34  virtual void notifyUpdate();
35 
36  const Affine3& offsetTransform() const;
37  void setOffsetTransform(const Affine3& T);
38  SignalProxy<void(const Affine3& T)> sigOffsetTransformChanged();
39  void notifyOffsetTransformChange();
40 
41  SgPointSet* getTransformedPointSet() const;
42 
44  POINT, VOXEL, N_RENDERING_MODES
45  };
46 
47  void setRenderingMode(int mode);
48  int renderingMode() const;
49 
50  void setPointSize(double size);
51  double pointSize() const;
52 
53  double voxelSize() const;
54  void setVoxelSize(double size);
55 
56  void setEditable(bool on);
57  bool isEditable() const;
58 
59  int numAttentionPoints() const;
60  Vector3 attentionPoint(int index) const;
61  void clearAttentionPoints();
62  void addAttentionPoint(const Vector3& p);
63  SignalProxy<void()> sigAttentionPointsChanged();
64  void notifyAttentionPointChange();
65 
66  boost::optional<Vector3> attentionPoint() const; // deprecated
67  SignalProxy<void()> sigAttentionPointChanged(); // deprecated
68  void clearAttentionPoint(); // deprecated
69  void setAttentionPoint(const Vector3& p); // deprecated
70 
71  void removePoints(const PolyhedralRegion& region);
72 
73  SignalProxy<void(const PolyhedralRegion& region)> sigPointsInRegionRemoved();
74 
75  virtual bool store(Archive& archive);
76  virtual bool restore(const Archive& archive);
77 
78 protected:
79  virtual Item* doDuplicate() const;
80  virtual void doPutProperties(PutPropertyFunction& putProperty);
81 
82 private:
83  PointSetItemImpl* impl;
84  void initialize();
85 };
86 
88 }
89 
90 #endif
Definition: SceneProvider.h:16
Definition: SceneGraph.h:142
Definition: Archive.h:21
Definition: PointSetItem.h:44
Definition: ExtensionManager.h:26
Definition: SceneDrawables.h:509
Eigen::Affine3d Affine3
Definition: EigenTypes.h:64
Definition: PutPropertyFunction.h:35
Definition: PolyhedralRegion.h:13
Definition: Referenced.h:128
Definition: Item.h:38
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
RenderingMode
Definition: PointSetItem.h:43
ref_ptr< PointSetItem > PointSetItemPtr
Definition: PointSetItem.h:87
Eigen::Vector3d Vector3
Definition: EigenTypes.h:58
Definition: PointSetItem.h:19
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
Definition: Signal.h:380