TDME2  1.9.200
EnvMapEditorTabView.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
6 #include <tdme/tdme.h>
7 #include <tdme/engine/fwd-tdme.h>
10 #include <tdme/math/Vector3.h>
17 
18 using std::string;
19 using std::unique_ptr;
20 
31 
32 /**
33  * Environmap editor tab view
34  * @author Andreas Drewke
35  */
37  : public TabView
38 {
39 protected:
40  unique_ptr<Engine> engine;
41 
42 private:
43  EditorView* editorView { nullptr };
44  string tabId;
45  PopUps* popUps { nullptr };
46  unique_ptr<EnvMapEditorTabController> envMapEditorTabController;
48  unique_ptr<Scene> scene;
49  unique_ptr<Prototype> prototype;
50 
51 public:
52  // forbid class copy
54 
55  /**
56  * Public constructor
57  * @param editorView editor view
58  * @param tabId tab id
59  * @param scene scene
60  * @param prototype prototype
61  */
63 
64  /**
65  * Destructor
66  */
68 
69  /**
70  * @return prototype
71  */
72  inline Prototype* getPrototype() {
73  return prototype.get();
74  }
75 
76  /**
77  * @return editor view
78  */
80  return editorView;
81  }
82 
83  /**
84  * @return associated tab controller
85  */
86  inline TabController* getTabController() override {
87  return envMapEditorTabController.get();
88  }
89 
90  /**
91  * @return pop up views
92  */
93  inline PopUps* getPopUps() {
94  return popUps;
95  }
96 
97  // overridden methods
98  void handleInputEvents() override;
99  void display() override;
100  inline const string& getTabId() override {
101  return tabId;
102  }
103  void initialize() override;
104  void dispose() override;
105  Engine* getEngine() override;
106  void activate() override;
107  void deactivate() override;
108  void reloadOutliner() override;
109  void updateRendering() override;
110  inline bool hasFixedSize() override{ return false; };
111 
112  /**
113  * @return environment map translation
114  */
116 
117  /**
118  * Set environment map translation
119  * @param translation translation
120  */
121  void setEnvironmentMapTranslation(const Vector3& translation);
122 
123  /**
124  * @return environment map render passes
125  */
127 
128  /**
129  * Set environment map render passes
130  * @param renderPassMask render pass mask
131  */
132  void setEnvironmentMapRenderPassMask(int32_t renderPassMask);
133 
134  /**
135  * @return environment map frequency
136  */
137  int64_t getEnvironmentMapFrequency();
138 
139  /**
140  * Set environment map frequency
141  * @param frequency frequency
142  */
143  void setEnvironmentMapFrequency(int64_t frequency);
144 
145  /**
146  * Saving prototype as tenvmap prototype
147  * @param pathName path name
148  * @param fileName file name
149  */
150  void saveFile(const string& pathName, const string& fileName);
151 
152 };
Engine main class.
Definition: Engine.h:131
Frame buffer class.
Definition: FrameBuffer.h:22
Prototype definition.
Definition: Prototype.h:55
Scene definition.
Definition: Scene.h:50
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Definition: Vector3.h:20
Pop ups controller accessor class.
Definition: PopUps.h:29
void saveFile(const string &pathName, const string &fileName)
Saving prototype as tenvmap prototype.
bool hasFixedSize() override
If this viewport framebuffer has a fixed size.
EnvMapEditorTabView(EditorView *editorView, const string &tabId, Scene *scene, Prototype *prototype)
Public constructor.
void handleInputEvents() override
Handle input events that have not yet been processed.
void setEnvironmentMapTranslation(const Vector3 &translation)
Set environment map translation.
unique_ptr< EnvMapEditorTabController > envMapEditorTabController
void setEnvironmentMapRenderPassMask(int32_t renderPassMask)
Set environment map render passes.
void setEnvironmentMapFrequency(int64_t frequency)
Set environment map frequency.
Tab controller, which connects UI with logic.
Definition: TabController.h:34
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6