Switched avatar to DependencyManager for Faceshift

This commit is contained in:
Atlante45 2014-12-14 16:28:28 -08:00
parent ad2dee5eaa
commit 1d9e53e227
2 changed files with 11 additions and 10 deletions

View file

@ -10,6 +10,7 @@
#include <glm/gtx/quaternion.hpp> #include <glm/gtx/quaternion.hpp>
#include <DependencyManager.h>
#include <NodeList.h> #include <NodeList.h>
#include "Application.h" #include "Application.h"
@ -196,14 +197,14 @@ void Head::simulate(float deltaTime, bool isMine, bool billboard) {
_mouth2 = glm::mix(_audioJawOpen * MMMM_POWER, _mouth2, MMMM_PERIOD + randFloat() * MMMM_RANDOM_PERIOD); _mouth2 = glm::mix(_audioJawOpen * MMMM_POWER, _mouth2, MMMM_PERIOD + randFloat() * MMMM_RANDOM_PERIOD);
_mouth4 = glm::mix(_audioJawOpen, _mouth4, SMILE_PERIOD + randFloat() * SMILE_RANDOM_PERIOD); _mouth4 = glm::mix(_audioJawOpen, _mouth4, SMILE_PERIOD + randFloat() * SMILE_RANDOM_PERIOD);
Application::getInstance()->getFaceshift()->updateFakeCoefficients(_leftEyeBlink, DependencyManager::get<Faceshift>()->updateFakeCoefficients(_leftEyeBlink,
_rightEyeBlink, _rightEyeBlink,
_browAudioLift, _browAudioLift,
_audioJawOpen, _audioJawOpen,
_mouth2, _mouth2,
_mouth3, _mouth3,
_mouth4, _mouth4,
_blendshapeCoefficients); _blendshapeCoefficients);
} else { } else {
_saccade = glm::vec3(); _saccade = glm::vec3();
} }

View file

@ -22,6 +22,7 @@
#include <AccountManager.h> #include <AccountManager.h>
#include <AddressManager.h> #include <AddressManager.h>
#include <DependencyManager.h>
#include <GeometryUtil.h> #include <GeometryUtil.h>
#include <NodeList.h> #include <NodeList.h>
#include <PacketHeaders.h> #include <PacketHeaders.h>
@ -421,8 +422,7 @@ void MyAvatar::render(const glm::vec3& cameraPosition, RenderMode renderMode, bo
} }
void MyAvatar::renderHeadMouse(int screenWidth, int screenHeight) const { void MyAvatar::renderHeadMouse(int screenWidth, int screenHeight) const {
Faceshift* faceshift = DependencyManager::get<Faceshift>();
Faceshift* faceshift = Application::getInstance()->getFaceshift();
float pixelsPerDegree = screenHeight / Menu::getInstance()->getFieldOfView(); float pixelsPerDegree = screenHeight / Menu::getInstance()->getFieldOfView();