-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
51 lines (49 loc) · 1.08 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <iostream>
#include "main.h"
#include "CallPython.h"
#include "ResetXml.h"
#include "Processing.h"
using namespace std;
int main()
{
char c;
cin >> c;
if (c == '0')
{
int times;
times = 50;
double** ori = new double* [times * times];
double high = 1;
CallPython(times, high, ori);
processing(ori, times, high);
return 0;
}
else if (c == '1')
{
int times;
times = 50;
double** ori = new double* [times * times];
double high = 1;
double height = 0.2, radius = 0.214, mass = 1;
for (; radius <= 0.23; radius += 0.0003)
{
rr = radius;
Cylinder* a = new Cylinder(height, radius, mass);
update("D:/LOCK/7_Three-Sided_Dice/Cylinder.urdf", a);
delete a;
CallPython(times, high, ori);
processing(ori, times, high);
}
return 0;
}
else if (c == '2')
{
cout << "依次输入高、半径、质量:";
double height, radius, mass;
cin >> height >> radius >> mass;
Cylinder a(height, radius, mass);
update("D:/LOCK/7_Three-Sided_Dice/Cylinder.urdf", &a);
cout << "创建完成!";
return 0;
}
}