| 7 | #include "../Util/Utils.h" |
| 8 | |
| 9 | CarModel::CarModel(std::string name, std::vector<glm::vec3> verts, std::vector<glm::vec2> uvs, std::vector<unsigned int> texture_indices, std::vector<uint32_t> test, std::vector<glm::vec3> norms, std::vector<unsigned int> indices, glm::vec3 center_position, float specular_damper, float specular_reflectivity, float env_reflectivity) : super(name, verts, uvs, norms, indices, true, center_position) { |
| 10 | m_texture_indices = texture_indices; |
| 11 | isMultiTextured = true; |
| 12 | // Fill the unused buffer with data |
| 13 | m_polygon_flags = test; |
| 14 | // Can't call basic constructor as genBuffers() call would run before m_texture_indices was available |
| 15 | specularDamper = specular_damper; |
| 16 | specularReflectivity = specular_reflectivity; |
| 17 | envReflectivity = env_reflectivity; |
| 18 | m_normals.clear(); |
| 19 | for (unsigned int m_vertex_index : m_vertex_indices) { |
| 20 | m_normals.push_back(norms[m_vertex_index]); |
| 21 | } |
| 22 | |
| 23 | // Gen VBOs, add to Bullet Physics |
| 24 | ASSERT(genBuffers(), "Unable to generate GL Buffers for Car Model "); |
| 25 | } |
| 26 | |
| 27 | CarModel::CarModel(std::string name, std::vector<glm::vec3> verts, std::vector<glm::vec2> uvs, std::vector<unsigned int> texture_indices, std::vector<glm::vec3> norms, std::vector<unsigned int> indices, glm::vec3 center_position, float specular_damper, float specular_reflectivity, float env_reflectivity) : super(name, verts, uvs, norms, indices, true, center_position) { |
| 28 | m_texture_indices = texture_indices; |
nothing calls this directly
no outgoing calls
no test coverage detected