A core class where all Design Objects including models, materials, and geometries are stored.
More...
|
|
| DesignObjectLookup () |
| | Constructs a new DesignObjectLookup with default-initialized members.
|
| virtual | ~DesignObjectLookup () |
| | Virtual destructor.
|
| DesignParameterAccumulator | accumulateDesignParameter (const DesignParameter &channel, const BitFlag &accumulation_flags) const |
| | Accumulates statistics for a single design parameter.
|
| Buffer< DesignParameterAccumulator > | accumulateDesignParameters (const BitFlag &accumulation_flags) const |
| | Accumulates statistics for all design parameters matching the given flags.
|
| virtual UUID | activeProject () const |
| | Returns the UUID of the currently active project.
|
| virtual Project | activeProjectModel () const |
| | Returns the active project as a Project model.
|
| virtual void | addCamera (const DynamicPointer< Camera > &object, bool generate_decorations=true) |
| | Adds a camera to the lookup.
|
| virtual void | addCameraModel (const UUID &camera, const Model &object) |
| | Associates a model with a specific camera.
|
| virtual void | addEffect (Effect object) |
| | Registers an effect in the lookup.
|
| virtual void | addGeometry (Geometry object) |
| | Registers a geometry in the lookup.
|
| virtual void | addLayer (Model layer) |
| | Registers a layer model in the lookup.
|
| virtual void | addMaterial (Material object) |
| | Registers a material in the lookup.
|
| virtual void | addModel (Model object) |
| | Registers a model in the lookup.
|
| virtual void | addScene (Scene scene, bool add_all_scene_models=true) |
| | Adds a scene to the lookup and optionally registers all of its models.
|
| virtual void | addSelection (const DesignSelection &object) |
| | Adds a design selection to the lookup.
|
| void | addUpdateTarget (DesignObjectUpdateTarget *target) |
| | Registers a target to receive design object update notifications.
|
| virtual void | appendSelected (Buffer< UUID > ids) |
| | Appends the specified object IDs to the current selection.
|
| virtual uint08 | approximateMemorySize (bool include_app_owned=false) const |
| | Estimates the total memory usage of all stored design objects.
|
| Bounds< 3, fltp08 > | bounds () const |
| | Computes the 3D bounding box encompassing all stored objects.
|
| Bounds< 3, fltp08 > | boundsOfVisible () const |
| | Computes the 3D bounding box encompassing all visible objects.
|
| Bounds< 3, fltp08 > | boundsOfVisible (const Camera &camera) const |
| | Computes the 3D bounding box of all objects visible to the given camera.
|
| virtual CameraManager * | cameraManager () |
| | Returns the camera manager.
|
| virtual const CameraManager * | cameraManager () const |
| | Returns the camera manager (const).
|
|
void | cleanupMemory () |
| | Releases unused memory held by internal data structures.
|
|
virtual void | clearAll () |
| | Removes all design objects, scenes, and resets the lookup to an empty state.
|
|
virtual void | clearSelected () |
| | Clears all currently selected objects.
|
| void | colorByChannel (UUID target, const DesignParameter &channel) |
| | Applies color-by-channel visualization to a target model.
|
| WLock | commandLock () |
| | Acquires a write lock specifically for command execution.
|
| virtual DesignCommandManager * | commandManager () |
| | Returns the design command manager.
|
| DynamicPointer< Camera > | createCamera (const ViewportFormat &format) |
| | Creates a new camera with no explicit parent model.
|
| DynamicPointer< Camera > | createCamera (Model &parent, const ViewportFormat &format) |
| | Creates a new camera as a child of the specified parent model.
|
| Material | createCameraMaterial (UUID camera) |
| | Creates a new material associated with a specific camera.
|
| Model | createCameraModel (UUID camera) |
| | Creates a new model associated with a specific camera.
|
| Model | createLayer () |
| | Creates a new layer model and registers it in the lookup.
|
| Material | createMaterial () |
| | Creates a new material and registers it in the lookup.
|
| Geometry | createMesh () |
| | Creates a new mesh geometry and registers it in the lookup.
|
| Model | createModel () |
| | Creates a new model and registers it in the lookup.
|
| const Scene & | defaultScene () |
| | Returns the default scene, which is constant to the application.
|
| const Dictionary< UUID, DesignObject > & | deletedObjects () |
| | Returns the dictionary of all deleted design objects.
|
| void | deleteLayer (const UUID &layer_id, const UUID &scene_id) |
| | Removes a layer from a specific scene.
|
| virtual void | deleteObject (UUID id) |
| | Marks a design object as deleted by its UUID.
|
| Buffer< DesignParameter > | designParameters () const |
| | Returns all available design parameters across all stored objects.
|
| virtual ModelEditController * | editManager () |
| | Returns the model edit controller.
|
| Effect | effect (const UUID &id, bool allow_deleted=false) const |
| | Retrieves an effect by its UUID.
|
| const Dictionary< UUID, Effect > & | effectObjects () |
| | Returns the dictionary of all registered effects.
|
| void | ensureLayerExistsInAllScenes (const UUID &layer_id) |
| | Ensures the specified layer exists in all registered scenes.
|
| void | ensureLayerExistsInScene (const UUID &layer_id, const UUID &scene_id) |
| | Ensures a layer exists within a specific scene, creating it if necessary.
|
| virtual void | eraseModel (UUID id) |
| | Erases a model from the lookup, moving it to the erased objects store.
|
|
virtual void | executePendingCommands () |
| | Executes all pending design commands in the command queue.
|
| Model | findLayer (const String &layer, bool use_translation=true) const |
| | Finds a layer by its name string.
|
| Model | findLayer (const TranslatedString &layer) const |
| | Finds a layer by its translated name.
|
| virtual void | finishCommand (const DynamicPointer< DesignCommand > &command) |
| | Finalizes a design command after execution.
|
| Geometry | geometry (const UUID &id, bool allow_deleted=false) const |
| | Retrieves a geometry by its UUID.
|
| const Dictionary< UUID, Geometry > & | geometryObjects () |
| | Returns the dictionary of all registered geometries.
|
| const Dictionary< UUID, Model > & | getAllSceneLayers (const UUID &id) const |
| | Returns all layers associated with a given scene.
|
| DynamicPointer< Camera > | getCamera (const UUID &id) |
| | Retrieves a mutable camera pointer by its UUID.
|
| ConstPointer< Camera > | getCamera (const UUID &id) const |
| | Retrieves a const camera pointer by its UUID.
|
| Buffer< Model > | getCameraObjects () const |
| | Returns all models that are associated with cameras.
|
| virtual Buffer< UUID > | getDescendantsOf (const Buffer< UUID > &model_ids) |
| | Returns the UUIDs of all descendants of the given models.
|
| Set< UUID > | getExcludedIDs (UUID camera_id) const |
| | Returns the set of object IDs excluded from a specific camera's view.
|
| virtual Buffer< UUID > | getInverseOf (const Buffer< UUID > &model_ids) |
| | Returns the UUIDs of all models that are NOT in the given set.
|
| Buffer< Model > | getLayersByType (const Buffer< String > &types) const |
| | Returns all layers matching any of the specified type strings.
|
| Buffer< Model > | getLayersByType (const StringView &type) const |
| | Returns all layers matching the specified type string.
|
| Buffer< UUID > | getModelIDsByType (const StringView &type) const |
| | Returns the UUIDs of all models matching the specified type string.
|
| Buffer< Model > | getModelsByID (const Buffer< UUID > &ids) const |
| | Retrieves models by their UUIDs from a buffer.
|
| Buffer< Model > | getModelsByID (const Set< UUID > &ids) const |
| | Retrieves models by their UUIDs from a set.
|
| Buffer< Model > | getModelsByName (const StringView &name) const |
| | Retrieves all models whose name matches the given string.
|
| Buffer< Model > | getModelsByType (const Buffer< String > &types) const |
| | Returns all models matching any of the specified type strings.
|
| Buffer< Model > | getModelsByType (const StringView &type) const |
| | Returns all models matching the specified type string.
|
| Buffer< UUID > | getRootObjectIDs (bool include_app_owned=false) const |
| | Returns the UUIDs of all root-level objects.
|
| Buffer< UUID > | getRootObjectIDs (UUID camera_id, bool include_app_owned=false) const |
| | Returns the UUIDs of root-level objects visible to a specific camera.
|
| Buffer< Model > | getRootObjects (bool include_app_owned=false) const |
| | Returns all root-level model objects.
|
| Buffer< Model > | getRootObjects (UUID camera_id, bool include_app_owned=false) const |
| | Returns root-level model objects visible to a specific camera.
|
| const DynamicPointer< DesignSelection > & | getSelectionInfo (const UUID &id) |
| | Retrieves a mutable selection info pointer by its UUID.
|
| const ConstPointer< DesignSelection > & | getSelectionInfo (const UUID &id) const |
| | Retrieves a const selection info pointer by its UUID.
|
| bool | hasCamera (const UUID &id) const |
| | Checks whether a camera with the given UUID exists.
|
| bool | hasEffect (const UUID &id) const |
| | Checks whether an effect with the given UUID exists.
|
| bool | hasGeometryID (const UUID &id, bool allow_deleted=false) const |
| | Checks whether a geometry with the given UUID exists.
|
| bool | hasLayerID (const UUID &id, bool allow_deleted=false) const |
| | Checks whether a layer with the given UUID exists in any scene.
|
| bool | hasLayerID (const UUID &id, const UUID &scene_id) const |
| | Checks whether a layer with the given UUID exists within a specific scene.
|
| bool | hasLayersOfType (const StringView &type) const |
| | Checks whether any layers of the specified type exist.
|
| bool | hasMaterialID (const UUID &id, bool allow_deleted=false) const |
| | Checks whether a material with the given UUID exists.
|
| bool | hasModelID (const UUID &id, bool allow_deleted=false) const |
| | Checks whether a model with the given UUID exists.
|
| bool | hasModelsOfType (const StringView &type) const |
| | Checks whether any models of the specified type exist.
|
| bool | hasObjectID (const UUID &id, bool allow_deleted=false) const |
| | Checks whether any design object with the given UUID exists.
|
| bool | hasSceneID (const UUID &id, bool allow_deleted=false) const |
| | Checks whether a scene with the given UUID exists.
|
| bool | hasSelectionInfo (const UUID &id) const |
| | Checks whether selection info with the given UUID exists.
|
| void | invalidateStationVisuals (bool invalidate_visuals, bool invalidate_font) |
| | Marks station visuals and/or fonts as needing re-rendering.
|
| bool | isCommandLocked () const |
| | Checks whether the command lock is currently held.
|
| Model | layer (const UUID &id, bool allow_deleted=false) const |
| | Retrieves a layer by its UUID.
|
| Model | layer (const UUID &layer_id, const UUID &scene_id, bool allow_deleted=false) const |
| | Retrieves a layer by its UUID within a specific scene.
|
| const Dictionary< UUID, Dictionary< UUID, Model > > & | layerObjects () |
| | Returns the dictionary of all registered layers, organized by scene.
|
| const void * | lockPtr () const |
| | Returns a raw pointer to the internal lock primitive.
|
| virtual LogManager * | logManager () const |
| | Returns the log manager.
|
| Material | material (const UUID &id, bool allow_deleted=false) const |
| | Retrieves a material by its UUID.
|
| const Dictionary< UUID, Material > & | materialObjects () |
| | Returns the dictionary of all registered materials.
|
| Model | model (const UUID &id, bool allow_deleted=false) const |
| | Retrieves a model by its UUID.
|
| const Dictionary< UUID, Model > & | modelObjects () |
| | Returns the dictionary of all registered models.
|
| Model | modelOrLayer (const UUID &id, bool allow_deleted=false) const |
| | Retrieves a model or layer by its UUID, checking both stores.
|
| Buffer< Model > | models (const Buffer< UUID > &ids, bool allow_deleted=false) const |
| | Retrieves multiple models by their UUIDs.
|
| DesignObject | object (const UUID &id) const |
| | Retrieves a generic design object by its UUID.
|
| const Dictionary< UUID, DesignObject > & | objects () |
| | Returns the dictionary of all registered design objects.
|
| void | performDeletion (Buffer< UUID > deleted_objects) |
| | Permanently removes the specified objects from all stores.
|
| template<class t_design_command_type> |
| void | postCommand (const DynamicPointer< t_design_command_type > &command) |
| | Posts a typed design command for asynchronous execution.
|
| virtual void | postDesignCommand (const DynamicPointer< DesignCommand > &command) |
| | Posts a design command for asynchronous execution.
|
| Dictionary< UUID, EnclosedModelInfo > | processSelection (const DesignSelection &info) const |
| | Processes a design selection and returns enclosed model information.
|
| void | processSelection (SelectionInfo &info) const |
| | Processes a selection query and populates the given SelectionInfo.
|
| RLock | readLock () const |
| | Acquires a shared read lock on the design object store.
|
| RLock | readLock (const std::function< void()> &wait_callback) const |
| | Acquires a shared read lock, calling a callback while waiting.
|
| RDesignLock | readLock (UUID id) |
| | Acquires a design-specific read lock for the object with the given UUID.
|
| virtual void | refreshModel (const Model &object) |
| | Triggers a refresh of the specified model.
|
| virtual void | refreshScene (UUID scene_id) |
| | Triggers a refresh of the scene with the given ID.
|
| void | removeDeletedObject (UUID id) |
| | Removes an object from the deleted objects store permanently.
|
| void | removeUpdateTarget (DesignObjectUpdateTarget *target) |
| | Unregisters a target from receiving design object update notifications.
|
|
virtual void | requestAutoSave () |
| | Requests an auto-save of the current design state.
|
|
virtual void | requestAutoSaveCheckpoint () |
| | Requests an auto-save checkpoint of the current design state.
|
| virtual Material | restoreMaterial (UUID id) |
| | Restores a previously deleted material back into the lookup.
|
| virtual Model | restoreModel (UUID id) |
| | Restores a previously deleted model back into the lookup.
|
| template<class t_design_command_type> |
| void | runCommand (const DynamicPointer< t_design_command_type > &command) |
| | Runs a typed design command synchronously.
|
| virtual void | runDesignCommand (const DynamicPointer< DesignCommand > &command) |
| | Runs a design command synchronously.
|
| Scene | scene (const UUID &id, bool allow_deleted=false) const |
| | Retrieves a scene by its UUID.
|
| const Dictionary< UUID, Scene > & | sceneObjects () |
| | Returns the dictionary of all registered scenes.
|
| Buffer< UUID > | selected () const |
| | Returns the UUIDs of all currently selected objects.
|
| void | selectEnclosed (UUID selection_id) |
| | Selects all models enclosed by the specified selection region.
|
| virtual SelectionController * | selectionController () |
| | Returns the selection controller for viewport-based selection.
|
| virtual SelectionEffect * | selectionEffect () |
| | Returns the selection effect used for highlighting selected objects.
|
| virtual void | setActiveLayer (UUID layer_id) |
| | Sets the active layer by UUID.
|
| virtual void | setActiveProject (UUID layer_id) |
| | Sets the active project by UUID.
|
| virtual void | setSelected (Buffer< UUID > ids) |
| | Replaces the current selection with the specified object IDs.
|
| void | setSelectionEffect (SelectionEffect *effect) |
| | Sets the selection effect used for highlighting selected objects.
|
|
void | setupDefaultScene () |
| | Initializes the default scene with standard settings.
|
| void | setViewportFocus (AutoZoomFocus focus) |
| | Sets the auto-zoom focus target for viewports.
|
| void | startUpdateThread (const TimeSpan &span, std::function< void(const Exception &)> exception_callback) |
| | Starts a background thread that periodically calls update().
|
|
void | stopUpdateThread () |
| | Stops the background update thread if it is running.
|
| virtual DesignTaskManager * | taskManager () const |
| | Returns the design task manager.
|
| WLock | tryCommandLock () |
| | Attempts to acquire a command write lock without blocking.
|
| RLock | tryReadLock (const TimeSpan &span) const |
| | Attempts to acquire a read lock within the specified time span.
|
| RLock | tryReadLock (uint08 milliseconds=10) const |
| | Attempts to acquire a read lock within the specified timeout.
|
| WLock | tryWriteLock (const TimeSpan &span) |
| | Attempts to acquire a write lock within the specified time span.
|
| WLock | tryWriteLock (uint08 milliseconds=10) |
| | Attempts to acquire a write lock within the specified timeout.
|
| virtual void | update (const Time &time, const std::function< void()> &wait_callback) |
| | Performs a periodic update of all design objects and effects.
|
| virtual void | updateModelTopLevel (const Model &object) |
| | Updates the top-level status of a model in the hierarchy.
|
|
void | updateTranslation () |
| | Triggers a translation update for all design objects.
|
| Buffer< UUID > | visibleModels () const |
| | Returns the UUIDs of all currently visible models.
|
| WLock | writeLock () const |
| | Acquires an exclusive write lock on the design object store.
|
| WLock | writeLock (const std::function< void()> &wait_callback) |
| | Acquires an exclusive write lock, calling a callback while waiting.
|
| WDesignLock | writeLock (UUID id) |
| | Acquires a design-specific write lock for the object with the given UUID.
|
|
|
UUID | m_active_layer |
| | The UUID of the currently active layer.
|
|
UUID | m_active_project |
| | The UUID of the currently active project.
|
|
CameraManager * | m_camera_controller |
| | Manages all camera instances and their lifecycle.
|
|
Dictionary< UUID, Model > | m_camera_root |
| | Root models associated with each camera.
|
|
DesignCommandManager * | m_command_controller |
| | Manages the design command queue and execution.
|
|
Scene | m_default_scene |
| | The default scene, constant to the application (not written to files).
|
|
Dictionary< UUID, DesignObject > | m_deleted_objects |
| | Design objects that have been soft-deleted.
|
|
Dictionary< UUID, DesignObject > | m_design_objects |
| | All registered design objects keyed by UUID.
|
|
ModelEditController * | m_edit_controller |
| | Manages model editing operations.
|
|
Dictionary< UUID, Effect > | m_effect_objects |
| | All registered effect objects keyed by UUID.
|
|
Dictionary< UUID, std::pair< UUID, uint04 > > | m_erased_objects |
| | Erased objects stored with their parent UUID and child index.
|
|
std::function< void(const Exception &)> | m_exception_callback = nullptr |
| | Callback for exceptions thrown during background updates.
|
|
Dictionary< UUID, Geometry > | m_geometry_objects |
| | All registered geometry objects keyed by UUID.
|
|
ResourceListener * | m_invalidate_station_visuals_listener |
| | Listener that triggers station visual invalidation.
|
|
ResourceListener * | m_language_change_listener |
| | Listener that triggers translation updates on language change.
|
|
Time | m_last_update_time |
| | The timestamp of the most recent update cycle.
|
|
Dictionary< UUID, Dictionary< UUID, Model > > | m_layer_objects |
| | Layers organized by scene UUID, then layer UUID.
|
|
LogManager * | m_log_manager |
| | Manages logging for design operations.
|
|
Dictionary< UUID, Material > | m_material_objects |
| | All registered material objects keyed by UUID.
|
|
Dictionary< UUID, Model > | m_model_objects |
| | All registered model objects keyed by UUID.
|
|
Dictionary< UUID, Model > | m_model_root_objects |
| | Top-level root model objects.
|
|
TimeSpan | m_preferred_update_timespan |
| | The preferred interval between background update cycles.
|
|
Dictionary< UUID, Model > | m_referenced_root_objects |
| | Root objects referenced from external sources.
|
|
Dictionary< UUID, Scene > | m_referenced_scenes |
| | Scenes referenced by the lookup but not directly owned.
|
|
Dictionary< UUID, Scene > | m_scene_objects |
| | All registered scene objects keyed by UUID.
|
|
Buffer< UUID > | m_selected_objects |
| | The UUIDs of currently selected objects.
|
|
SelectionController * | m_selection_controller |
| | Manages viewport-based selection logic.
|
|
SelectionEffect * | m_selection_effect |
| | The visual effect applied to selected objects.
|
|
Dictionary< UUID, DynamicPointer< DesignSelection > > | m_selection_info |
| | Selection metadata keyed by selection UUID.
|
|
DesignTaskManager * | m_task_controller |
| | Manages asynchronous design tasks.
|
|
bool | m_update_language |
| | Whether a language/translation update is pending.
|
|
bool | m_update_station_font |
| | Whether station fonts need to be re-rendered.
|
|
bool | m_update_station_visuals |
| | Whether station visuals need to be re-rendered.
|
|
Buffer< DesignObjectUpdateTarget * > | m_update_targets |
| | Registered targets that receive design object update notifications.
|
|
Thread * | m_update_thread = nullptr |
| | The background update thread, or nullptr if not running.
|
|
UUID | m_uuid |
| | The unique identifier for this DesignObjectLookup instance.
|