MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / CarModel

Method CarModel

src/Scene/CarModel.cpp:9–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "../Util/Utils.h"
8
9CarModel::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
27CarModel::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;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected