-
Notifications
You must be signed in to change notification settings - Fork 0
/
MorphTarget.h
42 lines (28 loc) · 946 Bytes
/
MorphTarget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef MORPHTARGET_H
#define MORPHTARGET_H
#include "Node.h"
#include <QHash>
#include <QPair>
#include <QVector3D>
#include "BasicTokenizer.h"
class Skin;
class MorphTarget : public Node
{
public:
MorphTarget(Node* parent);
virtual ~MorphTarget();
virtual bool loadFromFile(QString const& filename);
virtual void update(float elapsed);
virtual void init();
void setSkin(Skin* newSkin);
Skin* skin() const;
QPair<QVector3D, QVector3D> const& delta(int i) const;
private:
typedef bool (MorphTarget::*loadFunction)(BasicTokenizer&);
bool _load(BasicTokenizer& tokenizer);
bool _loadPositions(BasicTokenizer& tokenizer);
bool _loadNormals(BasicTokenizer& tokenizer);
QHash<int, QPair<QVector3D, QVector3D>> _delta;
Skin* _skin;
static QHash<QString, loadFunction> _loadingFunctions;};
#endif // MORPHTARGET_H