diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-25 01:09:25 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-25 01:09:25 +0000 |
commit | 9354c35431ce9f544eb9b37c1bb6d225038294f4 (patch) | |
tree | 00f96fb6f13fde76e535fb978603247dc876d0cb | |
parent | Move texture cache to Texture class (diff) | |
download | ilt-9354c35431ce9f544eb9b37c1bb6d225038294f4.tar.bz2 ilt-9354c35431ce9f544eb9b37c1bb6d225038294f4.tar.xz ilt-9354c35431ce9f544eb9b37c1bb6d225038294f4.zip |
Simplify vertex interface
-rw-r--r-- | gfx/models/mesh.cpp | 6 | ||||
-rw-r--r-- | gfx/models/vertex.hpp | 19 |
2 files changed, 3 insertions, 22 deletions
diff --git a/gfx/models/mesh.cpp b/gfx/models/mesh.cpp index df48e8d..967f3fd 100644 --- a/gfx/models/mesh.cpp +++ b/gfx/models/mesh.cpp @@ -44,9 +44,9 @@ Mesh::Mesh(Vertex * vertices, unsigned int numVertices, unsigned int * indices, IndexedModel model;
for (unsigned int i = 0; i < numVertices; i++) {
- model.positions.push_back(vertices[i].GetPos());
- model.texCoords.push_back(vertices[i].GetTexCoord());
- model.normals.push_back(vertices[i].GetNormal());
+ model.positions.push_back(vertices[i].pos);
+ model.texCoords.push_back(vertices[i].texCoord);
+ model.normals.push_back(vertices[i].normal);
}
for (unsigned int i = 0; i < numIndices; i++) {
diff --git a/gfx/models/vertex.hpp b/gfx/models/vertex.hpp index 4ab6024..3d7f933 100644 --- a/gfx/models/vertex.hpp +++ b/gfx/models/vertex.hpp @@ -10,25 +10,6 @@ public: { } - 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; |