1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 10:19:55 +00:00
openmw-tes3mp/apps/openmw/mwvr/openxraction.hpp
2020-06-21 23:40:07 +02:00

35 lines
896 B
C++

#ifndef OPENXR_ACTION_HPP
#define OPENXR_ACTION_HPP
#include <openxr/openxr.h>
#include <string>
namespace MWVR
{
struct OpenXRAction
{
private:
OpenXRAction(const OpenXRAction&) = default;
OpenXRAction& operator=(const OpenXRAction&) = default;
public:
OpenXRAction(XrAction action, XrActionType actionType, const std::string& actionName, const std::string& localName);
~OpenXRAction();
//! Convenience
operator XrAction() { return mAction; }
bool getFloat(XrPath subactionPath, float& value);
bool getBool(XrPath subactionPath, bool& value);
bool getPoseIsActive(XrPath subactionPath);
bool applyHaptics(XrPath subactionPath, float amplitude);
XrAction mAction = XR_NULL_HANDLE;
XrActionType mType;
std::string mName;
std::string mLocalName;
};
}
#endif