scenepic 1.1.0
3D Visualization Made Easy
ui_parameters.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#ifndef _SCENEPIC_UI_PARAMETERS_H_
5#define _SCENEPIC_UI_PARAMETERS_H_
6
7#include "json_value.h"
8
9#include <string>
10
11namespace scenepic
12{
15 {
16 public:
30 double pointer_alt_key_multiplier = 0.2,
31 double pointer_rotation_speed = 0.01,
32 double mouse_wheel_translation_speed = 0.005,
33 double key_down_speed = 0.1,
34 const std::string& layer_dropdown_visibility = "visible");
35
38
40 double pointer_rotation_speed() const;
41
44
46 double key_down_speed() const;
47
49 const std::string& layer_dropdown_visibility() const;
50
52 std::string to_string() const;
53
58
60 bool is_none() const;
61
63 static const UIParameters None();
64
65 private:
66 double m_pointer_alt_key_multiplier;
67 double m_pointer_rotation_speed;
68 double m_mouse_wheel_translation_speed;
69 double m_key_down_speed;
70 std::string m_layer_dropdown_visibility;
71 };
72} // namespace scenepic
73
74#endif
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
Per-Canvas3D parameters of the ScenePic user interface.
Definition: ui_parameters.h:15
double pointer_alt_key_multiplier() const
When the Alt key is pressed, mouse movement is scaled by this factor.
bool is_none() const
Whether this is a "no ui parameters" instance.
JsonValue to_json() const
Convert this object into ScenePic json.
double key_down_speed() const
Movement speed from key presses.
UIParameters(double pointer_alt_key_multiplier=0.2, double pointer_rotation_speed=0.01, double mouse_wheel_translation_speed=0.005, double key_down_speed=0.1, const std::string &layer_dropdown_visibility="visible")
Constructor.
const std::string & layer_dropdown_visibility() const
Whether the layer dropdown is visible.
double pointer_rotation_speed() const
Linear scale factor of pointer translation into camera rotation.
std::string to_string() const
Return a JSON string representing the object.
static const UIParameters None()
A UIParameters value indicating "no ui parameters".
double mouse_wheel_translation_speed() const
Linear scale factor of mouse wheel input into camera translation.
Definition: audio_track.h:14