VR-Engage  2.2
Loading...
Searching...
No Matches
makVrv::DtOculusEventManager Class Reference

Detailed Description

This class is responsible for processing Oculus Touch controller events and translating them into the common VR controller event format. It communicates with the Oculus SDK to retrieve controller state information and dispatches controller events to registered event processors.

Note
This class is created automatically by the DtVirtualRealityDriver and is not intended to be instantiated directly by users.

#include <DtOculusEventManager.h>

Inheritance diagram for makVrv::DtOculusEventManager:
[legend]

Public Member Functions

virtual ~DtOculusEventManager () override
 
- Public Member Functions inherited from makVrv::DtVirtualRealityEventManager
virtual ~DtVirtualRealityEventManager () override
 
virtual void addEventProcessorToFront (DtVirtualRealityEventProcessorInterface *processor)
 
virtual void addEventProcessorToBack (DtVirtualRealityEventProcessorInterface *processor)
 
virtual void removeEventProcessor (DtVirtualRealityEventProcessorInterface *processor)
 
virtual const EventProcessorListeventProccesorList () const
 
virtual EventProcessorListeventProccesorList ()
 
const ControllerStateMapcontrollerStateMap () const
 

Static Public Member Functions

static DtVirtualRealityEventManagerinstance (DtDe &de)
 
- Static Public Member Functions inherited from makVrv::DtVirtualRealityEventManager
static DtVirtualRealityEventManagerinstance (DtDe &de)
 

Protected Member Functions

 DtOculusEventManager (DtDe &de)
 
virtual void processVrEvents () override
 
virtual void updateControllerPositions (ovrTrackingState &tracking)
 
virtual void updateControllerInputs (ovrInputState &inputState)
 
virtual DtVirtualRealityControllerState::Bitfield findDeviceType (DtVirtualRealityControllerState::ControllerId deviceId) const
 
- Protected Member Functions inherited from makVrv::DtVirtualRealityEventManager
 DtVirtualRealityEventManager (DtDe &de)
 
virtual void dispatchControllerEvent (DtVirtualRealityControllerEvent &event)
 
virtual void tick ()
 

Private Member Functions

 DtOculusEventManager ()
 

Additional Inherited Members

- Public Types inherited from makVrv::DtVirtualRealityEventManager
using ControllerStateMap = std::map<unsigned int, DtVirtualRealityControllerState*>
 
- Protected Attributes inherited from makVrv::DtVirtualRealityEventManager
DtDe & myDe
 
DtVirtualRealityDriver * myVrDriver
 
EventProcessorList myEventProcessors
 
ControllerStateMap myControllerStates
 

Constructor & Destructor Documentation

◆ DtOculusEventManager() [1/2]

makVrv::DtOculusEventManager::DtOculusEventManager ( )
private

Unused default constructor.

◆ ~DtOculusEventManager()

virtual makVrv::DtOculusEventManager::~DtOculusEventManager ( )
overridevirtual

Virtual destructor.

Cleans up Oculus event manager resources and releases connections to the Oculus SDK.

◆ DtOculusEventManager() [2/2]

makVrv::DtOculusEventManager::DtOculusEventManager ( DtDe & de)
protected

Constructor.

Parameters
deReference to the display engine

Initializes the Oculus event manager with a reference to the display engine. This constructor is only called by the registerInstance method and should not be called directly.

References de().

Member Function Documentation

◆ instance()

static DtVirtualRealityEventManager & makVrv::DtOculusEventManager::instance ( DtDe & de)
static

Gets the singleton instance of the Oculus event manager.

Parameters
deReference to the display engine
Returns
Reference to the singleton instance
Exceptions
DtCorruptedStateif it is unable to get the instance

Returns the singleton instance of the Oculus event manager, creating it if it doesn't already exist. This method is called by the VR driver during initialization.

References de(), and makVrv::DtVirtualRealityEventManager::DtVirtualRealityEventManager().

◆ processVrEvents()

virtual void makVrv::DtOculusEventManager::processVrEvents ( )
overrideprotectedvirtual

Collects and dispatches events from the Oculus VR system.

Polls the Oculus SDK for controller state updates, processes button and analog input events, and dispatches them to registered event processors.

Note
This method is called by the DtVirtualRealityDriver during the update cycle and is not intended to be called directly by users.

Implements makVrv::DtVirtualRealityEventManager.

◆ updateControllerPositions()

virtual void makVrv::DtOculusEventManager::updateControllerPositions ( ovrTrackingState & tracking)
protectedvirtual

Updates controller positions from Oculus tracking data.

Parameters
trackingThe Oculus tracking state containing position and orientation data

Processes the controller tracking data from the Oculus SDK and updates the internal controller state with new position and orientation information.

◆ updateControllerInputs()

virtual void makVrv::DtOculusEventManager::updateControllerInputs ( ovrInputState & inputState)
protectedvirtual

Updates controller input states from Oculus input data.

Parameters
inputStateThe Oculus input state containing button and analog input data

Processes the controller input data from the Oculus SDK and updates the internal controller state with button presses, touches, and analog input values.

◆ findDeviceType()

virtual DtVirtualRealityControllerState::Bitfield makVrv::DtOculusEventManager::findDeviceType ( DtVirtualRealityControllerState::ControllerId deviceId) const
protectedvirtual

Determines the device type for a given controller ID.

Parameters
deviceIdThe controller identifier to query
Returns
Bitfield representing the device type

Maps an Oculus-specific device identifier to the common controller device type enumeration used throughout the application.


The documentation for this class was generated from the following file: