![]() |
NDEVR
API Documentation
|
Forward declaration of the skybox environment rendering class. More...
Public Member Functions | |
| CameraManager () | |
| Synchronizes positional offset between linked cameras. | |
| ~CameraManager () | |
| Destroys the CameraManager and releases all managed resources. | |
| void | addCamera (DynamicPointer< Camera > camera) |
| Adds an existing camera to this manager. | |
| void | addCameraModel (const UUID &camera, const Model &object) |
| Associates a model with a camera for visibility or rendering purposes. | |
| void | addKeyController (UUID camera, UUID id, KeyControllerBase *actions) |
| Adds a key controller to a specific camera. | |
| void | addKeyController (UUID id, KeyControllerBase *actions) |
| Adds a global key controller that applies to all cameras. | |
| void | addMouseController (UUID camera, UUID id, MouseControllerBase *actions) |
| Adds a mouse controller to a specific camera. | |
| void | addMouseController (UUID id, MouseControllerBase *actions) |
| Adds a global mouse controller that applies to all cameras. | |
| void | addMouseCursor (UUID id, const StringView &cursor) |
| Adds a mouse cursor style to the global cursor stack. | |
| void | addViewportLayout (const ViewportLayout &layout) |
| Pushes a viewport layout onto the layout stack and activates it. | |
| uint04 | cameraCount () const |
| Returns the total number of managed cameras. | |
| Buffer< UUID > | cameraIDs () const |
| Returns the UUIDs of all managed cameras. | |
| void | clearAll () |
| Removes all cameras, controllers, skyboxes, and layouts from the manager. | |
| DynamicPointer< Camera > | createCamera (Model &parent, ViewportFormat format, DesignObjectLookup *lookup) |
| Creates a new camera under the given parent model with the specified viewport format. | |
| RGBColor | defaultCameraBackgroundColor () const |
| Returns the default camera background color based on the current theme. | |
| void | deleteCamera (UUID id, bool delete_model=true) |
| Deletes a camera by UUID and optionally removes its associated model. | |
| void | delinkCameraOrientation (UUID a, UUID b) |
| Removes the orientation link between two cameras. | |
| DynamicPointer< Camera > | getCamera (UUID id) const |
| Retrieves a camera by its UUID. | |
| const DynamicPointer< Camera > & | getCameraFromIndex (uint04 id) |
| Retrieves a camera by its sequential index. | |
| const ConstPointer< Camera > & | getCameraFromIndex (uint04 id) const |
| Retrieves a camera by its sequential index (const overload). | |
| Skybox * | getSkybox (UUID camera_id) const |
| Retrieves the skybox assigned to a camera. | |
| bool | hasCamera (UUID id) const |
| Checks whether a camera with the given ID is managed by this manager. | |
| const DynamicPointer< KeyController > & | keyController (UUID id) |
| Retrieves the key controller associated with the given ID. | |
| void | linkCameraOrientation (UUID a, UUID b) |
| Links the orientation of two cameras so they rotate together. | |
| const DynamicPointer< MouseController > & | mouseController (UUID id) |
| Retrieves the mouse controller associated with the given ID. | |
| void | removeKeyController (UUID camera, UUID id) |
| Removes a key controller from a specific camera. | |
| void | removeKeyController (UUID id) |
| Removes a global key controller. | |
| void | removeMouseController (UUID camera, UUID id) |
| Removes a mouse controller from a specific camera. | |
| void | removeMouseController (UUID id) |
| Removes a global mouse controller. | |
| void | removeMouseCursor (UUID id) |
| Removes a mouse cursor style from the global cursor stack. | |
| void | removeViewportLayout (const UUID &id) |
| Removes a viewport layout from the stack by its UUID. | |
| void | saveLayout () |
| Saves the current viewport layout configuration. | |
| void | selectCamera (UUID camera) |
| Sets the specified camera as the currently active (selected) camera. | |
| DynamicPointer< Camera > | selectedCamera () const |
| Returns the currently selected (active) camera. | |
| void | setCameraShowEnvironment (bool show_grid) |
| Enables or disables environment (skybox/background) display for all managed cameras. | |
| void | setCameraShowGrid (bool show_grid) |
| Enables or disables grid display for all managed cameras. | |
| void | setDefaultLayoutTheme (ViewportLayoutTheme theme) |
| Sets the default viewport layout theme used when creating new layouts. | |
| void | setSkybox (UUID camera, Skybox *skybox) |
| Sets the skybox for a specific camera. | |
| void | setThemeCameraBackgroundColor (const RGBColor &color) |
| Sets the fallback background color used when a camera has no explicitly assigned color. | |
| const DynamicPointer< SnapsManager > & | snapsManager () |
| Returns a mutable pointer to the snap manager. | |
| const ConstPointer< SnapsManager > & | snapsManager () const |
| Returns a const pointer to the snap manager. | |
| void | update (const Time &time, DesignObjectLookup *lookup) |
| Updates all managed cameras and controllers for the current frame. | |
| void | updateCamera (const ViewportFormat &format) |
| Updates an existing camera to match the given viewport format. | |
| void | updateCameraBackgrounds () |
| Refreshes the background color of all managed cameras based on current settings. | |
| void | updateViewportLayout (const ViewportLayout &layout) |
| Updates an existing viewport layout with new settings. | |
| uint04 | userCameraCount () const |
| Returns the number of user-created cameras (excludes internal cameras). | |
| Buffer< UUID > | userCameraIDs () const |
| Returns the UUIDs of all user-created cameras. | |
| Buffer< DynamicPointer< Camera > > | userCameras () const |
| Returns all user-created cameras. | |
Public Attributes | |
| Resource< bool > | camera_show_environment |
| Whether the environment (skybox) is displayed in camera viewports. | |
| Resource< bool > | camera_show_grid |
| Whether the grid is displayed in camera viewports. | |
| Resource< ViewportLayout > | current_layout |
| The currently active viewport layout. | |
Forward declaration of the skybox environment rendering class.
Used to store or create Cameras or Viewports as well as manage interactions between them
Definition at line 121 of file CameraManager.h.
| CameraManager::CameraManager | ( | ) |
Synchronizes positional offset between linked cameras.
Constructs the CameraManager with default state.
| void CameraManager::addCamera | ( | DynamicPointer< Camera > | camera | ) |
Adds an existing camera to this manager.
| [in] | camera | The camera to add. |
Associates a model with a camera for visibility or rendering purposes.
| [in] | camera | The UUID of the camera. |
| [in] | object | The model to associate with the camera. |
| void CameraManager::addKeyController | ( | UUID | camera, |
| UUID | id, | ||
| KeyControllerBase * | actions ) |
| void CameraManager::addKeyController | ( | UUID | id, |
| KeyControllerBase * | actions ) |
Adds a global key controller that applies to all cameras.
| [in] | id | The UUID identifying the key controller. |
| [in] | actions | The key controller actions to register. |
| void CameraManager::addMouseController | ( | UUID | camera, |
| UUID | id, | ||
| MouseControllerBase * | actions ) |
| void CameraManager::addMouseController | ( | UUID | id, |
| MouseControllerBase * | actions ) |
Adds a global mouse controller that applies to all cameras.
| [in] | id | The UUID identifying the mouse controller. |
| [in] | actions | The mouse controller actions to register. |
| void CameraManager::addMouseCursor | ( | UUID | id, |
| const StringView & | cursor ) |
Adds a mouse cursor style to the global cursor stack.
| [in] | id | The UUID identifying this cursor entry. |
| [in] | cursor | The cursor name or resource identifier. |
| void CameraManager::addViewportLayout | ( | const ViewportLayout & | layout | ) |
Pushes a viewport layout onto the layout stack and activates it.
| [in] | layout | The viewport layout to add. |
|
inline |
Returns the total number of managed cameras.
Definition at line 215 of file CameraManager.h.
Returns the UUIDs of all managed cameras.
| DynamicPointer< Camera > CameraManager::createCamera | ( | Model & | parent, |
| ViewportFormat | format, | ||
| DesignObjectLookup * | lookup ) |
Creates a new camera under the given parent model with the specified viewport format.
| [in] | parent | The parent model to attach the camera to. |
| [in] | format | The viewport format describing the camera layout. |
| [in] | lookup | The design object lookup context. |
| RGBColor CameraManager::defaultCameraBackgroundColor | ( | ) | const |
Returns the default camera background color based on the current theme.
| void CameraManager::deleteCamera | ( | UUID | id, |
| bool | delete_model = true ) |
|
inline |
Retrieves a camera by its UUID.
| [in] | id | The UUID of the camera to retrieve. |
Definition at line 204 of file CameraManager.h.
|
inline |
Retrieves a camera by its sequential index.
| [in] | id | The zero-based index of the camera. |
Definition at line 275 of file CameraManager.h.
|
inline |
Retrieves a camera by its sequential index (const overload).
| [in] | id | The zero-based index of the camera. |
Definition at line 284 of file CameraManager.h.
| bool CameraManager::hasCamera | ( | UUID | id | ) | const |
Checks whether a camera with the given ID is managed by this manager.
| [in] | id | The UUID to check. |
|
inline |
Retrieves the key controller associated with the given ID.
| [in] | id | The UUID of the key controller. |
Definition at line 176 of file CameraManager.h.
|
inline |
Retrieves the mouse controller associated with the given ID.
| [in] | id | The UUID of the mouse controller. |
Definition at line 167 of file CameraManager.h.
| void CameraManager::removeKeyController | ( | UUID | id | ) |
Removes a global key controller.
| [in] | id | The UUID of the key controller to remove. |
| void CameraManager::removeMouseController | ( | UUID | id | ) |
Removes a global mouse controller.
| [in] | id | The UUID of the mouse controller to remove. |
| void CameraManager::removeMouseCursor | ( | UUID | id | ) |
Removes a mouse cursor style from the global cursor stack.
| [in] | id | The UUID of the cursor entry to remove. |
| void CameraManager::removeViewportLayout | ( | const UUID & | id | ) |
| void CameraManager::selectCamera | ( | UUID | camera | ) |
Sets the specified camera as the currently active (selected) camera.
| [in] | camera | The UUID of the camera to select. |
| DynamicPointer< Camera > CameraManager::selectedCamera | ( | ) | const |
Returns the currently selected (active) camera.
| void CameraManager::setCameraShowEnvironment | ( | bool | show_grid | ) |
Enables or disables environment (skybox/background) display for all managed cameras.
| [in] | show_grid | Whether to show the environment. |
| void CameraManager::setCameraShowGrid | ( | bool | show_grid | ) |
Enables or disables grid display for all managed cameras.
| [in] | show_grid | Whether to show the grid. |
| void CameraManager::setDefaultLayoutTheme | ( | ViewportLayoutTheme | theme | ) |
Sets the default viewport layout theme used when creating new layouts.
| [in] | theme | The layout theme to use as default. |
Sets the skybox for a specific camera.
| [in] | camera | The UUID of the camera. |
| [in] | skybox | The skybox to assign. |
| void CameraManager::setThemeCameraBackgroundColor | ( | const RGBColor & | color | ) |
Sets the fallback background color used when a camera has no explicitly assigned color.
| [in] | color | The background color to use as the theme default. |
|
inline |
Returns a mutable pointer to the snap manager.
Definition at line 152 of file CameraManager.h.
|
inline |
Returns a const pointer to the snap manager.
Definition at line 144 of file CameraManager.h.
| void CameraManager::update | ( | const Time & | time, |
| DesignObjectLookup * | lookup ) |
Updates all managed cameras and controllers for the current frame.
| [in] | time | The current timestamp. |
| [in] | lookup | The design object lookup context used for scene queries. |
| void CameraManager::updateCamera | ( | const ViewportFormat & | format | ) |
Updates an existing camera to match the given viewport format.
| [in] | format | The viewport format to apply. |
| void CameraManager::updateViewportLayout | ( | const ViewportLayout & | layout | ) |
Updates an existing viewport layout with new settings.
| [in] | layout | The viewport layout containing updated settings. |
| uint04 CameraManager::userCameraCount | ( | ) | const |
Returns the number of user-created cameras (excludes internal cameras).
Returns the UUIDs of all user-created cameras.
| Buffer< DynamicPointer< Camera > > CameraManager::userCameras | ( | ) | const |
Returns all user-created cameras.