mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 10:33:21 +02:00
saving work
This commit is contained in:
parent
3a096381ce
commit
3e1aee4d8a
2 changed files with 14 additions and 1 deletions
plugins/openvr/src
|
@ -28,6 +28,8 @@
|
|||
#include <GLMHelpers.h>
|
||||
#include <glm/ext.hpp>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
#include <ui-plugins/PluginContainer.h>
|
||||
#include <plugins/DisplayPlugin.h>
|
||||
|
||||
#include <controllers/UserInputMapper.h>
|
||||
#include <Plugins/InputConfiguration.h>
|
||||
|
@ -121,6 +123,13 @@ static QString deviceTrackingResultToString(vr::ETrackingResult trackingResult)
|
|||
return result;
|
||||
}
|
||||
|
||||
bool ViveControllerManager::isDesktopMode() {
|
||||
if (_container) {
|
||||
return !_container->getActiveDisplayPlugin()->isHmd();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ViveControllerManager::calibrate() {
|
||||
if (isSupported()) {
|
||||
_inputDevice->calibrateNextFrame();
|
||||
|
@ -218,6 +227,10 @@ void ViveControllerManager::pluginUpdate(float deltaTime, const controller::Inpu
|
|||
return;
|
||||
}
|
||||
|
||||
if (isDesktopMode()) {
|
||||
qDebug() << "In desktop mode";
|
||||
}
|
||||
|
||||
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();
|
||||
handleOpenVrEvents();
|
||||
if (openVrQuitRequested()) {
|
||||
|
|
|
@ -189,7 +189,7 @@ private:
|
|||
};
|
||||
|
||||
void renderHand(const controller::Pose& pose, gpu::Batch& batch, int sign);
|
||||
|
||||
bool isDesktopMode();
|
||||
bool _registeredWithInputMapper { false };
|
||||
bool _modelLoaded { false };
|
||||
model::Geometry _modelGeometry;
|
||||
|
|
Loading…
Reference in a new issue