]> git.sur5r.net Git - fstl/blobdiff - src/mesh.cpp
New upstream version 0.10.0
[fstl] / src / mesh.cpp
index 140a769b5eab739ff35454a098a45e27cac4039d..2c44a2c5e19fc4c70f40bf3a3ba59637a53fbef4 100644 (file)
@@ -8,8 +8,8 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
-Mesh::Mesh(std::vector<GLfloat> v, std::vector<GLuint> i)
-    : vertices(v), indices(i)
+Mesh::Mesh(std::vector<GLfloat>&& v, std::vector<GLuint>&& i)
+    : vertices(std::move(v)), indices(std::move(i))
 {
     // Nothing to do here
 }
@@ -42,6 +42,10 @@ float Mesh::max(size_t start) const
     return v;
 }
 
+int Mesh::triCount() const
+{
+    return indices.size()/3;
+}
 bool Mesh::empty() const
 {
     return vertices.size() == 0;