-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
34 lines (24 loc) · 792 Bytes
/
main.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
#include "common.h"
#include "hills.h"
void input(float &length, int &size, int &hillcount, int &maxrise, int &ridgecount, int &noise);
int main ()
{
srand((unsigned int)time(NULL));
int length, sideCount, hillCount, maxRise, ridgeCount, noise;
cout << "Enter Side Length: "; //length of the grid
cin >> length;
cout << "Enter Size: "; //number of vertices in one row
cin >> sideCount;
cout << "Enter Number of Hills: ";
cin >> hillCount;
cout << "Enter Max Hill Height: ";
cin >> maxRise;
cout << "Enter Number of Ridges: ";
cin >> ridgeCount;
cout << "Enter max noise (or 0): ";
cin >> noise;
Hills *testHills = new Hills(length, sideCount, hillCount, maxRise, ridgeCount, noise);
testHills->adjustGridHeight();
testHills->output("Heightgrid.obj");
return 0;
}