-
Notifications
You must be signed in to change notification settings - Fork 0
/
project1.c++
54 lines (46 loc) · 1.83 KB
/
project1.c++
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
// AUTHOR: ZANE RALSTON
// DATE: SEPTEMBER 19, 2014
// EMAIL: z641r311@ku.edu
// project1.c++
#include "GLFWController.h"
#include "ModelView.h"
int main(int argc, char* argv[])
{
// define vertex coordinates for each box
vec2 vertexPositions[][4] =
{
{ {-12, 5 }, { -1, 5 }, {-12, 16}, { -1, 16} },
{ { -7, 16}, { -5, 18}, { -9, 18}, { -7, 20} },
{ { 6, 3 }, { 10, 3 }, { 6, 7 }, { 10, 7 } },
{ { 8, 7 }, { 13, 12}, { 3, 12}, { 8, 17} },
{ { 2,-11}, { 10,-11}, { 2, -3}, { 10, -3} },
{ {-12,-14}, { -6,-14}, {-12, -8}, { -6, -8} }
};
// define circle colors for each model.
vec4 colors[][5] =
{
{ { 0.2, 1.0, 0.5, 1.0 }, { 0.7, 0.2, 0.5, 1.0 }, { 1.0, 1.0, 0.2, 1.0 },
{ 0.2, 0.2, 0.2, 1.0 }, { 1.0, 1.0, 0.5, 1.0 } },
{ { 0.2, 0.5, 0.5, 1.0 }, { 0.2, 0.9, 0.2, 1.0 }, { 1.0, 0.2, 0.2, 1.0 },
{ 0.2, 0.0, 0.2, 1.0 }, { 0.6, 1.0, 0.5, 1.0 } },
{ { 0.1, 1.0, 0.7, 1.0 }, { 0.7, 0.2, 0.5, 1.0 }, { 0.9, 1.0, 0.6, 1.0 },
{ 0.1, 0.8, 0.6, 1.0 }, { 1.0, 1.0, 0.7, 1.0 } },
{ { 0.2, 0.0, 0.5, 1.0 }, { 0.0, 0.2, 1.0, 1.0 }, { 1.0, 0.3, 0.8, 1.0 },
{ 0.2, 0.0, 1.0, 1.0 }, { 1.0, 0.3, 0.2, 1.0 } },
{ { 0.5, 0.0, 0.0, 1.0 }, { 0.0, 0.0, 1.0, 1.0 }, { 1.0, 0.1, 0.3, 1.0 },
{ 0.7, 0.0, 0.5, 1.0 }, { 0.2, 0.3, 0.1, 1.0 } },
{ { 0.9, 0.0, 0.0, 1.0 }, { 0.8, 1.0, 1.0, 1.0 }, { 1.0, 0.8, 0.1, 1.0 },
{ 0.7, 0.9, 0.2, 1.0 }, { 0.9, 0.5, 1.0, 1.0 } }
};
GLFWController c(argv[0]);
c.reportVersions(std::cout);
for(int i = 0; i < 6; i++)
{
c.addModel( new ModelView(vertexPositions[i], colors[i] ) );
}
double xyz[6]; // xyz limits
c.getOverallMCBoundingBox(xyz);
ModelView::setMCRegionOfInterest(xyz);
c.run();
return 0;
}