augment_manager_impl.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef DEPTHGUIDE_AUGMENT_MANAGER_IMPL_H
  2. #define DEPTHGUIDE_AUGMENT_MANAGER_IMPL_H
  3. #include "module/augment_manager.h"
  4. #include "render_v3/scene_render.h"
  5. #include <imGuIZMOquat.h>
  6. #include <Eigen/Geometry>
  7. struct augment_manager::impl {
  8. using item_store_base_type = create_config::item_type;
  9. struct item_store_type : public item_store_base_type {
  10. using actor_type = scene_render::actor_token_type;
  11. actor_type actor = nullptr;
  12. actor_type bg_actor = nullptr;
  13. bool visible = true;
  14. glm::vec3 color = {1.0f, 0.0f, 0.0f};
  15. float ambient_factor = 0.5f;
  16. float alpha_factor = 0.25f;
  17. glm::vec3 extra_offset;
  18. glm::vec3 extra_rotation;
  19. // combined from extra_offset and extra_rotation
  20. glm::mat4 extra_transform() const;
  21. void update_color();
  22. };
  23. using item_pool_type =
  24. std::unordered_map<std::string, item_store_type>;
  25. item_pool_type item_pool;
  26. using sophiar_conn_type = create_config::sophiar_conn_type;
  27. sophiar_conn_type *sophiar_conn = nullptr;
  28. bool enable = true; // enable this module
  29. bool enable_light_follow_camera = false;
  30. bool ignore_missing = false; // show item even if missing from the tracker
  31. vgm::Vec3 light_direction = {1.0f, 0.0f, 0.0f};
  32. scene_render ren;
  33. explicit impl(const create_config &conf);
  34. void update_scene();
  35. void render(const camera_info &info);
  36. void show();
  37. };
  38. #endif //DEPTHGUIDE_AUGMENT_MANAGER_IMPL_H