VR-Engage  2.2
Loading...
Searching...
No Matches
pilotMenuLogic.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file pilotMenuLogic.h
7//! \brief Defines DtPilotMenuLogic for managing pilot-specific menu interactions
8//! \ingroup vrePilotFrontend
9
10#pragma once
11
13
15
17
18namespace makVre
19{
20//! \brief Forward declaration of the pilot simulation logic class
21class DtPilotSimLogic;
22
23//! \brief Forward declaration of the action menu logic class
25
26//! \brief Type identifier constant for DtPilotMenuLogic components
27//!
28//! This constant defines the string identifier used to identify DtPilotMenuLogic
29//! component types within the VR-Engage framework. It is used for component
30//! registration, type checking, and serialization operations.
31constexpr const char* DtPilotMenuLogicType = "DtPilotMenuLogic";
32
33//! \brief Menu logic component for the pilot role
34//!
35//! DtPilotMenuLogic manages context-sensitive menus and commands for the pilot
36//! entity, handling interactions and menu selections specific to aircraft operations.
37//! It processes menu selections and converts them into appropriate simulation commands.
39{
40public:
41 //! \brief Default constructor
43
44 //! \brief Virtual destructor
45 virtual ~DtPilotMenuLogic() override;
46
47 //! \brief Initializes the menu logic component
48 //! \param player Pointer to the player station
49 //! \param config Configuration settings for initialization
50 //! \return True if initialization was successful, false otherwise
51 virtual bool initialize(DtPlayerStation* player, DtInitTable& config) override;
52
53 //! \brief Performs post-initialization setup
54 //! \return True if post-initialization was successful, false otherwise
55 virtual bool postInitialize() override;
56
57 //! \brief Updates menu logic for the current frame
58 //! \param dt Delta time since the last frame in seconds
59 virtual void tick(double dt) override;
60
61 //! \brief Cleans up resources when the component is being shut down
62 virtual void shutdown() override;
63
64 //! \brief Returns the component type identifier
65 //! \return String identifier for this component type
66 //!
67 //! Returns the type identifier string for this component, which is used
68 //! by the VR-Engage framework for component identification and management.
69 //! The returned value matches DtPilotMenuLogicType.
70 virtual const char* type() const override;
71
72 //! \brief Handles menu-related messages
73 //! \param msg Pointer to the message being processed
74 //! \return Message processing result
76
77 //! \brief Handles sensor data messages
78 //! \param msg Pointer to the message being processed
79 //! \return Message processing result
81
82protected:
83 //! \brief Pointer to the pilot simulation logic component
85};
86
87} // namespace makVre
Component for managing entity interaction menus and their logic.
Definition actionMenuLogic.h:95
Table-based access to Lua state for configuration data.
Definition initializer.h:38
DtPilotSimLogic * myPilotSimLogic
Pointer to the pilot simulation logic component.
Definition pilotMenuLogic.h:84
virtual void tick(double dt) override
Updates menu logic for the current frame.
virtual const char * type() const override
Returns the component type identifier.
virtual DtVreMessageResult handleMenuMessage(DtVreMessage *msg)
Handles menu-related messages.
virtual ~DtPilotMenuLogic() override
Virtual destructor.
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the menu logic component.
virtual void shutdown() override
Cleans up resources when the component is being shut down.
DtPilotMenuLogic()
Default constructor.
virtual DtVreMessageResult handleSensorData(DtVreMessage *msg)
Handles sensor data messages.
virtual bool postInitialize() override
Performs post-initialization setup.
Simulation logic component for the pilot role.
Definition pilotSimLogic.h:89
Base class for all role components in VR-Engage.
Definition playerComponent.h:78
virtual DtPlayerStation & player()
Gets the player station.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Defines export/import macros for the Pilot Frontend library.
#define PILOT_DLL
Definition export.h:19
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
constexpr const char * DtPilotMenuLogicType
Type identifier constant for DtPilotMenuLogic components.
Definition pilotMenuLogic.h:31
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Defines the DtPlayerComponent base class for VR-Engage role components.
Defines the base class for all VREngage messages.