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 00091 Shape() 00092 : id_(0) 00093 , merged_(1) 00094 , merged_limit_(10) 00095 , frame_stamp_(0) 00096 , pose_(Eigen::Affine3f::Identity()) 00097 , color_(4,1) 00098 { } 00099 00103 virtual ~Shape() { } 00104 00109 virtual void transform(const Eigen::Affine3f& trafo)=0; 00110 00116 double computeDistanceFromViewpoint() {return pose_.translation().norm();} 00117 00118 unsigned int id_; 00119 unsigned int merged_; 00120 unsigned int merged_limit_; 00121 unsigned int frame_stamp_; 00122 //Eigen::Vector4f centroid;/**< Centroid of shape. */ 00123 Eigen::Affine3f pose_; 00124 std::vector<float> color_; 00125 }; 00126 00127 typedef boost::shared_ptr<Shape> ShapePtr; 00129 } 00130 00131 00132 #endif /* SHAPE_H_ */