| 7 | #include <utility> |
| 8 | |
| 9 | Model::Model(std::string name, std::vector<glm::vec3> verts, std::vector<glm::vec2> uvs, std::vector<glm::vec3> norms, std::vector<unsigned int> indices, bool removeVertexIndexing, glm::vec3 center_position) { |
| 10 | m_name = std::move(name); |
| 11 | m_uvs = std::move(uvs); |
| 12 | m_vertex_indices = std::move(indices); |
| 13 | m_normals = std::move(norms); |
| 14 | |
| 15 | if (removeVertexIndexing) { |
| 16 | for (unsigned int m_vertex_index : m_vertex_indices) { |
| 17 | m_vertices.push_back(verts[m_vertex_index]); |
| 18 | } |
| 19 | } else { |
| 20 | m_vertices = std::move(verts); |
| 21 | } |
| 22 | |
| 23 | position = center_position; |
| 24 | initialPosition = center_position; |
| 25 | orientation_vec = glm::vec3(0,0,0); |
| 26 | orientation = glm::normalize(glm::quat(orientation_vec)); |
| 27 | } |
| 28 | |
| 29 | void Model::enable() { |
| 30 | enabled = true; |
nothing calls this directly
no outgoing calls
no test coverage detected