00001 00020 #ifndef NTK_MESH_MESHGENERATOR_H 00021 #define NTK_MESH_MESHGENERATOR_H 00022 00023 #include <ntk/core.h> 00024 #include <ntk/camera/calibration.h> 00025 #include <ntk/mesh/mesh.h> 00026 00027 namespace ntk 00028 { 00029 00030 class Pose3D; 00031 00032 class MeshGenerator 00033 { 00034 public: 00035 enum MeshType { PointCloudMesh = 0 }; 00036 public: 00037 MeshGenerator(); 00038 00039 public: 00040 const ntk::Mesh& mesh() { return m_mesh; } 00041 00042 void generatePointCloudMesh(const RGBDImage& image, const Pose3D& depth_pose, const Pose3D& rgb_pose); 00043 void setUseColor(bool use_it) { m_use_color = use_it; } 00044 bool useColor() const { return m_use_color; } 00045 void setMeshType(MeshType type) { m_mesh_type = type; } 00046 void setResolutionFactor(double f); 00047 void setMaxNormalAngle(double angle_in_degrees) { m_max_normal_angle = angle_in_degrees; } 00048 00049 public: 00050 void generate(const RGBDImage& image, 00051 const Pose3D& depth_pose = Pose3D(), 00052 const Pose3D& rgb_pose = Pose3D()); 00053 00054 private: 00055 ntk::Mesh m_mesh; 00056 bool m_use_color; 00057 MeshType m_mesh_type; 00058 double m_resolution_factor; 00059 double m_max_normal_angle; 00060 }; 00061 00062 } // ntk 00063 00064 #endif // NTK_MESH_MESHGENERATOR_H