VR-Engage  2.2
Loading...
Searching...
No Matches
vrvSensorOverlayUpdater.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vrvSensorOverlayUpdater.h
7//! \brief Component for managing gimbal sensor overlay sections
8//! \ingroup vreCommonComponents
9
10#pragma once
11
14
15namespace makVre
16{
18{
19//! \ingroup RoleConfigParams
20//! \defgroup VrvSensorOverlayUpdaterRoleParams VRV Sensor Overlay Updater Role Parameters
21//! \roleInherits{PlayerComponentRoleParams}
22//! Configuration Options for VRV sensor overlay updater role.
23//! @{
24
25//! \vreRoleParamRequired{sections,table,vrvSensorOverlayUpdater,{},Table of sensor overlay section names to display in the gimbal sensor view.}
26constexpr const char* sections = "sections";
27
28//! @}
29} // namespace VrvSensorOverlayUpdaterConfig
30
31//! \brief Type identifier for DtVrvSensorOverlayUpdater component
32constexpr const char* DtVrvSensorOverlayUpdaterType = "DtVrvSensorOverlayUpdater";
33
34//! \brief Component for configuring and managing gimbal sensor overlay sections
35//!
36//! DtVrvSensorOverlayUpdater manages which overlay sections are displayed
37//! in the gimbal sensor view. It allows customization of the sensor display
38//! by including or excluding specific overlay sections based on configuration,
39//! and restores default sections when shutting down.
41{
42public:
43 //! \brief Constructor for DtVrvSensorOverlayUpdater
44 //!
45 //! Initializes the component with the name "DtVrvSensorOverlayUpdater"
47
48 //! \brief Virtual destructor for DtVrvSensorOverlayUpdater
49 virtual ~DtVrvSensorOverlayUpdater() override;
50
51 //! \brief Initializes the sensor overlay updater component
52 //! \param player Pointer to the player station this component belongs to
53 //! \param config Configuration table containing overlay section settings
54 //! \return True if initialization succeeded, false otherwise
55 //!
56 //! Reads the "sections" configuration list to determine which overlay sections
57 //! should be displayed. If no sections are specified, default overlay sections
58 //! will be used. Sends a SetGimbalOverlaySectionsMessage with the configured
59 //! sections to apply the changes.
61 //! \brief Called every frame to update the component state
62 //! \param dt Delta time since the last frame in seconds
63 //!
64 //! Current implementation has no per-frame update actions
65 virtual void tick(double dt) override;
66 //! \brief Shuts down the sensor overlay updater component
67 //!
68 //! Sends a RestoreGimbalOverlaySectionsMessage to revert to the default
69 //! overlay sections configuration
70 virtual void shutdown() override;
71
72 //! \brief Returns the type identifier for this component
73 //! \return The type string for DtVrvSensorOverlayUpdater
74 virtual const char* type() const override;
75
76protected:
77 // No protected members are required for this component
78};
79} // namespace makVre
Table-based access to Lua state for configuration data.
Definition initializer.h:38
virtual DtPlayerStation & player()
Gets the player station.
DtPlayerComponent()
Constructor.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
virtual void shutdown() override
Shuts down the sensor overlay updater component.
DtVrvSensorOverlayUpdater()
Constructor for DtVrvSensorOverlayUpdater.
virtual ~DtVrvSensorOverlayUpdater() override
Virtual destructor for DtVrvSensorOverlayUpdater.
virtual void tick(double dt) override
Called every frame to update the component state.
virtual bool initialize(makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
Initializes the sensor overlay updater component.
virtual const char * type() const override
Returns the type identifier for this component.
constexpr const char * sections
Definition vrvSensorOverlayUpdater.h:26
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Definition vrvSensorOverlayUpdater.h:18
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
constexpr const char * DtVrvSensorOverlayUpdaterType
Type identifier for DtVrvSensorOverlayUpdater component.
Definition vrvSensorOverlayUpdater.h:32
Defines the DtPlayerComponent base class for VR-Engage role components.