VR-Engage  2.2
Loading...
Searching...
No Matches
savedViewInputLogic.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file savedViewInputLogic.h
7//! \brief Input handling component for saved view navigation
8//! \ingroup vreCommonComponents
9
10#pragma once
11
14
15#include <string>
16
17namespace makVrv
18{
19class DtObserverViewsManager;
20}
21
22namespace makVre
23{
25
26//! \brief Input handling component for navigating between saved views
27//!
28//! DtSavedViewInputLogic processes keyboard and controller inputs to navigate
29//! between saved observer views. It provides functionality for cycling through
30//! views sequentially, directly accessing specific views by number, and toggling
31//! special views such as the backup view. This component works in conjunction with
32//! the DtSavedViewUpdater to provide a complete saved view navigation system.
34{
35public:
36 //! \brief Constructor for DtSavedViewInputLogic
37 //! \param de Reference to the display engine
38 //! \param updater Reference to the saved view updater that will execute view changes
39 //!
40 //! Initializes the input logic component with references to the display engine
41 //! and the saved view updater that will perform the actual view changes
43
44 //! \brief Virtual destructor for DtSavedViewInputLogic
45 virtual ~DtSavedViewInputLogic() override;
46
47 //! \brief Initializes the saved view input logic
48 //!
49 //! Loads the input configuration from commonInput.lua and sets up
50 //! action handlers for view navigation commands
51 virtual void initialize() override;
52
53 //! \brief Shuts down the saved view input logic
54 //!
55 //! Performs cleanup operations before component destruction
56 virtual void shutdown() override;
57
58 //! \brief Gets the class name of this component
59 //! \return String containing the class name
60 //!
61 //! Returns the name of this component class for identification purposes
62 virtual const std::string& className();
63
64 //! \brief Handler for the next view input action
65 //! \param value Input value (non-zero to trigger the action)
66 //!
67 //! Advances to the next saved view in sequence when triggered
68 virtual void nextView(float value);
69
70 //! \brief Handler for the previous view input action
71 //! \param value Input value (non-zero to trigger the action)
72 //!
73 //! Returns to the previous saved view in sequence when triggered
74 virtual void previousView(float value);
75
76 //! \brief Handler for toggling to/from the backup view
77 //! \param value Input value (non-zero to trigger the action)
78 //!
79 //! Toggles between the current view and a view containing "Backup View" in its name.
80 //! If already in the backup view, returns to the previous view.
81 virtual void toggleBackupView(float value);
82
83 //! \brief Handler for directly selecting view 1
84 //! \param value Input value (non-zero to trigger the action)
85 virtual void view1(float value);
86
87 //! \brief Handler for directly selecting view 2
88 //! \param value Input value (non-zero to trigger the action)
89 virtual void view2(float value);
90
91 //! \brief Handler for directly selecting view 3
92 //! \param value Input value (non-zero to trigger the action)
93 virtual void view3(float value);
94
95 //! \brief Handler for directly selecting view 4
96 //! \param value Input value (non-zero to trigger the action)
97 virtual void view4(float value);
98
99 //! \brief Handler for directly selecting view 5
100 //! \param value Input value (non-zero to trigger the action)
101 virtual void view5(float value);
102
103 //! \brief Handler for directly selecting view 6
104 //! \param value Input value (non-zero to trigger the action)
105 virtual void view6(float value);
106
107 //! \brief Handler for directly selecting view 7
108 //! \param value Input value (non-zero to trigger the action)
109 virtual void view7(float value);
110
111 //! \brief Handler for directly selecting view 8
112 //! \param value Input value (non-zero to trigger the action)
113 virtual void view8(float value);
114
115 //! \brief Handler for directly selecting view 9
116 //! \param value Input value (non-zero to trigger the action)
117 virtual void view9(float value);
118
119 //! \brief Handler for directly selecting view 10
120 //! \param value Input value (non-zero to trigger the action)
121 virtual void view10(float value);
122
123protected:
124 //! \brief Reference to the display engine
125 makVrv::DtDe& myDe;
126
127 //! \brief Name of this component class
128 std::string myClassName;
129
130 //! \brief Reference to the saved view updater that executes view changes
132};
133} // namespace makVre
DtInputLogic()
Constructor.
virtual void view9(float value)
Handler for directly selecting view 9.
DtSavedViewInputLogic(makVrv::DtDe &de, DtSavedViewUpdater &updater)
Constructor for DtSavedViewInputLogic.
virtual ~DtSavedViewInputLogic() override
Virtual destructor for DtSavedViewInputLogic.
virtual void view4(float value)
Handler for directly selecting view 4.
DtSavedViewUpdater & myUpdater
Reference to the saved view updater that executes view changes.
Definition savedViewInputLogic.h:131
makVrv::DtDe & myDe
Reference to the display engine.
Definition savedViewInputLogic.h:125
virtual void initialize() override
Initializes the saved view input logic.
virtual void shutdown() override
Shuts down the saved view input logic.
virtual void toggleBackupView(float value)
Handler for toggling to/from the backup view.
virtual const std::string & className()
Gets the class name of this component.
virtual void previousView(float value)
Handler for the previous view input action.
std::string myClassName
Name of this component class.
Definition savedViewInputLogic.h:128
virtual void view8(float value)
Handler for directly selecting view 8.
virtual void view1(float value)
Handler for directly selecting view 1.
virtual void view5(float value)
Handler for directly selecting view 5.
virtual void nextView(float value)
Handler for the next view input action.
virtual void view10(float value)
Handler for directly selecting view 10.
virtual void view2(float value)
Handler for directly selecting view 2.
virtual void view3(float value)
Handler for directly selecting view 3.
virtual void view7(float value)
Handler for directly selecting view 7.
virtual void view6(float value)
Handler for directly selecting view 6.
Component for managing predefined observer views and positions in vehicles.
Definition savedViewUpdater.h:85
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Defines the DtInputLogic class for handling input in VR-Engage.
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Definition appLauncherComponent.h:28
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.