forked from huxingyi/dust3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglbfile.h
40 lines (38 loc) · 1004 Bytes
/
glbfile.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
#ifndef DUST3D_GLB_FILE_H
#define DUST3D_GLB_FILE_H
#include <QObject>
#include <QString>
#include <QByteArray>
#include <QMatrix4x4>
#include <vector>
#include <QQuaternion>
#include <QImage>
#include "outcome.h"
#include "json.hpp"
#include "document.h"
class GlbFileWriter : public QObject
{
Q_OBJECT
public:
GlbFileWriter(Outcome &outcome,
const std::vector<RiggerBone> *resultRigBones,
const std::map<int, RiggerVertexWeights> *resultRigWeights,
const QString &filename,
QImage *textureImage=nullptr,
QImage *normalImage=nullptr,
QImage *ormImage=nullptr,
const std::vector<std::pair<QString, std::vector<std::pair<float, JointNodeTree>>>> *motions=nullptr);
bool save();
private:
QString m_filename;
bool m_outputNormal;
bool m_outputAnimation;
bool m_outputUv;
QByteArray m_binByteArray;
QByteArray m_jsonByteArray;
private:
nlohmann::json m_json;
public:
static bool m_enableComment;
};
#endif