augment_manager_v2_impl.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef DEPTHGUIDE_AUGMENT_MANAGER_V2_IMPL_H
  2. #define DEPTHGUIDE_AUGMENT_MANAGER_V2_IMPL_H
  3. #include "module/augment_manager_v2.h"
  4. #include <imGuIZMOquat.h>
  5. struct augment_manager_v2::impl {
  6. using item_base_type = create_config::item_type;
  7. struct item_store_type : public item_base_type {
  8. // for all
  9. bool visible = true;
  10. float alpha = 1.0f;
  11. // for image
  12. bool flip_y = false;
  13. // for mesh
  14. float ambient_factor = 0.5f;
  15. bool enable_depth_alpha = false;
  16. float alpha_factor = 0.1;
  17. // for pc
  18. float point_size = 1.0f;
  19. // for mesh and pc
  20. glm::vec3 color = {1.0f, 0.0f, 0.0f};
  21. glm::vec3 extra_offset;
  22. glm::vec3 extra_rotation;
  23. glm::mat4 base_transform = glm::mat4(1.0f);
  24. bool is_tracked = true;
  25. // combined from extra_offset and extra_rotation
  26. glm::mat4 extra_transform() const;
  27. glm::mat4 get_transform() const;
  28. void update_transform(impl *pimpl);
  29. };
  30. augment_manager_v2 *q_this = nullptr;
  31. create_config conf;
  32. bool player_allow_control = false;
  33. using item_list_type =
  34. std::vector<item_store_type>;
  35. item_list_type item_list;
  36. scene_ptr last_scene_info;
  37. using sophiar_conn_type = create_config::sophiar_conn_type;
  38. sophiar_conn_type *sophiar_conn = nullptr;
  39. smart_cuda_stream *stream = nullptr;
  40. bool enable = true; // enable this module
  41. bool enable_light_follow_camera = false;
  42. bool ignore_missing = false; // show item even if missing from the tracker
  43. vgm::Vec3 light_direction = {0.0f, 0.0f, -1.0f};
  44. camera_augment_helper_v2 *cam_helper = nullptr;
  45. // low-level GL_POINT info
  46. struct {
  47. GLfloat min, max;
  48. } ps_range;
  49. GLfloat ps_interval;
  50. explicit impl(const create_config &conf);
  51. void update(const camera_info &info, bool no_commit = false);
  52. void render();
  53. void show();
  54. };
  55. #endif //DEPTHGUIDE_AUGMENT_MANAGER_V2_IMPL_H