32 lines
1.1 KiB
C++
32 lines
1.1 KiB
C++
#ifndef MODEL_H
|
|
#define MODEL_H
|
|
|
|
#include "Buffers.h"
|
|
|
|
#include <GLM/glm.hpp>
|
|
|
|
class Model
|
|
{
|
|
public:
|
|
Model(); // Конструктор без параметров
|
|
Model(const Model& copy); // Конструктор копирования
|
|
~Model();
|
|
void render(const GLuint &mvp_uniform); // Вызов отрисовки
|
|
void load_verteces(glm::vec3* verteces, GLuint count); // Загрузка вершин в буфер
|
|
void load_indices(GLuint* indices, GLuint count); // Загрузка индексов в буфер
|
|
|
|
glm::vec3 position; // позиция модели
|
|
glm::vec3 rotation; // поворот модели
|
|
glm::vec3 scale; // мастабирование модели
|
|
glm::mat4 getTransformMatrix(); // Матрица трансформации модели
|
|
|
|
private:
|
|
VAO vao;
|
|
BO vertex_vbo, index_vbo; // вершинный и индексный буферы
|
|
GLuint verteces_count; // Количество вершин
|
|
GLuint indices_count; // Количество индексов
|
|
|
|
};
|
|
|
|
#endif // MODEL_H
|