00001
00060 #ifndef SHAPE_H_
00061 #define SHAPE_H_
00062
00063 #include <Eigen/Core>
00064 #include <boost/shared_ptr.hpp>
00065 #include <boost/make_shared.hpp>
00066
00067 #include <Eigen/Eigenvalues>
00068 #include <Eigen/Geometry>
00069 #include <vector>
00070
00071 namespace cob_3d_mapping
00072 {
00073
00078 class Shape
00079
00080 {
00081 public:
00086 typedef boost::shared_ptr<Shape> Ptr;
00087
00088 public:
00092 Shape()
00093 : id(0)
00094 , merged(1)
00095 , centroid(Eigen::Vector4f::Zero())
00096 , color(4,1)
00097 { }
00098
00102 virtual ~Shape() { }
00103
00108 virtual void transform2tf(const Eigen::Affine3f& trafo)=0;
00109
00110 double computeDistanceFromViewpoint() {return centroid.norm();}
00111
00112 unsigned int id;
00113 unsigned int merged;
00114 unsigned int frame_stamp;
00115 Eigen::Vector4f centroid;
00116 std::vector<float> color;
00117 };
00118
00119 typedef boost::shared_ptr<Shape> ShapePtr;
00121 }
00122
00123
00124 #endif