--- /dev/null
+#include "md5joint.h"
+#include <cmath>
+
+MD5Joint::MD5Joint(QString name, int parent,
+ float px, float py, float pz,
+ float ox, float oy, float oz)
+{
+ this->name=name;
+ this->parent=parent;
+ position.x = px;
+ position.y = py;
+ position.z = pz;
+ orientation.x = ox;
+ orientation.y = oy;
+ orientation.z = oz;
+
+ float t = 1.0f-(ox*ox)-(oy*oy)-(oz*oz);
+ if (t<0.0f)
+ orientation.w = 0.0f;
+ else
+ orientation.w = -sqrtf(t);
+}
+
--- /dev/null
+#ifndef MD5JOINT_H
+#define MD5JOINT_H
+
+#include <QString>
+#include "glm/glm.hpp"
+#include "glm/gtc/quaternion.hpp"
+
+
+class MD5Joint
+{
+public:
+ QString name;
+ int parent;
+ glm::vec3 position;
+ glm::quat orientation;
+
+ MD5Joint(QString name, int parent,
+ float px, float py, float pz,
+ float ox, float oy, float oz);
+};
+
+#endif // MD5JOINT_H
--- /dev/null
+#include "md5mesh.h"
+
+MD5Mesh::MD5Mesh()
+{
+}
--- /dev/null
+#ifndef MD5MESH_H
+#define MD5MESH_H
+
+#include <QString>
+
+class MD5Mesh
+{
+public:
+ QString shader;
+
+ MD5Mesh();
+};
+
+#endif // MD5MESH_H
--- /dev/null
+#include "md5model.h"
+
+MD5Model::MD5Model()
+{
+}
--- /dev/null
+#ifndef MD5MODEL_H
+#define MD5MODEL_H
+
+#include <QString>
+#include <QVector>
+#include "md5joint.h"
+
+class MD5Model
+{
+ QVector<MD5Joint> joints;
+ QVector<MD5Mesh> meshes;
+
+public:
+ MD5Model();
+};
+
+#endif // MD5MODEL_H
SOURCES += main.cpp \
mainwindow.cpp \
viewerwidget.cpp \
- md5model.cpp
+ md5model.cpp \
+ md5joint.cpp \
+ md5mesh.cpp
HEADERS += mainwindow.h \
viewerwidget.h \
- md5model.h
+ md5model.h \
+ md5joint.h \
+ md5mesh.h
FORMS += mainwindow.ui