ViewportModule
Module managing the I3T scene view. More...
#include "GUI/Viewport/ViewportModule.h"
Inherits from Module, IStateful
Public Functions
| Name | |
|---|---|
| ViewportModule() | |
| virtual void | appendScene(const Memento & memento, State::Scene * scene) override<br>Called on scene append. |
| virtual void | clearGlobal() override<br>Set the global state to some default empty state. |
| virtual void | clearScene(bool newScene) override<br>Set the scene state to some default empty state. |
| void | collectGlobal()<br>Update current settings with global data. |
| void | collectScene(UI::ViewportWindow * window)<br>Update current settings with data from the current scene. |
| Ptr< UI::ViewportWindow > | getOrCreateViewportWindow(int index) |
| ViewportModuleSettings & | getSettings() |
| Vp::Viewport & | getViewport() |
| const Ptr< UI::ViewportWindow > & | getWindow(int index) const |
| int | getWindowCount() const |
| const std::vector< Ptr< UI::ViewportWindow > > | getWindows() |
| bool | isMoreThanOneWindowVisible() const |
| virtual void | loadGlobal(const Memento & memento) override<br>Load global state from a memento. |
| virtual void | loadScene(const Memento & memento, State::Scene * scene) override<br>Called on scene load, undo and redo. |
| virtual void | onInit() override |
| virtual void | onUpdate(double deltaSeconds) override |
| virtual Memento | saveGlobal() override<br>Save shared global state. |
| virtual Memento | saveScene(State::Scene * scene) override<br>Save state for the current scene. |
| Ptr< UI::ViewportWindow > | showNewViewportWindow() |
| void | updateGlobal()<br>Update global values from current settings. |
| void | updateScene(UI::ViewportWindow * window)<br>Update current scene from current settings. |
Public Attributes
| Name | |
|---|---|
| int | m_interactingWindowIndex <br>Index of the window that is being interacted with, 0 for none. |
Additional inherited members
Public Functions inherited from Module
| Name | |
|---|---|
| Module() =default | |
| virtual | ~Module() =default |
| virtual void | onBeforeFrame() |
| virtual void | onBeginFrame() |
| virtual void | onClose() |
| virtual void | onEndFrame() |
Friends inherited from Module
| Name | |
|---|---|
| class | Application |
Public Functions inherited from IStateful
| Name | |
|---|---|
| virtual | ~IStateful() |
| Memento | emptyMemento()<br>Create an empty memento (rapidjson::Document) |
Detailed Description
class ViewportModule;class ViewportModule;Module managing the I3T scene view.
Scene view is displayed in ViewportWindow.h.
Public Functions Documentation
function ViewportModule
ViewportModule()ViewportModule()function appendScene
inline virtual void appendScene(
const Memento & memento,
State::Scene * scene
) overrideinline virtual void appendScene(
const Memento & memento,
State::Scene * scene
) overrideCalled on scene append.
Parameters:
- scene The current scene
- memento Scene state to appended
Reimplements: IStateful::appendScene
function clearGlobal
virtual void clearGlobal() overridevirtual void clearGlobal() overrideSet the global state to some default empty state.
Reimplements: IStateful::clearGlobal
function clearScene
virtual void clearScene(
bool newScene
) overridevirtual void clearScene(
bool newScene
) overrideSet the scene state to some default empty state.
Parameters:
- newScene Whether to perform basic new scene initialization.
Reimplements: IStateful::clearScene
function collectGlobal
void collectGlobal()void collectGlobal()Update current settings with global data.
function collectScene
void collectScene(
UI::ViewportWindow * window
)void collectScene(
UI::ViewportWindow * window
)Update current settings with data from the current scene.
function getOrCreateViewportWindow
Ptr< UI::ViewportWindow > getOrCreateViewportWindow(
int index
)Ptr< UI::ViewportWindow > getOrCreateViewportWindow(
int index
)function getSettings
ViewportModuleSettings & getSettings()ViewportModuleSettings & getSettings()function getViewport
Vp::Viewport & getViewport()Vp::Viewport & getViewport()function getWindow
const Ptr< UI::ViewportWindow > & getWindow(
int index
) constconst Ptr< UI::ViewportWindow > & getWindow(
int index
) constfunction getWindowCount
int getWindowCount() constint getWindowCount() constfunction getWindows
const std::vector< Ptr< UI::ViewportWindow > > getWindows()const std::vector< Ptr< UI::ViewportWindow > > getWindows()function isMoreThanOneWindowVisible
bool isMoreThanOneWindowVisible() constbool isMoreThanOneWindowVisible() constfunction loadGlobal
virtual void loadGlobal(
const Memento & memento
) overridevirtual void loadGlobal(
const Memento & memento
) overrideLoad global state from a memento.
Parameters:
- memento New global state
Reimplements: IStateful::loadGlobal
function loadScene
virtual void loadScene(
const Memento & memento,
State::Scene * scene
) overridevirtual void loadScene(
const Memento & memento,
State::Scene * scene
) overrideCalled on scene load, undo and redo.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
- memento New scene state
Reimplements: IStateful::loadScene
function onInit
virtual void onInit() overridevirtual void onInit() overrideReimplements: Module::onInit
function onUpdate
virtual void onUpdate(
double deltaSeconds
) overridevirtual void onUpdate(
double deltaSeconds
) overrideReimplements: Module::onUpdate
function saveGlobal
virtual Memento saveGlobal() overridevirtual Memento saveGlobal() overrideSave shared global state.
Reimplements: IStateful::saveGlobal
function saveScene
virtual Memento saveScene(
State::Scene * scene
) overridevirtual Memento saveScene(
State::Scene * scene
) overrideSave state for the current scene.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
Reimplements: IStateful::saveScene
The scene parameter should contain a scene object for full filesystem saves and nullptr for quick undo/redo operations.
function showNewViewportWindow
Ptr< UI::ViewportWindow > showNewViewportWindow()Ptr< UI::ViewportWindow > showNewViewportWindow()function updateGlobal
void updateGlobal()void updateGlobal()Update global values from current settings.
function updateScene
void updateScene(
UI::ViewportWindow * window
)void updateScene(
UI::ViewportWindow * window
)Update current scene from current settings.
Public Attributes Documentation
variable m_interactingWindowIndex
int m_interactingWindowIndex = 0;int m_interactingWindowIndex = 0;Index of the window that is being interacted with, 0 for none.
Updated on 2026-05-21 at 15:39:35 +0000