mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
code review
This commit is contained in:
parent
8875453585
commit
58cf51058b
1 changed files with 10 additions and 4 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include <recording/Deck.h>
|
#include <recording/Deck.h>
|
||||||
#include <Rig.h>
|
#include <Rig.h>
|
||||||
#include <trackers/FaceTracker.h>
|
#include <trackers/FaceTracker.h>
|
||||||
|
#include <FaceshiftConstants.h>
|
||||||
|
|
||||||
#include "devices/DdeFaceTracker.h"
|
#include "devices/DdeFaceTracker.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
@ -45,6 +46,11 @@ void MyHead::simulate(float deltaTime) {
|
||||||
auto player = DependencyManager::get<recording::Deck>();
|
auto player = DependencyManager::get<recording::Deck>();
|
||||||
// Only use face trackers when not playing back a recording.
|
// Only use face trackers when not playing back a recording.
|
||||||
if (!player->isPlaying()) {
|
if (!player->isPlaying()) {
|
||||||
|
// TODO -- finish removing face-tracker specific code. To do this, add input channels for
|
||||||
|
// each blendshape-coefficient and update the various json files to relay them in a useful way.
|
||||||
|
// After that, input plugins can be used to drive the avatar's face, and the various "DDE" files
|
||||||
|
// can be ported into the plugin and removed.
|
||||||
|
//
|
||||||
// auto faceTracker = qApp->getActiveFaceTracker();
|
// auto faceTracker = qApp->getActiveFaceTracker();
|
||||||
// const bool hasActualFaceTrackerConnected = faceTracker && !faceTracker->isMuted();
|
// const bool hasActualFaceTrackerConnected = faceTracker && !faceTracker->isMuted();
|
||||||
// _isFaceTrackerConnected = hasActualFaceTrackerConnected || _owningAvatar->getHasScriptedBlendshapes();
|
// _isFaceTrackerConnected = hasActualFaceTrackerConnected || _owningAvatar->getHasScriptedBlendshapes();
|
||||||
|
@ -63,13 +69,13 @@ void MyHead::simulate(float deltaTime) {
|
||||||
float leftEyeBlink = userInputMapper->getActionState(controller::Action::LEFT_EYE_BLINK);
|
float leftEyeBlink = userInputMapper->getActionState(controller::Action::LEFT_EYE_BLINK);
|
||||||
float rightEyeBlink = userInputMapper->getActionState(controller::Action::RIGHT_EYE_BLINK);
|
float rightEyeBlink = userInputMapper->getActionState(controller::Action::RIGHT_EYE_BLINK);
|
||||||
_blendshapeCoefficients.resize(std::max(_blendshapeCoefficients.size(), 2));
|
_blendshapeCoefficients.resize(std::max(_blendshapeCoefficients.size(), 2));
|
||||||
_blendshapeCoefficients[0] = leftEyeBlink;
|
_blendshapeCoefficients[EYE_BLINK_L_INDEX] = leftEyeBlink;
|
||||||
_blendshapeCoefficients[1] = rightEyeBlink;
|
_blendshapeCoefficients[EYE_BLINK_R_INDEX] = rightEyeBlink;
|
||||||
} else {
|
} else {
|
||||||
const float FULLY_OPEN = 0.0f;
|
const float FULLY_OPEN = 0.0f;
|
||||||
_blendshapeCoefficients.resize(std::max(_blendshapeCoefficients.size(), 2));
|
_blendshapeCoefficients.resize(std::max(_blendshapeCoefficients.size(), 2));
|
||||||
_blendshapeCoefficients[0] = FULLY_OPEN;
|
_blendshapeCoefficients[EYE_BLINK_L_INDEX] = FULLY_OPEN;
|
||||||
_blendshapeCoefficients[1] = FULLY_OPEN;
|
_blendshapeCoefficients[EYE_BLINK_R_INDEX] = FULLY_OPEN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Parent::simulate(deltaTime);
|
Parent::simulate(deltaTime);
|
||||||
|
|
Loading…
Reference in a new issue