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

Class Model

src/Scene/Model.h:19–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#include <LinearMath/btDefaultMotionState.h>
18
19class Model {
20public:
21 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);
22 std::string m_name;
23 std::vector<glm::vec3> m_vertices;
24 std::vector<glm::vec3> m_normals;
25 std::vector<glm::vec2> m_uvs;
26 std::vector<unsigned int> m_vertex_indices;
27
28 void enable();
29
30 virtual bool genBuffers()= 0;
31 virtual void update()= 0;
32 virtual void destroy()= 0;
33 virtual void render()= 0;
34
35 /*--------- Model State --------*/
36 //UI
37 bool enabled = false;
38 //Rendering
39 glm::mat4 ModelMatrix = glm::mat4(1.0);
40 glm::mat4 RotationMatrix;
41 glm::mat4 TranslationMatrix;
42 glm::vec3 position;
43 glm::vec3 initialPosition;
44 glm::vec3 orientation_vec;
45 glm::quat orientation;
46protected:
47 GLuint VertexArrayID;
48};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected