34#include <NDEVR/Camera.h>
35#include <NDEVR/MouseController.h>
36#include <NDEVR/ViewportLayout.h>
37#include <NDEVR/KeyController.h>
38#include <NDEVR/UUID.h>
39#include <NDEVR/Pointer.h>
40#include <NDEVR/Buffer.h>
41#include <NDEVR/Dictionary.h>
60 struct hash<
std::pair<NDEVR::UUID, NDEVR::UUID>>
77 size_t operator()(
const std::pair<NDEVR::UUID, NDEVR::UUID>& value)
const
79 hash<NDEVR::UUID> hasher;
80 return hasher(value.first) ^ hasher(value.second);
94 struct equal_to<
std::pair<NDEVR::UUID, NDEVR::UUID>>
112 bool operator()(
const std::pair<NDEVR::UUID, NDEVR::UUID>& x,
const std::pair<NDEVR::UUID, NDEVR::UUID>& y)
const
120 class KeyControllerBase;
121 class MouseControllerBase;
122 class MouseController;
129 class CameraOrientationSync;
130 class CameraOffsetSync;
132 CameraManager(DesignObjectBase& base);
134 void addCamera(DynamicPointer<Camera> camera);
135 const ConstPointer<SnapsManager>& snapsManager()
const
137 return m_snap_manager;
139 const DynamicPointer<SnapsManager>& snapsManager()
141 return m_snap_manager;
143 void update(
const Time& time,
const DesignObjectLookup* lookup);
144 const DynamicPointer<MouseController>& mouseController(UUID
id)
146 return m_mouse_controllers.get(
id);
148 const DynamicPointer<KeyController>& keyController(UUID
id)
150 return m_key_controllers.get(
id);
152 DynamicPointer<Camera> createCamera(Model& parent, ViewportFormat format);
153 void updateCamera(
const ViewportFormat& format);
154 bool hasCamera(UUID
id)
const;
155 const DynamicPointer<Camera>& getCamera(UUID
id)
const
157 return m_cameras.get(
id);
159 const DynamicPointer<Camera>& getCamera(UUID
id)
161 return m_cameras.get(
id);
163 uint04 cameraCount()
const
165 return m_cameras.size();
168 uint04 userCameraCount()
const;
169 DynamicPointer<Camera> selectedCamera()
const;
170 Buffer<DynamicPointer<Camera>> userCameras()
const;
171 Buffer<UUID> userCameraIDs()
const;
172 Buffer<UUID> cameraIDs()
const;
173 void setSkybox(UUID camera, Skybox* skybox);
174 Skybox* getSkybox(UUID camera_id)
const;
175 const DynamicPointer<Camera>& getCameraFromIndex(uint04
id)
177 return m_index_cameras[id];
179 const ConstPointer<Camera>& getCameraFromIndex(uint04
id)
const
181 return m_index_cameras[id];
183 void deleteCamera(UUID
id);
184 void linkCameraOrientation(UUID a, UUID b);
185 void selectCamera(UUID camera);
186 void delinkCameraOrientation(UUID a, UUID b);
187 void addKeyController(UUID camera, UUID
id, KeyControllerBase* actions);
188 void removeKeyController(UUID camera, UUID
id);
189 void addKeyController(UUID
id, KeyControllerBase* actions);
190 void removeKeyController(UUID
id);
191 void addMouseController(UUID camera, UUID
id, MouseControllerBase* actions);
192 void removeMouseController(UUID camera, UUID
id);
193 void addMouseController(UUID
id, MouseControllerBase* actions);
194 void removeMouseController(UUID
id);
195 void setThemeCameraBackgroundColor(
const RGBColor& color);
196 void updateCameraBackgrounds();
197 void setCameraShowGrid(
bool show_grid);
198 void setCameraShowEnvironment(
bool show_grid);
199 void addMouseCursor(UUID
id,
const String& cursor);
200 void removeMouseCursor(UUID
id);
201 void addViewportLayout(
const ViewportLayout& layout);
202 void updateViewportLayout(
const ViewportLayout& layout);
203 void setDefaultLayoutTheme(ViewportLayoutTheme theme);
204 void removeViewportLayout(
const UUID&
id);
205 RGBColor defaultCameraBackgroundColor()
const;
206 Resource<ViewportLayout> current_layout;
207 Resource<bool> camera_show_grid;
208 Resource<bool> camera_show_environment;
210 Buffer<ViewportLayout> m_viewport_layout_stack;
211 DynamicPointer<SnapsManager> m_snap_manager;
212 Dictionary<UUID, Skybox*> m_skyboxes;
213 Dictionary<std::pair<UUID, UUID>, CameraOrientationSync*> m_camera_orientation_syncs;
214 Dictionary<std::pair<UUID, UUID>, CameraOffsetSync*> m_camera_offset_syncs;
215 Buffer<DynamicPointer<Camera>> m_index_cameras;
216 Dictionary<UUID, DynamicPointer<Camera>> m_cameras;
217 Dictionary<UUID, DynamicPointer<MouseController>> m_mouse_controllers;
218 Dictionary<UUID, DynamicPointer<KeyController>> m_key_controllers;
219 Buffer<UUID> m_global_mouse_actions;
220 Dictionary<UUID, MouseControllerBase*> m_global_mouse_action_lookup;
221 Buffer<UUID> m_global_key_actions;
222 Dictionary<UUID, KeyControllerBase*> m_global_key_action_lookup;
223 DesignObjectBase& m_base;
224 RGBColor m_theme_camera_background_color;
225 Buffer<std::pair<UUID, String>> m_global_mouse_cursors;
226 Dictionary<UUID, String> m_global_mouse_cursor_lookup;
227 UUID m_active_camera;
228 BasicResourceListener* m_color_theme_listener;
void addCamera(const DynamicPointer< Camera > &camera, kmldom::DocumentPtr doc)
Definition KMLFactory.cpp:498
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120