augment_renderer.h 987 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef REMOTEAR2_AUGMENT_RENDERER_H
  2. #define REMOTEAR2_AUGMENT_RENDERER_H
  3. #include "scene_manager.hpp"
  4. #include "texture_renderer.h"
  5. #include <opencv2/core/cuda.hpp>
  6. #include <Eigen/Geometry>
  7. #include <memory>
  8. #include <string_view>
  9. class vtkActor;
  10. class augment_renderer {
  11. public:
  12. struct camera_info {
  13. int width, height;
  14. float angle;
  15. void *remap_data;
  16. };
  17. augment_renderer(const camera_info *cam_info, cv::Size bg_size);
  18. ~augment_renderer();
  19. void set_background(const cv::cuda::GpuMat *background);
  20. static void add_scene(scene_manager *scene);
  21. void set_camera_pose(const Eigen::Isometry3d &pose);
  22. void enable_augment(bool enable);
  23. struct render_config {
  24. float x, y;
  25. float width, height;
  26. };
  27. bool render(const render_config &config, cv::cuda::Stream &stream = cv::cuda::Stream::Null());
  28. private:
  29. struct impl;
  30. std::unique_ptr<impl> pimpl;
  31. };
  32. #endif //REMOTEAR2_AUGMENT_RENDERER_H