42 lines
703 B
C++
42 lines
703 B
C++
|
|
#ifndef LINE_H
|
||
|
|
#define LINE_H
|
||
|
|
|
||
|
|
#include <glad/glad.h>
|
||
|
|
#include <GLFW/glfw3.h>
|
||
|
|
#include <glm/glm.hpp>
|
||
|
|
|
||
|
|
#include <shader.hpp>
|
||
|
|
#include <texture.hpp>
|
||
|
|
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
using std::vector;
|
||
|
|
using glm::vec3;
|
||
|
|
using glm::mat4;
|
||
|
|
|
||
|
|
class Line {
|
||
|
|
public:
|
||
|
|
vec3 position;
|
||
|
|
vec3 rotation;
|
||
|
|
vec3 scale;
|
||
|
|
|
||
|
|
vector<float> vertices;
|
||
|
|
vector<unsigned int> indices;
|
||
|
|
|
||
|
|
unsigned int VAO;
|
||
|
|
unsigned int VBO;
|
||
|
|
unsigned int EBO;
|
||
|
|
|
||
|
|
Line(const vec3 position, const vec3 rotation, const vec3 scale, vector<float> v, vector<unsigned int> i);
|
||
|
|
|
||
|
|
void generateImage();
|
||
|
|
void draw(Shader s);
|
||
|
|
mat4 translationMatrix();
|
||
|
|
mat4 rotationMatrix();
|
||
|
|
mat4 scaleMatrix();
|
||
|
|
mat4 modelMatrix();
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|