VR-Engage  2.2
Loading...
Searching...
No Matches
makVrv::DtVirtualRealityEventProcessorInterface Class Referenceabstract

Detailed Description

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>

Public Member Functions

 DtVirtualRealityEventProcessorInterface ()
 
virtual ~DtVirtualRealityEventProcessorInterface ()
 
virtual bool processControllerEvent (const DtVirtualRealityControllerEvent &ev)=0
 
virtual void setEnabled (bool enable)
 
virtual bool enabled () const
 

Protected Attributes

bool myEnabled
 

Constructor & Destructor Documentation

◆ 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.

Member Function Documentation

◆ processControllerEvent()

virtual bool makVrv::DtVirtualRealityEventProcessorInterface::processControllerEvent ( const DtVirtualRealityControllerEvent & ev)
pure virtual

Processes a VR controller event.

Parameters
evThe 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
enableTrue 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.

Member Data Documentation

◆ 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: