cleanup to blendshapes

This commit is contained in:
kunalgosar 2017-04-14 13:59:09 -07:00
parent 0a295fc258
commit d215856b23
3 changed files with 3 additions and 8 deletions
interface/src/avatar
libraries/avatars/src

View file

@ -242,7 +242,7 @@ void SkeletonModel::updateAttitude() {
void SkeletonModel::simulate(float deltaTime, bool fullUpdate) {
updateAttitude();
if (fullUpdate) {
setBlendshapeCoefficients(_owningAvatar->getHead()->getSummedBlendshapeCoefficients());
setBlendshapeCoefficients(_owningAvatar->getHead()->getSummedBlendshapeCoefficients());
Model::simulate(deltaTime, fullUpdate);

View file

@ -438,12 +438,6 @@ public:
_headData->setBlendshapeCoefficients(blendshapeCoefficients);
}
}
void setSummedBlendshapeCoefficients(QVector<float>& blendshapeCoefficients) {
if (_headData) {
_headData->setSummedBlendshapeCoefficients(blendshapeCoefficients);
}
}
// access to Head().set/getMousePitch (degrees)
float getHeadPitch() const { return _headData->getBasePitch(); }

View file

@ -39,7 +39,7 @@ HeadData::HeadData(AvatarData* owningAvatar) :
_averageLoudness(0.0f),
_browAudioLift(0.0f),
_owningAvatar(owningAvatar),
_baseBlendshapeCoefficients(0, 0),
_baseBlendshapeCoefficients(0, 0)
{
}
@ -96,6 +96,7 @@ const QVector<float>& HeadData::getSummedBlendshapeCoefficients() {
void HeadData::setBlendshape(QString name, float val) {
const auto& blendshapeLookupMap = getBlendshapesLookupMap();
//Check to see if the named blendshape exists, and then set its value if it does
auto it = blendshapeLookupMap.find(name);
if (it != blendshapeLookupMap.end()) {