overte-Armored-Dragon/interface/src/avatar/BlendFace.h
Andrzej Kapolka 0fa2eca02d Remove option to use Faceshift rig (using the "macaw" model has much the same
result, and it lets other people see it).
2013-09-23 10:43:20 -07:00

61 lines
1.2 KiB
C++

//
// BlendFace.h
// interface
//
// Created by Andrzej Kapolka on 9/16/13.
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
//
#ifndef __interface__BlendFace__
#define __interface__BlendFace__
#include <QObject>
#include <QUrl>
#include "InterfaceConfig.h"
#include "renderer/FBXReader.h"
class QNetworkReply;
class Head;
/// A face formed from a linear mix of blendshapes according to a set of coefficients.
class BlendFace : public QObject {
Q_OBJECT
public:
BlendFace(Head* owningHead);
~BlendFace();
bool isActive() const { return _iboID != 0; }
bool render(float alpha);
Q_INVOKABLE void setModelURL(const QUrl& url);
const QUrl& getModelURL() const { return _modelURL; }
private slots:
void handleModelDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
void handleModelReplyError();
private:
void setGeometry(const FBXGeometry& geometry);
Head* _owningHead;
QUrl _modelURL;
QNetworkReply* _modelReply;
GLuint _iboID;
GLuint _vboID;
FBXGeometry _geometry;
QVector<glm::vec3> _blendedVertices;
QVector<glm::vec3> _blendedNormals;
};
#endif /* defined(__interface__BlendFace__) */