-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjectentity.h
More file actions
100 lines (82 loc) · 1.84 KB
/
Copy pathobjectentity.h
File metadata and controls
100 lines (82 loc) · 1.84 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//
// objectentity.h
// kkyoda@riken.jp
//
#ifndef _OBJECTENTITY_H_
#define _OBJECTENTITY_H_
#include "xyzt.h"
#include <list>
#include <cstring>
using namespace std;
class objectentity {
int objnum;
string entitytype;
list<xyzt> point;
list<xyzt> circle;
list<xyzt> sphere;
list<xyzt> line;
list<xyzt> face;
list<xyzt> object;
public:
objectentity() {objnum = 0; entitytype = ""; point.clear(); circle.clear(); sphere.clear(); line.clear(); face.clear();}
string getS() {return entitytype;}
int getON() {return objnum;}
list<xyzt> getPoint() {return point;}
list<xyzt> getCircle() {return circle;}
list<xyzt> getSphere() {return sphere;}
list<xyzt> getLine() {return line;}
list<xyzt> getFace() {return face;}
list<xyzt> getObject() {return object;}
void addObject(xyzt i) {
object.push_back(i);
}
void addPoint(xyzt i) {
point.push_back(i);
}
void addLine(xyzt i) {
line.push_back(i);
}
void addCircle(xyzt i) {
circle.push_back(i);
}
void addSphere(xyzt i) {
sphere.push_back(i);
// cerr << "s: " << i.getX() << endl;
}
void addFace(xyzt i) {
face.push_back(i);
}
void setObject(int on, xyzt i) {
objnum = on;
entitytype = "object";
object.push_back(i);
}
void setPoint(int on, xyzt i) {
objnum = on;
entitytype = "point";
point.push_back(i);
}
void setLine(int on, xyzt i) {
objnum = on;
entitytype = "line";
line.push_back(i);
}
void setCircle(int on, xyzt i) {
objnum = on;
entitytype = "circle";
circle.push_back(i);
}
void setSphere(int on, xyzt i) {
objnum = on;
entitytype = "sphere";
sphere.push_back(i);
// cerr << i.getX() << endl;
// cerr << "add sphere: " << on << endl;
}
void setFace(int on, xyzt i) {
objnum = on;
entitytype = "face";
face.push_back(i);
}
};
#endif