21/include/TRS.h

45 lines
1.5 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef TRS_H
#define TRS_H
#define T_SENSITIVITY 0.001f
#define R_SENSITIVITY 0.01f
#define S_SENSITIVITY 0.00001f
#include "Scene.h"
// Интерфейс инструмента
class TRS
{
public:
void render(GLuint64 selectedID, ShaderProgram &shaderProgram, UBO &material_buffer); // Рендер инструмента нужного типа для выбранного объекта
virtual void process(GLuint64 selectedID, GLuint etc, const glm::vec4& dpos) = 0; // Взаимодействие с инструментом
protected:
void init_etc(); // Инициализирует дополнительную информацию модели
Scene tool; // Модель
};
// Инструмент трансформации
class Transform : public TRS
{
public:
Transform();
virtual void process(GLuint64 selectedID, GLuint etc, const glm::vec4& dpos); // Взаимодействие с инструментом
};
// Инструмент поворота
class Rotate : public TRS
{
public:
Rotate();
virtual void process(GLuint64 selectedID, GLuint etc, const glm::vec4& drot); // Взаимодействие с инструментом
};
// Инструмент масштабирования
class Scale : public TRS
{
public:
Scale();
virtual void process(GLuint64 selectedID, GLuint etc, const glm::vec4& dscale); // Взаимодействие с инструментом
};
#endif // TRS_H