20 #ifndef ANTKEEPER_TREADMILL_EXPERIMENT_STATE_HPP
21 #define ANTKEEPER_TREADMILL_EXPERIMENT_STATE_HPP
46 void create_third_person_camera_rig();
47 void destroy_third_person_camera_rig();
49 void set_third_person_camera_zoom(
double zoom);
50 void set_third_person_camera_rotation(
double yaw,
double pitch);
52 void zoom_third_person_camera(
double zoom);
53 void translate_third_person_camera(
const math::dvec3& direction,
double magnitude);
58 void update_third_person_camera();
59 void load_camera_preset(std::uint8_t index);
60 void save_camera_preset(std::uint8_t index);
61 void load_or_save_camera_preset(std::uint8_t index);
65 void setup_controls();
67 std::vector<std::shared_ptr<::event::subscription>> action_subscriptions;
68 std::shared_ptr<::event::subscription> mouse_motion_subscription;
70 bool mouse_look{
false};
71 bool mouse_grip{
false};
72 bool mouse_zoom{
false};
78 entity::id third_person_camera_rig_eid{entt::null};
79 double third_person_camera_yaw{0.0};
81 math::dvec3 third_person_camera_focal_point{0.0, 0.0, 0.0};
82 double third_person_camera_zoom{0.25};
83 std::uint32_t third_person_camera_zoom_step_count{6};
85 double third_person_camera_near_focal_plane_height{1.0f};
86 double third_person_camera_far_focal_plane_height{50.0f};
92 double third_person_camera_speed{1.0f};
94 double third_person_camera_hfov{};
95 double third_person_camera_vfov{};
96 double third_person_camera_focal_plane_width{};
97 double third_person_camera_focal_plane_height{};
98 double third_person_camera_focal_distance{};
111 std::vector<std::optional<camera_preset>> camera_presets{10};
113 std::shared_ptr<render::matvar_fvec3> light_rectangle_emissive;
114 std::shared_ptr<scene::light_probe> light_probe;
119 std::shared_ptr<ant_phenome> worker_phenome;
120 std::shared_ptr<ik_rig> worker_ik_rig;
122 std::shared_ptr<scene::light_probe> sky_probe;
123 std::shared_ptr<scene::rectangle_light> area_light;
Abstract base class for game states.
treadmill_experiment_state(::game &ctx)
~treadmill_experiment_state() override
entt::entity id
Entity ID type.
Publish-subscribe messaging.
constexpr T radians(T degrees) noexcept
Converts an angle given in degrees to radians.
Half of a line proceeding from an initial point.
Quaternion composed of a real scalar part and imaginary vector part.
static constexpr quaternion identity() noexcept
Returns a rotation identity quaternion.