libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
PointCloud.hpp
1 #ifndef POINTS_H
2 #define POINTS_H
3 
4 
5 
6 #include <Eigen/Core>
7 #include <Eigen/Geometry>
8 #include <vector>
9 
16 {
17 public:
18  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
19 
20  PointCloud();
21  PointCloud(double PointSize);
22 
23  void push_back(Eigen::Vector3d point);
24 
25  void clear()
26  {
27  m_AllPoints.clear();
28  }
29 
30  unsigned int size()
31  {
32  return m_AllPoints.size();
33  }
34 
35  void resize(unsigned int sz)
36  {
37  m_AllPoints.resize(sz);
38  }
39 
43  Eigen::Vector3d& operator [] ( const int &i ) { return m_AllPoints[i]; }
44 
45 
46  void drawAllPoints(double* color = NULL);
47  void drawAllPoints(const Eigen::Affine3d & t, double* color = NULL );
48 
49 private:
50  void drawOnePoint(bool withTransform, const Eigen::Affine3d & t, int i);
51 
52  std::vector< Eigen::Vector3d > m_AllPoints;
53  Eigen::Vector3d m_CubeSize;
54 };
55 
56 extern PointCloud* PointsToDraw;
57 
58 #endif // POINTS_H
Eigen::Vector3d & operator[](const int &i)
Acces the configuration.
Definition: PointCloud.hpp:43
! Vector of 3d points that can be ploted in the 3d viewer as cubes very fast ! the points are stored ...
Definition: PointCloud.hpp:15