This abstract base class defines the interface that must be implemented by any class that wants to receive and process VR controller events. Event processors are registered with the DtVirtualRealityEventManager, which dispatches controller events to them in the order they are registered. Event processors can be enabled or disabled to control whether they receive events.
#include <DtVirtualRealityEventProcessorInterface.h>
◆ DtVirtualRealityEventProcessorInterface()
| makVrv::DtVirtualRealityEventProcessorInterface::DtVirtualRealityEventProcessorInterface |
( |
| ) |
|
Default constructor.
Initializes a new event processor with default settings. By default, the processor is enabled (will receive events when registered).
◆ ~DtVirtualRealityEventProcessorInterface()
| virtual makVrv::DtVirtualRealityEventProcessorInterface::~DtVirtualRealityEventProcessorInterface |
( |
| ) |
|
|
virtual |
Virtual destructor.
Ensures proper cleanup of derived classes.
◆ processControllerEvent()
Processes a VR controller event.
- Parameters
-
| ev | The controller event to process |
- Returns
- True if the event was handled and should not be processed further, false to allow the event to be passed to the next processor
This pure virtual method must be implemented by derived classes to define how they respond to controller events. If the method returns true, the event is considered handled and will not be passed to any further event processors. If it returns false, the event will be passed to the next processor in the queue.
◆ setEnabled()
| virtual void makVrv::DtVirtualRealityEventProcessorInterface::setEnabled |
( |
bool | enable | ) |
|
|
virtual |
Enables or disables the event processor.
- Parameters
-
| enable | True to enable the processor, false to disable it |
When enabled (the default), the processor will receive controller events. When disabled, the processor will remain registered but will not receive any events until it is enabled again.
◆ enabled()
| virtual bool makVrv::DtVirtualRealityEventProcessorInterface::enabled |
( |
| ) |
const |
|
virtual |
Checks if the event processor is enabled.
- Returns
- True if the processor is enabled, false if disabled
Returns whether the processor is currently enabled to receive events.
◆ myEnabled
| bool makVrv::DtVirtualRealityEventProcessorInterface::myEnabled |
|
protected |
Flag indicating whether this processor is enabled.
When true, this processor will receive controller events. When false, it will remain registered but will not receive any events.
The documentation for this class was generated from the following file: