|
VR-Engage
2.2
|
This class is responsible for processing SteamVR/OpenVR controller events and translating them into the common VR controller event format. It communicates with the OpenVR API to retrieve controller state information and dispatches controller events to registered event processors.
#include <DtOpenVREventManager.h>
Public Member Functions | |
| virtual | ~DtOpenVREventManager () 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 EventProcessorList & | eventProccesorList () const |
| virtual EventProcessorList & | eventProccesorList () |
| const ControllerStateMap & | controllerStateMap () const |
Static Public Member Functions | |
| static DtVirtualRealityEventManager & | instance (DtDe &de) |
Static Public Member Functions inherited from makVrv::DtVirtualRealityEventManager | |
| static DtVirtualRealityEventManager & | instance (DtDe &de) |
Protected Member Functions | |
| DtOpenVREventManager (DtDe &de) | |
| virtual void | processVrEvents () override |
| virtual void | updateControllerState (DtVirtualRealityControllerState::ControllerId deviceId, DtVirtualRealityControllerState &state) |
| 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 () |
Protected Attributes | |
| vr::IVRSystem * | myVrSystem |
Protected Attributes inherited from makVrv::DtVirtualRealityEventManager | |
| DtDe & | myDe |
| DtVirtualRealityDriver * | myVrDriver |
| EventProcessorList | myEventProcessors |
| ControllerStateMap | myControllerStates |
Private Member Functions | |
| DtOpenVREventManager () | |
Additional Inherited Members | |
Public Types inherited from makVrv::DtVirtualRealityEventManager | |
| using | ControllerStateMap = std::map<unsigned int, DtVirtualRealityControllerState*> |
|
private |
Unused default constructor.
Private constructor to prevent direct instantiation. Use the instance() method to get the singleton instance instead.
|
overridevirtual |
Virtual destructor.
Cleans up OpenVR event manager resources and releases connections to the OpenVR API.
|
protected |
Constructor.
| de | Reference to the display engine |
Initializes the OpenVR 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().
|
static |
Gets the singleton instance of the OpenVR event manager.
| de | Reference to the display engine |
| DtCorruptedState | if it is unable to get the instance |
Returns the singleton instance of the OpenVR 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().
|
overrideprotectedvirtual |
Collects and dispatches events from the OpenVR system.
Polls the OpenVR API for controller state updates, processes button and analog input events, and dispatches them to registered event processors.
Implements makVrv::DtVirtualRealityEventManager.
|
protectedvirtual |
Updates controller state for a specific controller.
| deviceId | The controller identifier to update |
| state | Reference to the controller state to update |
Updates the provided controller state object with the latest data from the OpenVR controller with the specified device ID. This includes position, orientation, button states, and analog input values.
|
protectedvirtual |
Determines the device type for a given controller ID.
| deviceId | The controller identifier to query |
Maps an OpenVR-specific device identifier to the common controller device type enumeration used throughout the application.
|
protected |
Pointer to the OpenVR system interface.
This pointer is used to communicate with the OpenVR API for retrieving controller state information and processing events.