-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gizmo.cpp
63 lines (50 loc) · 1.97 KB
/
Gizmo.cpp
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
51
52
53
54
55
56
57
58
59
60
61
#include "Application.h"
#include "Gizmo.h"
#include "C_Transform.h"
#include "C_Camera.h"
#include "GameObject.h"
#include "Globals.h"
Gizmo::Gizmo() {
}
Gizmo::~Gizmo() {
}
void Gizmo::Update() {
}
void Gizmo::Draw() {
}
void Gizmo::HandleGuizmo() {
}
void Gizmo::DrawCubeBox(float3* points, Color color)
{
glDisable(GL_LIGHTING);
glBegin(GL_LINES);
glLineWidth(25.0f);
glColor3f(color.r, color.g, color.b);
glVertex3f(points[0].At(0), points[0].At(1), points[0].At(2));
glVertex3f(points[1].At(0), points[1].At(1), points[1].At(2));
glVertex3f(points[2].At(0), points[2].At(1), points[2].At(2));
glVertex3f(points[3].At(0), points[3].At(1), points[3].At(2));
glVertex3f(points[4].At(0), points[4].At(1), points[4].At(2));
glVertex3f(points[5].At(0), points[5].At(1), points[5].At(2));
glVertex3f(points[6].At(0), points[6].At(1), points[6].At(2));
glVertex3f(points[7].At(0), points[7].At(1), points[7].At(2));
glVertex3f(points[0].At(0), points[0].At(1), points[0].At(2));
glVertex3f(points[4].At(0), points[4].At(1), points[4].At(2));
glVertex3f(points[1].At(0), points[1].At(1), points[1].At(2));
glVertex3f(points[5].At(0), points[5].At(1), points[5].At(2));
glVertex3f(points[2].At(0), points[2].At(1), points[2].At(2));
glVertex3f(points[6].At(0), points[6].At(1), points[6].At(2));
glVertex3f(points[3].At(0), points[3].At(1), points[3].At(2));
glVertex3f(points[7].At(0), points[7].At(1), points[7].At(2));
glVertex3f(points[0].At(0), points[0].At(1), points[0].At(2));
glVertex3f(points[2].At(0), points[2].At(1), points[2].At(2));
glVertex3f(points[1].At(0), points[1].At(1), points[1].At(2));
glVertex3f(points[3].At(0), points[3].At(1), points[3].At(2));
glVertex3f(points[4].At(0), points[4].At(1), points[4].At(2));
glVertex3f(points[6].At(0), points[6].At(1), points[6].At(2));
glVertex3f(points[5].At(0), points[5].At(1), points[5].At(2));
glVertex3f(points[7].At(0), points[7].At(1), points[7].At(2));
glLineWidth(1);
glEnd();
glEnable(GL_LIGHTING);
}