架构大改之前
This commit is contained in:
@@ -26,6 +26,7 @@ enum class Frame_Trace_Marker : std::uint8_t {
|
||||
scene_render_finished,
|
||||
callback_started,
|
||||
callback_finished,
|
||||
video_encode_queued,
|
||||
video_encode_started,
|
||||
video_encode_finished,
|
||||
stream_publish_started,
|
||||
@@ -43,6 +44,7 @@ enum class Frame_Trace_Measurement : std::uint8_t {
|
||||
gpu_copy_ns,
|
||||
gpu_total_ns,
|
||||
readback_ns,
|
||||
stream_publish_tail_ns,
|
||||
count
|
||||
};
|
||||
struct Frame_Identity {
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace aethera::plot {
|
||||
|
||||
struct Spatial_Point {
|
||||
double x{};
|
||||
double y{};
|
||||
double z{};
|
||||
bool operator==(const Spatial_Point&) const = default;
|
||||
};
|
||||
|
||||
enum class Camera_Projection : std::uint8_t {
|
||||
perspective,
|
||||
orthographic
|
||||
};
|
||||
|
||||
enum class Camera_Controller : std::uint8_t {
|
||||
turntable,
|
||||
arcball,
|
||||
fly,
|
||||
panzoom
|
||||
};
|
||||
|
||||
enum class Camera_Fly_Mode : std::uint8_t {
|
||||
free,
|
||||
plane
|
||||
};
|
||||
|
||||
struct Camera_View {
|
||||
Spatial_Point eye{2.8, -3.2, 2.4};
|
||||
Spatial_Point target{};
|
||||
Spatial_Point up{0.0, 0.0, 1.0};
|
||||
bool operator==(const Camera_View&) const = default;
|
||||
};
|
||||
|
||||
struct Camera_Turntable_Control {
|
||||
double yaw_speed{0.20};
|
||||
double pitch_speed{0.20};
|
||||
double zoom_speed{0.10};
|
||||
double pan_speed{0.002};
|
||||
double minimum_pitch{-1.45};
|
||||
double maximum_pitch{1.45};
|
||||
double minimum_distance{0.25};
|
||||
double maximum_distance{50.0};
|
||||
bool rotate_enabled{true};
|
||||
bool zoom_enabled{true};
|
||||
bool pan_enabled{true};
|
||||
bool invert_y{};
|
||||
bool operator==(const Camera_Turntable_Control&) const = default;
|
||||
};
|
||||
|
||||
struct Camera_Arcball_Control {
|
||||
Spatial_Point constraint_axis{0.0, 0.0, 1.0};
|
||||
bool constrain_rotation{};
|
||||
bool operator==(const Camera_Arcball_Control&) const = default;
|
||||
};
|
||||
|
||||
struct Camera_Fly_Control {
|
||||
Camera_Fly_Mode mode{Camera_Fly_Mode::free};
|
||||
double movement_speed{1.0};
|
||||
double fast_multiplier{4.0};
|
||||
double slow_multiplier{0.25};
|
||||
double look_speed{0.0025};
|
||||
double wheel_speed{0.5};
|
||||
bool invert_y{};
|
||||
bool fixed_up{true};
|
||||
bool disable_roll{true};
|
||||
bool operator==(const Camera_Fly_Control&) const = default;
|
||||
};
|
||||
|
||||
struct Camera_Panzoom_Control {
|
||||
bool fixed_x{};
|
||||
bool fixed_y{};
|
||||
bool keep_aspect{true};
|
||||
bool operator==(const Camera_Panzoom_Control&) const = default;
|
||||
};
|
||||
|
||||
struct Camera_Descriptor {
|
||||
Camera_View initial_view{};
|
||||
Camera_Projection projection{Camera_Projection::perspective};
|
||||
Camera_Controller controller{Camera_Controller::turntable};
|
||||
Camera_Turntable_Control turntable_control{};
|
||||
Camera_Arcball_Control arcball_control{};
|
||||
Camera_Fly_Control fly_control{};
|
||||
Camera_Panzoom_Control panzoom_control{};
|
||||
double vertical_field_of_view_degrees{45.0};
|
||||
double near_plane{0.01};
|
||||
double far_plane{100.0};
|
||||
bool operator==(const Camera_Descriptor&) const = default;
|
||||
};
|
||||
|
||||
} // namespace aethera::plot
|
||||
Reference in New Issue
Block a user