-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLine.h
50 lines (39 loc) · 825 Bytes
/
Line.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef LINE_CLASS_H
#define LINE_CLASS_H
#include "VAO.h"
#include <glm/glm.hpp>
#include "Camera.h"
class Line
{
public:
std::vector<Vertex> line_vertices;
VAO vao;
VBO* vbo;
Line();
Line
(
const glm::vec3& startPosition,
const glm::vec3& endPosition,
const glm::vec3& color
);
void Draw
(
Shader& shader,
Camera& camera
);
void createGLBuffer
(
const glm::vec3& startPosition,
const glm::vec3& endPosition,
const glm::vec3& color = glm::vec3(1, 1, 1)
);
void setStartPosition(glm::vec3 newPosition);
glm::vec3 getStartPosition();
void setEndPosition(glm::vec3 newPosition);
glm::vec3 getEndPosition();
void setPoints(glm::vec3 startPosition,glm::vec3 endPosition);
void setColor(glm::vec3 newColor);
float getLength();
glm::vec3 getMidPoint();
};
#endif // !LINE_CLASS_H