三维频谱marker
This commit is contained in:
@@ -16,6 +16,18 @@ enum class Camera_Projection : std::uint8_t {
|
||||
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{};
|
||||
@@ -23,7 +35,7 @@ struct Camera_View {
|
||||
bool operator==(const Camera_View&) const = default;
|
||||
};
|
||||
|
||||
struct Camera_Control {
|
||||
struct Camera_Turntable_Control {
|
||||
double yaw_speed{0.20};
|
||||
double pitch_speed{0.20};
|
||||
double zoom_speed{0.10};
|
||||
@@ -35,13 +47,44 @@ struct Camera_Control {
|
||||
bool rotate_enabled{true};
|
||||
bool zoom_enabled{true};
|
||||
bool pan_enabled{true};
|
||||
bool operator==(const Camera_Control&) const = default;
|
||||
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_Control control{};
|
||||
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};
|
||||
|
||||
Reference in New Issue
Block a user