TDME2  1.9.200
CameraRotationInputHandler.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <tdme/tdme.h>
4 #include <tdme/engine/fwd-tdme.h>
9 
15 
16 /**
17  * Camera Rotation Input Handler
18  * @author Andreas Drewke
19  */
21  : public GUIInputEventHandler
22 {
23 private:
24  Engine* engine { nullptr };
26  bool keyLeft;
27  bool keyRight;
28  bool keyUp;
29  bool keyDown;
30  bool keyPeriod;
31  bool keyComma;
32  bool keyPlus;
33  bool keyMinus;
34  bool keyR;
38  float defaultScale;
39  float scale;
43 
44 public:
45  // forbid class copy
47 
48  /**
49  * Public constructor
50  * @param engine engine
51  * @param eventHandler event handler
52  */
54 
55  /**
56  * Destructor
57  */
59 
60  /**
61  * @return look from rotation
62  */
64 
65  /**
66  * @return default scale
67  */
68  inline float getDefaultScale() {
69  return defaultScale;
70  }
71 
72  /**
73  * Set default scale
74  * @param scale default scale
75  */
76  inline void setDefaultScale(float defaultScale) {
77  this->defaultScale = defaultScale;
78  }
79 
80  /**
81  * @return scale
82  */
83  inline float getScale() {
84  return scale;
85  }
86 
87  /**
88  * Set scale
89  * @param scale scale
90  */
91  inline void setScale(float scale) {
92  this->scale = scale;
93  }
94 
95  /**
96  * Reset
97  */
98  void reset();
99 
100  // overridden methods
101  void handleInputEvents() override;
102 
103 };
Engine main class.
Definition: Engine.h:131
Transform which contain scale, rotations and translation.
Definition: Transform.h:29
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
Definition: BoundingBox.h:26
void handleInputEvents() override
Handle input events that have not yet been processed.
void setDefaultScale(float defaultScale)
Set default scale.
CameraRotationInputHandler(Engine *engine, CameraRotationInputHandlerEventHandler *eventHandler=nullptr)
Public constructor.
GUI input event handler interface.
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6