VR-Engage  2.2
Loading...
Searching...
No Matches
vreBinocularsZoomOverlay.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreBinocularsZoomOverlay.h
7//! \brief Component for binoculars zoom status overlay
8//! \ingroup vreCommonComponents
9
10#pragma once
11
15
16namespace makVre
17{
18//! \brief Type identifier for DtBinocularsZoomOverlay component
19constexpr const char* DtBinocularsZoomOverlayType = "DtBinocularsZoomOverlay";
20
21//! \brief Component that provides a specialized overlay for binoculars at maximum zoom level
22//!
23//! DtBinocularsZoomOverlay extends the basic binoculars overlay with functionality
24//! specific to maximum zoom level indication. The overlay is only visible when the
25//! binoculars are at their maximum zoom level, providing a visual indication to the user
26//! that they cannot zoom in any further. It inherits core functionality from the
27//! DtBinocularsOverlay class.
29{
30public:
31 //! \brief Constructor for DtBinocularsZoomOverlay
32 //!
33 //! Initializes the component with default settings
35
36 //! \brief Virtual destructor for DtBinocularsZoomOverlay
37 virtual ~DtBinocularsZoomOverlay() override;
38
39 //! \brief Initializes the binoculars zoom overlay component
40 //! \param player Pointer to the player station this component belongs to
41 //! \param config Configuration table containing overlay settings
42 //! \return True if initialization succeeded, false otherwise
43 //!
44 //! Forwards initialization to the base class and performs any specialized setup
46 //! \brief Performs post-initialization after all components are initialized
47 //! \return True if post-initialization succeeded, false otherwise
48 //!
49 //! Completes initialization by calling the base class post-initialize
50 virtual bool postInitialize() override;
51 //! \brief Called every frame to update the overlay state
52 //! \param dt Delta time since the last frame in seconds
53 //!
54 //! Updates overlay visibility and other state based on current zoom level
55 virtual void tick(double dt) override;
56
57 //! \brief Determines if the zoom overlay should be visible
58 //! \return True if the overlay should be visible, false otherwise
59 //!
60 //! Checks if base binoculars overlay is visible and if the current
61 //! view magnification is at the maximum allowed value
62 virtual bool isOverlayVisible() override;
63
64 //! \brief Returns the type identifier for this component
65 //! \return The type string for DtBinocularsZoomOverlay
66 virtual const char* type() const override;
67};
68} // namespace makVre
DtBinocularsOverlay(const std::string &className="DtBinocularsOverlay")
Constructor for DtBinocularsOverlay.
virtual bool initialize(makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
Initializes the binoculars zoom overlay component.
virtual void tick(double dt) override
Called every frame to update the overlay state.
virtual ~DtBinocularsZoomOverlay() override
Virtual destructor for DtBinocularsZoomOverlay.
DtBinocularsZoomOverlay()
Constructor for DtBinocularsZoomOverlay.
virtual bool postInitialize() override
Performs post-initialization after all components are initialized.
virtual const char * type() const override
Returns the type identifier for this component.
virtual bool isOverlayVisible() override
Determines if the zoom overlay should be visible.
Table-based access to Lua state for configuration data.
Definition initializer.h:38
virtual DtPlayerStation & player()
Gets the player station.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
constexpr const char * DtBinocularsZoomOverlayType
Type identifier for DtBinocularsZoomOverlay component.
Definition vreBinocularsZoomOverlay.h:19
Defines the DtPlayerComponent base class for VR-Engage role components.
Component for displaying binoculars reticle overlay.