34#include <NDEVR/DesignObject.h>
35#include <NDEVR/Model.h>
36#include <NDEVR/Effect.h>
37#include <NDEVR/DesignSelection.h>
38#include <NDEVR/CameraManager.h>
39#include <NDEVR/LogManager.h>
40#include <NDEVR/DesignParameterAccumulator.h>
50 class SelectionController;
51 class ModelEditController;
53 class SelectionEffect;
54 class DesignCommandManager;
55 class ResourceListener;
56 class DesignTaskManager;
58 class DesignObjectUpdateTarget;
66 RLock readLock()
const;
67 void setupDefaultScene();
69 WLock writeLock(
const std::function<
void()>& wait_callback);
70 RLock readLock(
const std::function<
void()>& wait_callback)
const;
79 WLock tryCommandLock();
80 bool isCommandLocked()
const;
81 const void* lockPtr()
const;
85 virtual void addScene(
Scene scene,
bool ignore_application_scene =
false);
86 virtual void addMaterial(
Material object);
87 virtual void addGeometry(
Geometry object);
88 virtual void addEffect(
Effect object);
89 virtual void addModel(
Model object);
90 virtual void addCameraModel(
const UUID& camera,
const Model&
object);
91 virtual void addLayer(
Model layer);
93 virtual void clearSelected();
96 virtual void refreshScene(
UUID scene_id,
bool ignore_application_scene);
97 virtual void refreshModel(
const Model&
object);
99 virtual void updateModelTopLevel(
const Model&
object);
100 virtual void executePendingCommands();
101 virtual void deleteObject(
UUID id);
102 virtual void eraseModel(
UUID id);
104 virtual void setActiveLayer(
UUID layer_id);
105 virtual void setActiveProject(
UUID layer_id);
107 virtual Project activeProjectModel()
const;
108 void ensureLayerExistsInScene(
const UUID& layer_id,
const UUID& scene_id);
111 Geometry geometry(
const UUID&
id,
bool allow_deleted =
false)
const;
112 Material material(
const UUID&
id,
bool allow_deleted =
false)
const;
113 Scene scene(
const UUID&
id,
bool allow_deleted =
false)
const;
114 Model modelOrLayer(
const UUID&
id,
bool allow_deleted =
false)
const;
115 Model model(
const UUID&
id,
bool allow_deleted =
false)
const;
116 Effect effect(
const UUID&
id,
bool allow_deleted =
false)
const;
117 Model layer(
const UUID&
id,
bool allow_deleted =
false)
const;
118 Model layer(
const UUID& layer_id,
const UUID& scene_id,
bool allow_deleted =
false)
const;
119 Model findLayer(
const String& layer,
bool use_translation =
true)
const;
124 bool hasCamera(
const UUID&
id)
const;
129 virtual CameraManager* cameraManager();
130 virtual const CameraManager* cameraManager()
const;
131 virtual SelectionController* selectionController();
132 virtual ModelEditController* editManager();
140 bool hasModelID(
const UUID&
id,
bool allow_deleted =
false)
const;
141 bool hasSceneID(
const UUID&
id,
bool allow_deleted =
false)
const;
142 bool hasObjectID(
const UUID&
id,
bool allow_deleted =
false)
const;
143 bool hasMaterialID(
const UUID&
id)
const;
144 bool hasGeometryID(
const UUID&
id)
const;
145 bool hasEffect(
const UUID&
id)
const;
146 bool hasSelectionInfo(
const UUID&
id)
const;
147 bool hasLayerID(
const UUID&
id,
bool allow_deleted =
false)
const;
148 bool hasLayerID(
const UUID&
id,
const UUID& scene_id)
const;
152 Buffer<UUID> getRootObjectIDs(
bool include_app_owned =
false)
const;
153 Buffer<UUID> getRootObjectIDs(
UUID camera_id,
bool include_app_owned =
false)
const;
154 Buffer<Model> getRootObjects(
bool include_app_owned =
false)
const;
155 Buffer<Model> getRootObjects(
UUID camera_id,
bool include_app_owned =
false)
const;
194 void invalidateStationVisuals(
bool invalidate_visuals,
bool invalidate_font);
195 void updateTranslation();
197 virtual void clearAll();
198#if NDEVR_SUPPORTS_THREADING
199 void startUpdateThread(
const TimeSpan& span, std::function<
void(
const Exception&)> exception_callback);
200 void stopUpdateThread();
203 virtual void update(
const Time& time,
const std::function<
void()>& wait_callback);
204 virtual void requestAutoSave();
205 virtual void requestAutoSaveCheckpoint();
208 void selectEnclosed(
UUID selection_id);
219#if NDEVR_SUPPORTS_THREADING
220 Thread* m_update_thread =
nullptr;
221 std::function<void(
const Exception&)> m_exception_callback =
nullptr;
223 void updateEffects(
const Time& time,
const std::function<
void()>& wait_callback);
232 CameraManager* m_camera_controller;
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
Definition BitFlag.hpp:68
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition GraphicsPipeline.h:42
Definition DesignCommandManager.h:11
Definition DesignObject.h:66
Definition DesignObjectLookup.h:61
UUID m_active_layer
Definition DesignObjectLookup.h:225
Dictionary< UUID, Geometry > m_geometry_objects
Definition DesignObjectLookup.h:248
ResourceListener * m_language_change_listener
Definition DesignObjectLookup.h:252
bool m_update_language
Definition DesignObjectLookup.h:258
const Dictionary< UUID, DesignObject > & objects()
Definition DesignObjectLookup.h:185
Dictionary< UUID, DynamicPointer< DesignSelection > > m_selection_info
Definition DesignObjectLookup.h:250
bool m_update_station_visuals
Definition DesignObjectLookup.h:256
Dictionary< UUID, Scene > m_all_scene_objects
Definition DesignObjectLookup.h:238
Dictionary< UUID, Model > m_application_root_objects
Definition DesignObjectLookup.h:245
Resource< Time > autosave_checkpoint_request_time
Definition DesignObjectLookup.h:217
Dictionary< UUID, Model > m_model_root_objects
Definition DesignObjectLookup.h:244
const Dictionary< UUID, DesignObject > & deletedObjects()
Definition DesignObjectLookup.h:187
const Dictionary< UUID, Effect > & effectObjects()
Definition DesignObjectLookup.h:186
Scene m_default_scene
Definition DesignObjectLookup.h:227
const Dictionary< UUID, Geometry > & geometryObjects()
Definition DesignObjectLookup.h:184
const Scene & defaultScene()
Definition DesignObjectLookup.h:177
virtual UUID activeProject() const
Definition DesignObjectLookup.h:106
Resource< Time > modified_time
Definition DesignObjectLookup.h:215
const Dictionary< UUID, Model > & modelObjects()
Definition DesignObjectLookup.h:181
Resource< UUID > current_layer
Definition DesignObjectLookup.h:214
Resource< RGBColor > focus_color
Definition DesignObjectLookup.h:213
bool m_update_station_font
Definition DesignObjectLookup.h:257
TimeSpan m_prefered_update_timespan
Definition DesignObjectLookup.h:255
DesignTaskManager * m_task_controller
Definition DesignObjectLookup.h:236
Dictionary< UUID, Material > m_material_objects
Definition DesignObjectLookup.h:247
const Dictionary< UUID, Scene > & sceneObjects()
Definition DesignObjectLookup.h:180
ResourceListener * m_invalidate_station_visuals_listener
Definition DesignObjectLookup.h:251
Dictionary< UUID, Dictionary< UUID, Model > > m_layer_objects
Definition DesignObjectLookup.h:246
SelectionEffect * m_selection_effect
Definition DesignObjectLookup.h:234
Dictionary< UUID, DesignObject > m_deleted_objects
Definition DesignObjectLookup.h:242
UUID m_active_project
Definition DesignObjectLookup.h:226
Buffer< DesignObjectUpdateTarget * > m_update_targets
Definition DesignObjectLookup.h:253
Dictionary< UUID, Model > m_model_objects
Definition DesignObjectLookup.h:240
ModelEditController * m_edit_controller
Definition DesignObjectLookup.h:229
Dictionary< UUID, Model > m_camera_root
Definition DesignObjectLookup.h:237
Dictionary< UUID, Effect > m_effect_objects
Definition DesignObjectLookup.h:249
Time m_last_update_time
Definition DesignObjectLookup.h:254
Resource< Time > autosave_request_time
Definition DesignObjectLookup.h:216
const Dictionary< UUID, Dictionary< UUID, Model > > & layerObjects()
Definition DesignObjectLookup.h:182
Dictionary< UUID, UUID > m_erased_objects
Definition DesignObjectLookup.h:243
void removeDeletedObject(UUID id)
Definition DesignObjectLookup.h:188
LogManager * m_log_manager
Definition DesignObjectLookup.h:235
const Dictionary< UUID, Material > & materialObjects()
Definition DesignObjectLookup.h:183
Dictionary< UUID, DesignObject > m_design_objects
Definition DesignObjectLookup.h:241
UUID m_uuid
Definition DesignObjectLookup.h:259
Dictionary< UUID, Scene > m_scene_objects
Definition DesignObjectLookup.h:239
DesignCommandManager * m_command_controller
Definition DesignObjectLookup.h:230
SelectionController * m_selection_controller
Definition DesignObjectLookup.h:228
Definition DesignObjectUpdateTarget.h:8
Definition DesignParameterAccumulator.h:57
Definition DesignParameter.h:42
Definition DesignSelection.h:19
Definition DesignTask.h:21
Definition Dictionary.h:48
Definition Pointer.hpp:303
Definition Exception.hpp:56
Definition LogManager.h:10
Definition DesignLock.h:39
Definition ResourceListener.h:55
Definition SelectionEffect.h:8
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Definition TranslatedString.h:9
Definition DesignLock.h:47
void addCamera(const DynamicPointer< Camera > &camera, kmldom::DocumentPtr doc)
Definition KMLFactory.cpp:498
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
Logic for automatically zooming a Camera or Viewport to a certain location or having certain objects ...
Definition ViewportAutoZoomFocus.h:16