aboutsummaryrefslogtreecommitdiff
path: root/source/ObjModel.h
diff options
context:
space:
mode:
authorMatejaMaric <matejamaricz@gmail.com>2019-07-09 00:26:42 +0200
committerMatejaMaric <matejamaricz@gmail.com>2019-07-09 00:26:42 +0200
commita7c9aeee1e68235af406e30654e4b2e5f0f7fda2 (patch)
tree492e4860bf17d196b5a79a83004aec217e69cf1e /source/ObjModel.h
downloaderender-a7c9aeee1e68235af406e30654e4b2e5f0f7fda2.tar.gz
erender-a7c9aeee1e68235af406e30654e4b2e5f0f7fda2.zip
First commit
Diffstat (limited to 'source/ObjModel.h')
-rw-r--r--source/ObjModel.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/ObjModel.h b/source/ObjModel.h
new file mode 100644
index 0000000..9f66867
--- /dev/null
+++ b/source/ObjModel.h
@@ -0,0 +1,31 @@
+#include"Vertice.h"
+#include"Bitmap.h"
+#include<vector>
+#include<string>
+#include<sstream>
+#include<fstream>
+#include<exception>
+
+struct Triangle {
+ int p[3][3];
+};
+
+struct Texture_Coordinates {
+ float u, v;
+};
+
+class ObjModel
+{
+public:
+ std::vector<Vertice> vertices;
+ std::vector<Texture_Coordinates> uvcoo;
+ std::vector<Vector4f> normals;
+ std::vector<Triangle> faces;
+ ObjModel();
+ ObjModel(std::string fileName);
+ ObjModel(const ObjModel& a);
+ ObjModel multiplyMatrix(Matrix4f& a);
+ void divideW();
+ void screenspace(int width, int height);
+};
+