19#include <vrvCore/DtUniqueID.h>
20#include <vlutil/vlFilename.h>
22#include <makArchives/DtObserverStateRecordsList.h>
73class DtSavedViewInputLogic;
108 virtual void tick(
double dt)
override;
117 virtual const char*
type()
const override;
150 virtual void toggleView(
const std::string& viewName,
bool allowPartialMatch);
Table-based access to Lua state for configuration data.
Definition initializer.h:38
Base component for managing observer view parameters and display settings.
Definition observerUpdater.h:83
virtual DtPlayerStation & player()
Gets the player station.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
int myInitialView
Index of the initial view to activate on startup.
Definition savedViewUpdater.h:295
virtual void loadSavedViews(DtFilename filename)
Loads saved views from a file.
void updateSensor()
Updates the observer's sensor mode based on current state.
virtual void toggleView(const std::string &viewName, bool allowPartialMatch)
Toggles between a named view and a previously active view.
virtual makVre::DtVreMessageResult handleMenuMessage(makVre::DtVreMessage *msg)
Handles menu action messages related to saved views.
std::vector< std::string > myLastChannelKeywords
List of channel keywords applied for the current view.
Definition savedViewUpdater.h:292
std::string myObserverName
Name of the observer to use.
Definition savedViewUpdater.h:304
int myNumViews
Total number of available saved views.
Definition savedViewUpdater.h:271
virtual void nextView()
Switches to the next saved view in sequence.
virtual void showHumanModel()
Shows the human model if it exists.
std::map< std::string, std::string > ViewChannelKeywordMap
Type definition for mapping view names to channel keywords.
Definition savedViewUpdater.h:286
SensorViews myLastSensorViewMode
Last sensor view mode that was applied.
Definition savedViewUpdater.h:280
DtSavedViewUpdater()
Constructor for DtSavedViewUpdater.
makVrv::DtObserver * getObserver()
Gets the observer being managed by this component.
makArchives::DtObserverStateRecordsList myCachedObserverViews
List of observer state records loaded from the saved views file.
Definition savedViewUpdater.h:316
virtual ~DtSavedViewUpdater() override
Virtual destructor for DtSavedViewUpdater.
virtual void slot_disSceneObjectToBeDeleted(const makVrv::DtUniqueID &id)
Slot called when the human scene object is about to be deleted.
bool myHideModel
Flag indicating if the model should be hidden.
Definition savedViewUpdater.h:301
void updateDestroyed()
Updates view settings when the vehicle is destroyed.
std::vector< std::string > mySavedViews
Names of the saved views.
Definition savedViewUpdater.h:283
void updateChannelForViewName(const std::string &viewName)
Updates channel keywords based on the current view name.
virtual DtFilename getSavedViewsFileName()
Gets the filename of the currently loaded saved views file.
bool myAllowChangingViews
Flag indicating if view changes are allowed.
Definition savedViewUpdater.h:298
virtual void previousView()
Switches to the previous saved view in sequence.
makVrv::DtObserver * myObserver
Pointer to the observer being managed by this component.
Definition savedViewUpdater.h:262
virtual makArchives::DtObserverStateRecordsList getSavedViewsRecords()
Gets the list of loaded saved view records.
virtual bool shouldHideHumanModel(std::string viewName) const
Determines if the human model should be hidden for a specific view.
virtual void setupObserver()
Sets up the observer attachment configuration.
std::shared_ptr< DtSavedViewInputLogic > getInputLogic()
Gets the input logic component for saved views.
virtual void shutdown() override
Shuts down the saved view updater component.
virtual bool initialize(makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
Initializes the saved view updater component.
ViewChannelKeywordMap myViewChannelKeywordMap
Mapping from view names to channel keywords.
Definition savedViewUpdater.h:289
bool myInGunnerSeat
Flag indicating if the current view is a gunner seat view.
Definition savedViewUpdater.h:277
DtFilename mySavedViewsFileName
Path to the file containing saved view definitions.
Definition savedViewUpdater.h:313
int myCurrentView
Index of the currently active saved view.
Definition savedViewUpdater.h:265
std::shared_ptr< DtSavedViewInputLogic > myInputLogic
Input logic component that handles saved view input bindings.
Definition savedViewUpdater.h:259
virtual void hideHumanModel()
Hides the human model if it exists.
int myViewToReturnTo
Index of the view to return to when toggling views.
Definition savedViewUpdater.h:268
virtual void tick(double dt) override
Called every frame to update the saved view system.
virtual makVre::DtVreMessageResult handlePlayerCreated(makVre::DtVreMessage *msg)
Handles player creation messages.
std::vector< std::string > myHideHumanModelInSavedViews
List of view names for which the human model should be hidden.
Definition savedViewUpdater.h:319
virtual void debugSavedViews()
Provides an interactive ImGui debug interface for saved views management.
std::string myWindowName
Name of the window containing the channel.
Definition savedViewUpdater.h:310
std::string myChannelName
Name of the channel to update with view keywords.
Definition savedViewUpdater.h:307
virtual DtPlayerStation * findHumanPlayer() const
Finds the human player station if walk-on embarkation was used.
bool myHumanSceneObjectInitiallyVisible
Initial visibility state of the human scene object.
Definition savedViewUpdater.h:325
virtual void gotoView(unsigned int viewIndex)
Switches to a specific saved view by index.
makVrv::DtSceneObject * myHumanSceneObject
Pointer to the human scene object for walk-on embarkation.
Definition savedViewUpdater.h:322
std::string myGunnerSeatView
Name of the gunner seat view.
Definition savedViewUpdater.h:274
virtual const char * type() const override
Returns the type identifier for this component.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Base component for managing observer parameters and view settings.
constexpr const char * channelName
Definition savedViewUpdater.h:45
constexpr const char * initialView
Definition savedViewUpdater.h:51
constexpr const char * windowName
Definition savedViewUpdater.h:66
constexpr const char * savedViews
Definition savedViewUpdater.h:57
constexpr const char * allowChangingViews
Definition savedViewUpdater.h:42
constexpr const char * viewChannelKeywordMap
Definition savedViewUpdater.h:63
constexpr const char * showCockpits
Definition savedViewUpdater.h:60
constexpr const char * hideHumanInSavedViews
Definition savedViewUpdater.h:48
constexpr const char * observerName
Definition savedViewUpdater.h:54
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Definition savedViewUpdater.h:34
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
constexpr const char * DtSavedViewUpdaterType
Type identifier for DtSavedViewUpdater component.
Definition savedViewUpdater.h:76
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
SensorViews
Enumeration of available sensor view modes.
Definition stateDefines.h:18
Definition appLauncherComponent.h:28
Common enumeration definitions used throughout the VREngage system.
Defines the base class for all VREngage messages.