mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
Switched devices to DependencyManager for Faceshift
This commit is contained in:
parent
1c17e396f2
commit
ad2dee5eaa
3 changed files with 9 additions and 5 deletions
|
@ -23,8 +23,8 @@ class FaceTracker : public QObject {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
FaceTracker();
|
||||
virtual ~FaceTracker() {}
|
||||
|
||||
const glm::vec3& getHeadTranslation() const { return _headTranslation; }
|
||||
const glm::quat& getHeadRotation() const { return _headRotation; }
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#include <fsbinarystream.h>
|
||||
#endif
|
||||
|
||||
#include <DependencyManager.h>
|
||||
|
||||
#include "FaceTracker.h"
|
||||
|
||||
/// Handles interaction with the Faceshift software, which provides head position/orientation and facial features.
|
||||
|
@ -27,6 +29,7 @@ class Faceshift : public FaceTracker {
|
|||
|
||||
public:
|
||||
Faceshift();
|
||||
virtual ~Faceshift() {}
|
||||
|
||||
void init();
|
||||
|
||||
|
|
|
@ -11,11 +11,12 @@
|
|||
|
||||
#include <QHash>
|
||||
|
||||
|
||||
#include <DependencyManager.h>
|
||||
#include <FBXReader.h>
|
||||
#include <PerfStat.h>
|
||||
#include <SharedUtil.h>
|
||||
|
||||
#include <FBXReader.h>
|
||||
|
||||
#include "Application.h"
|
||||
#include "Visage.h"
|
||||
|
||||
|
@ -119,7 +120,7 @@ static const QMultiHash<QByteArray, QPair<int, float> >& getActionUnitNameMap()
|
|||
const float TRANSLATION_SCALE = 20.0f;
|
||||
|
||||
void Visage::init() {
|
||||
connect(Application::getInstance()->getFaceshift(), SIGNAL(connectionStateChanged()), SLOT(updateEnabled()));
|
||||
connect(DependencyManager::get<Faceshift>(), SIGNAL(connectionStateChanged()), SLOT(updateEnabled()));
|
||||
updateEnabled();
|
||||
}
|
||||
|
||||
|
@ -171,7 +172,7 @@ void Visage::reset() {
|
|||
void Visage::updateEnabled() {
|
||||
setEnabled(Menu::getInstance()->isOptionChecked(MenuOption::Visage) &&
|
||||
!(Menu::getInstance()->isOptionChecked(MenuOption::Faceshift) &&
|
||||
Application::getInstance()->getFaceshift()->isConnectedOrConnecting()));
|
||||
DependencyManager::get<Faceshift>()->isConnectedOrConnecting()));
|
||||
}
|
||||
|
||||
void Visage::setEnabled(bool enabled) {
|
||||
|
|
Loading…
Reference in a new issue