Files
UnrealEngineUWP/Engine/Plugins/Runtime/WindowsMixedReality/Source/WindowsMixedRealitySpatialInput/Public/IWindowsMixedRealitySpatialInputPlugin.h
Marc Audy 4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00

55 lines
1.7 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
#pragma once
#include "Modules/ModuleManager.h"
#include "IInputDeviceModule.h"
#define SpatialInputName "WindowsMixedRealitySpatialInput"
/**
* The public interface to this module. In most cases, this interface is only public to sibling modules
* within this plugin.
*/
class IWindowsMixedRealitySpatialInputPlugin : public IInputDeviceModule
{
public:
/**
* Creates a Windows Mixed Reality Spatial Input device using default settings.
*
* @param InMessageHandler - Message handler used to send controller messages.
*/
virtual TSharedPtr<class IInputDevice> CreateInputDevice(
const TSharedRef<FGenericApplicationMessageHandler> & InMessageHandler) = 0;
/**
* Returns the Windows Mixed Reality Spatial Input Device associated with this InputDeviceModule.
*
* @return Shared pointer to the Input Device.
*/
virtual TSharedPtr<IInputDevice> GetInputDevice() = 0;
/**
* Singleton-like access to this module's interface. This is just for convenience!
* Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
*
* @return Returns singleton instance, loading the module on demand if needed
*/
static inline IWindowsMixedRealitySpatialInputPlugin& Get()
{
return FModuleManager::LoadModuleChecked< IWindowsMixedRealitySpatialInputPlugin >(SpatialInputName);
}
/**
* Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
*
* @return True if the module is loaded and ready to use
*/
static inline bool IsAvailable()
{
return FModuleManager::Get().IsModuleLoaded(SpatialInputName);
}
virtual void OnConfigureGestures(const FXRGestureConfig& InGestureConfig, bool& bSuccess) = 0;
};