summaryrefslogtreecommitdiff
path: root/vertex.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-01-17 18:54:26 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-01-17 18:54:26 +0000
commit43a87590f45aa6e55724d30d0c2d0d34b407a57e (patch)
tree21ce8e8886f8aa58b159419b7d885f57d9a37580 /vertex.hpp
parentInitial commit (diff)
downloadilt-43a87590f45aa6e55724d30d0c2d0d34b407a57e.tar.bz2
ilt-43a87590f45aa6e55724d30d0c2d0d34b407a57e.tar.xz
ilt-43a87590f45aa6e55724d30d0c2d0d34b407a57e.zip
First cut modernizing and sanitizing
Diffstat (limited to 'vertex.hpp')
-rw-r--r--vertex.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/vertex.hpp b/vertex.hpp
new file mode 100644
index 0000000..3f6514b
--- /dev/null
+++ b/vertex.hpp
@@ -0,0 +1,36 @@
+#ifndef VERTEX_H
+#define VERTEX_H
+
+#include <glm/glm.hpp>
+
+class Vertex {
+public:
+ Vertex(glm::vec3 pos, glm::vec2 texCoord, glm::vec3 normal) :
+ pos {std::move(pos)}, texCoord {std::move(texCoord)}, normal {std::move(normal)}
+ {
+ }
+
+ glm::vec3 &
+ GetPos()
+ {
+ return pos;
+ }
+
+ glm::vec2 &
+ GetTexCoord()
+ {
+ return texCoord;
+ }
+
+ glm::vec3 &
+ GetNormal()
+ {
+ return normal;
+ }
+
+private:
+ glm::vec3 pos;
+ glm::vec2 texCoord;
+ glm::vec3 normal;
+};
+#endif