#ifndef CCLOUDSHOW_H #define CCLOUDSHOW_H #include #include #include #include #include #include #include "ICloudShow.h" class vtkOrientationMarkerWidget; class CCloudShow : public ICloudShow { public: CCloudShow(); ~CCloudShow() override; int Show(ICloudShow::PointCloudPtr cloud, const std::string& windowName = "PointCloud") override; int Start(const std::string& windowName = "PointCloud") override; int UpdateCloud(PointCloudPtr cloud) override; int Stop() override; int SpinOnce(int ms = 1) override; bool IsRunning() const override; int SaveToTxt(const std::string& fileName, PointCloudPtr cloud) override; bool IsQuitRequested() const override; bool IsSaveRequested() const override; void ClearSaveRequest() override; private: static void keyboardCallback(const pcl::visualization::KeyboardEvent& event, void* cookie); std::shared_ptr m_viewer; std::atomic m_bRunning{false}; std::mutex m_cloudMutex; ICloudShow::PointCloudPtr m_currentCloud; bool m_bUpdated = false; bool m_bFirstCloud = true; std::string m_windowName; vtkOrientationMarkerWidget* m_axesWidget = nullptr; std::atomic m_bQuitRequested{false}; std::atomic m_bSaveRequested{false}; }; #endif // CCLOUDSHOW_H