VR-Engage  2.2
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//! \ingroup vrvVirtualRealityController
9//!
10//! This file contains the definition of the DtVirtualRealityEventProcessorInterface class,
11//! which defines the interface that must be implemented by any class that wants to
12//! receive and process VR controller events. Event processors are registered with the
13//! DtVirtualRealityEventManager, which dispatches controller events to them.
14
15#pragma once
16
19
20namespace makVrv
21{
22//! \brief Interface for processing virtual reality controller events
23//!
24//! This abstract base class defines the interface that must be implemented by any
25//! class that wants to receive and process VR controller events. Event processors
26//! are registered with the DtVirtualRealityEventManager, which dispatches controller
27//! events to them in the order they are registered. Event processors can be enabled
28//! or disabled to control whether they receive events.
30{
31public:
32 //! \brief Default constructor
33 //!
34 //! Initializes a new event processor with default settings.
35 //! By default, the processor is enabled (will receive events when registered).
37
38 //! \brief Virtual destructor
39 //!
40 //! Ensures proper cleanup of derived classes.
42
43 //! \brief Processes a VR controller event
44 //! \param ev The controller event to process
45 //! \return True if the event was handled and should not be processed further,
46 //! false to allow the event to be passed to the next processor
47 //!
48 //! This pure virtual method must be implemented by derived classes to define
49 //! how they respond to controller events. If the method returns true, the event
50 //! is considered handled and will not be passed to any further event processors.
51 //! If it returns false, the event will be passed to the next processor in the queue.
53
54 //! \brief Enables or disables the event processor
55 //! \param enable True to enable the processor, false to disable it
56 //!
57 //! When enabled (the default), the processor will receive controller events.
58 //! When disabled, the processor will remain registered but will not receive
59 //! any events until it is enabled again.
60 virtual void setEnabled(bool enable);
61
62 //! \brief Checks if the event processor is enabled
63 //! \return True if the processor is enabled, false if disabled
64 //!
65 //! Returns whether the processor is currently enabled to receive events.
66 virtual bool enabled() const;
67
68protected:
69 //! \brief Flag indicating whether this processor is enabled
70 //!
71 //! When true, this processor will receive controller events. When false,
72 //! it will remain registered but will not receive any events.
74};
75} // namespace makVrv
Defines a class that encapsulates VR controller events.
Encapsulates a virtual reality controller event.
Definition DtVirtualRealityControllerEvent.h:30
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:73
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.