2020-01-09 23:10:09 +00:00
|
|
|
#include "engine.hpp"
|
2020-11-01 14:45:14 +00:00
|
|
|
|
2020-01-09 23:10:09 +00:00
|
|
|
#include "mwvr/openxrmanager.hpp"
|
2020-05-24 16:00:42 +00:00
|
|
|
#include "mwvr/vrsession.hpp"
|
|
|
|
#include "mwvr/vrviewer.hpp"
|
2020-05-01 19:37:01 +00:00
|
|
|
#include "mwvr/vrgui.hpp"
|
2021-05-20 20:40:48 +00:00
|
|
|
#include "mwvr/vrtracking.hpp"
|
2020-01-09 23:10:09 +00:00
|
|
|
|
|
|
|
#ifndef USE_OPENXR
|
|
|
|
#error "USE_OPENXR not defined"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void OMW::Engine::initVr()
|
|
|
|
{
|
|
|
|
if (!mViewer)
|
|
|
|
throw std::logic_error("mViewer must be initialized before calling initVr()");
|
|
|
|
|
2020-02-29 22:53:56 +00:00
|
|
|
mXrEnvironment.setManager(new MWVR::OpenXRManager);
|
2020-05-24 16:00:42 +00:00
|
|
|
mXrEnvironment.setSession(new MWVR::VRSession());
|
|
|
|
mXrEnvironment.setViewer(new MWVR::VRViewer(mViewer));
|
2021-05-20 20:40:48 +00:00
|
|
|
mXrEnvironment.setTrackingManager(new MWVR::VRTrackingManager());
|
2020-01-09 23:10:09 +00:00
|
|
|
}
|