IFoveHMDPlugin.h 976 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "ModuleManager.h"
  3. #include "IHeadMountedDisplayModule.h"
  4. /**
  5. * The public interface to this module. In most cases, this interface is only public to sibling modules
  6. * within this plugin.
  7. */
  8. class IFoveHMDPlugin : public IHeadMountedDisplayModule
  9. {
  10. public:
  11. /**
  12. * Singleton-like access to this module's interface. This is just for convenience!
  13. * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
  14. *
  15. * @return Returns singleton instance, loading the module on demand if needed
  16. */
  17. static inline IFoveHMDPlugin& Get()
  18. {
  19. return FModuleManager::LoadModuleChecked<IFoveHMDPlugin>("FoveHMD");
  20. }
  21. /**
  22. * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
  23. *
  24. * @return True if the module is loaded and ready to use
  25. */
  26. static inline bool IsAvailable()
  27. {
  28. return FModuleManager::Get().IsModuleLoaded("FoveHMD");
  29. }
  30. };