mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:42:58 +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
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FaceTracker();
|
FaceTracker();
|
||||||
|
virtual ~FaceTracker() {}
|
||||||
|
|
||||||
const glm::vec3& getHeadTranslation() const { return _headTranslation; }
|
const glm::vec3& getHeadTranslation() const { return _headTranslation; }
|
||||||
const glm::quat& getHeadRotation() const { return _headRotation; }
|
const glm::quat& getHeadRotation() const { return _headRotation; }
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include <fsbinarystream.h>
|
#include <fsbinarystream.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <DependencyManager.h>
|
||||||
|
|
||||||
#include "FaceTracker.h"
|
#include "FaceTracker.h"
|
||||||
|
|
||||||
/// Handles interaction with the Faceshift software, which provides head position/orientation and facial features.
|
/// Handles interaction with the Faceshift software, which provides head position/orientation and facial features.
|
||||||
|
@ -27,6 +29,7 @@ class Faceshift : public FaceTracker {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Faceshift();
|
Faceshift();
|
||||||
|
virtual ~Faceshift() {}
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
|
||||||
|
|
||||||
|
#include <DependencyManager.h>
|
||||||
|
#include <FBXReader.h>
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
|
||||||
#include <FBXReader.h>
|
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "Visage.h"
|
#include "Visage.h"
|
||||||
|
|
||||||
|
@ -119,7 +120,7 @@ static const QMultiHash<QByteArray, QPair<int, float> >& getActionUnitNameMap()
|
||||||
const float TRANSLATION_SCALE = 20.0f;
|
const float TRANSLATION_SCALE = 20.0f;
|
||||||
|
|
||||||
void Visage::init() {
|
void Visage::init() {
|
||||||
connect(Application::getInstance()->getFaceshift(), SIGNAL(connectionStateChanged()), SLOT(updateEnabled()));
|
connect(DependencyManager::get<Faceshift>(), SIGNAL(connectionStateChanged()), SLOT(updateEnabled()));
|
||||||
updateEnabled();
|
updateEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +172,7 @@ void Visage::reset() {
|
||||||
void Visage::updateEnabled() {
|
void Visage::updateEnabled() {
|
||||||
setEnabled(Menu::getInstance()->isOptionChecked(MenuOption::Visage) &&
|
setEnabled(Menu::getInstance()->isOptionChecked(MenuOption::Visage) &&
|
||||||
!(Menu::getInstance()->isOptionChecked(MenuOption::Faceshift) &&
|
!(Menu::getInstance()->isOptionChecked(MenuOption::Faceshift) &&
|
||||||
Application::getInstance()->getFaceshift()->isConnectedOrConnecting()));
|
DependencyManager::get<Faceshift>()->isConnectedOrConnecting()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Visage::setEnabled(bool enabled) {
|
void Visage::setEnabled(bool enabled) {
|
||||||
|
|
Loading…
Reference in a new issue