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
) override
inline virtual void appendScene(
const Memento & memento,
State::Scene * scene
) override
Called on scene append.
Parameters:
- scene The current scene
- memento Scene state to appended
Reimplements: IStateful::appendScene
function clearGlobal
virtual void clearGlobal() override
virtual void clearGlobal() override
Set the global state to some default empty state.
Reimplements: IStateful::clearGlobal
function clearScene
virtual void clearScene(
bool newScene
) override
virtual void clearScene(
bool newScene
) override
Set 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
) const
const Ptr< UI::ViewportWindow > & getWindow(
int index
) const
function getWindowCount
int getWindowCount() const
int getWindowCount() const
function getWindows
const std::vector< Ptr< UI::ViewportWindow > > getWindows()
const std::vector< Ptr< UI::ViewportWindow > > getWindows()
function isMoreThanOneWindowVisible
bool isMoreThanOneWindowVisible() const
bool isMoreThanOneWindowVisible() const
function loadGlobal
virtual void loadGlobal(
const Memento & memento
) override
virtual void loadGlobal(
const Memento & memento
) override
Load global state from a memento.
Parameters:
- memento New global state
Reimplements: IStateful::loadGlobal
function loadScene
virtual void loadScene(
const Memento & memento,
State::Scene * scene
) override
virtual void loadScene(
const Memento & memento,
State::Scene * scene
) override
Called 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() override
virtual void onInit() override
Reimplements: Module::onInit
function onUpdate
virtual void onUpdate(
double deltaSeconds
) override
virtual void onUpdate(
double deltaSeconds
) override
Reimplements: Module::onUpdate
function saveGlobal
virtual Memento saveGlobal() override
virtual Memento saveGlobal() override
Save shared global state.
Reimplements: IStateful::saveGlobal
function saveScene
virtual Memento saveScene(
State::Scene * scene
) override
virtual Memento saveScene(
State::Scene * scene
) override
Save 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 2025-05-31 at 12:55:30 +0000