2020-01-09 23:10:09 +00:00
|
|
|
#ifndef OPENXR_INPUT_MANAGER_HPP
|
|
|
|
#define OPENXR_INPUT_MANAGER_HPP
|
|
|
|
|
|
|
|
#include "openxrmanager.hpp"
|
|
|
|
#include "../mwinput/inputmanagerimp.hpp"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <array>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
namespace MWVR
|
|
|
|
{
|
2020-02-14 21:11:19 +00:00
|
|
|
struct OpenXRActionEvent
|
|
|
|
{
|
|
|
|
MWInput::InputManager::Actions action;
|
|
|
|
bool onPress;
|
|
|
|
};
|
2020-01-23 23:14:23 +00:00
|
|
|
|
2020-01-09 23:10:09 +00:00
|
|
|
struct OpenXRInputManagerImpl;
|
|
|
|
struct OpenXRInputManager
|
|
|
|
{
|
|
|
|
OpenXRInputManager(osg::ref_ptr<OpenXRManager> XR);
|
|
|
|
~OpenXRInputManager();
|
|
|
|
|
|
|
|
void updateControls();
|
|
|
|
|
2020-02-14 21:11:19 +00:00
|
|
|
PoseSet getHandPoses(int64_t time, TrackedSpace space);
|
|
|
|
|
|
|
|
bool nextActionEvent(OpenXRActionEvent& action);
|
|
|
|
|
2020-01-23 23:14:23 +00:00
|
|
|
OpenXRInputManagerImpl& impl() { return *mPrivate; }
|
|
|
|
|
2020-01-09 23:10:09 +00:00
|
|
|
std::unique_ptr<OpenXRInputManagerImpl> mPrivate;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|