VR-Engage  2.3
Loading...
Searching...
No Matches
DtVirtualRealityEventProcessorInterface.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file DtVirtualRealityEventProcessorInterface.h
7//! \brief Defines an interface for processing VR controller events
8//!
9//! This file contains the definition of the DtVirtualRealityEventProcessorInterface class,
10//! which defines the interface that must be implemented by any class that wants to
11//! receive and process VR controller events. Event processors are registered with the
12//! DtVirtualRealityEventManager, which dispatches controller events to them.
13
14#pragma once
15
18
19namespace makVrv
20{
21//! \brief Interface for processing virtual reality controller events
22//!
23//! This abstract base class defines the interface that must be implemented by any
24//! class that wants to receive and process VR controller events. Event processors
25//! are registered with the DtVirtualRealityEventManager, which dispatches controller
26//! events to them in the order they are registered. Event processors can be enabled
27//! or disabled to control whether they receive events.
29{
30public:
31 //! \brief Default constructor
32 //!
33 //! Initializes a new event processor with default settings.
34 //! By default, the processor is enabled (will receive events when registered).
36
37 //! \brief Virtual destructor
38 //!
39 //! Ensures proper cleanup of derived classes.
41
42 //! \brief Processes a VR controller event
43 //! \param ev The controller event to process
44 //! \return True if the event was handled and should not be processed further,
45 //! false to allow the event to be passed to the next processor
46 //!
47 //! This pure virtual method must be implemented by derived classes to define
48 //! how they respond to controller events. If the method returns true, the event
49 //! is considered handled and will not be passed to any further event processors.
50 //! If it returns false, the event will be passed to the next processor in the queue.
52
53 //! \brief Enables or disables the event processor
54 //! \param enable True to enable the processor, false to disable it
55 //!
56 //! When enabled (the default), the processor will receive controller events.
57 //! When disabled, the processor will remain registered but will not receive
58 //! any events until it is enabled again.
59 virtual void setEnabled(bool enable);
60
61 //! \brief Checks if the event processor is enabled
62 //! \return True if the processor is enabled, false if disabled
63 //!
64 //! Returns whether the processor is currently enabled to receive events.
65 virtual bool enabled() const;
66
67protected:
68 //! \brief Flag indicating whether this processor is enabled
69 //!
70 //! When true, this processor will receive controller events. When false,
71 //! it will remain registered but will not receive any events.
73};
74} // namespace makVrv
Defines a class that encapsulates VR controller events.
Encapsulates a virtual reality controller event.
Definition DtVirtualRealityControllerEvent.h:29
virtual void setEnabled(bool enable)
Enables or disables the event processor.
virtual bool processControllerEvent(const DtVirtualRealityControllerEvent &ev)=0
Processes a VR controller event.
bool myEnabled
Flag indicating whether this processor is enabled.
Definition DtVirtualRealityEventProcessorInterface.h:72
virtual ~DtVirtualRealityEventProcessorInterface()
Virtual destructor.
virtual bool enabled() const
Checks if the event processor is enabled.
DtVirtualRealityEventProcessorInterface()
Default constructor.
Definition appLauncherComponent.h:28
Main header file for the VRV Virtual Reality Controller module.