forked from mhernando/Apolo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodeTree.h
216 lines (194 loc) · 4 KB
/
nodeTree.h
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#ifndef __APOLO__NODE_TREE__H
#define __APOLO__NODE_TREE__H
#include "mrcore.h"
#include <wx/treebase.h>
#include <iostream>
enum TypeNode
{
N_SimpleJoint,
N_Joint,
N_CylindricalPart,
N_PrismaticPart,
N_IrregularPrismaticPart,
N_LMS200Sim,
N_LMS100Sim,
N_FaceSetPart,
N_PatrolbotSim,
N_Pioneer3ATSim,
N_PowerCube70Sim,
N_NemoLaserSensor3DSim,
N_LaserSensor3DSim,
N_LaserSensorSim,
N_MeshPart,
N_WheeledBaseSim,
N_ComposedEntity,
N_SolidEntity,
N_PositionableEntity,
N_World,
N_RobotSim,
N_AdeptOneSim,
N_SpherePart,
N_CameraSim,
N_KinectSim,
N_MobileRobot,
N_PersonSim,
N_QuadrotorSim,
N_AseaIRB2000,
};
enum Bitmap
{
Bit_simplejoint=1,
Bit_joint=3,
Bit_cylindricalpart=5,
Bit_prismaticpart=7,
Bit_lms200sim=9,
Bit_lms100sim=11,
Bit_facesetpart=13,
Bit_patrolbotsim=15,
Bit_pioneer3atsim=17,
Bit_powercube70sim=19,
Bit_nemolasersensor3dsim=21,
Bit_lasersensor3dsim=23,
Bit_lasersensorsim=25,
Bit_meshpart=27,
Bit_wheeledbasesim=29,
Bit_composedentity=31,
Bit_solidentity=33,
Bit_positionableentity=35,
Bit_world=37,
Bit_robotsim=39,
Bit_adeptonesim=41,
Bit_spherepart=43,
Bit_asea=45,
};
enum BitmapSelect
{
BitSel_simplejoint=2,
BitSel_joint=4,
BitSel_cylindricalpart=6,
BitSel_prismaticpart=8,
BitSel_lms200sim=10,
BitSel_lms100sim=12,
BitSel_facesetpart=14,
BitSel_patrolbotsim=16,
BitSel_pioneer3atsim=18,
BitSel_powercube70sim=20,
BitSel_nemolasersensor3dsim=22,
BitSel_lasersensor3dsim=24,
BitSel_lasersensorsim=26,
BitSel_meshpart=28,
BitSel_wheeledbasesim=30,
BitSel_composedentity=32,
BitSel_solidentity=34,
BitSel_positionableentity=36,
BitSel_world=38,
BitSel_robotsim=40,
BitSel_adeptonesim=42,
BitSel_spherepart=44,
BitSel_asea=46,
};
struct MRPointer
{
union{
SimpleJoint* simplejoint;
CylindricalPart* cylindricalpart;
PrismaticPart* prismaticpart;
LMS200Sim* lms200sim;
LMS100Sim* lms100sim;
FaceSetPart* facesetpart;
PatrolbotSim* patrolbotsim;
Pioneer3ATSim* pioneer3atsim;
PowerCube70Sim* powercube70sim;
PersonSim* personSim;
QuadrotorSim* quadrotorSim;
MobileRobot* mobileRobot;
CameraSim* cameraSim;
KinectSim* kinectSim;
NemoLaserSensor3DSim* nemolasersensor3dsim;
MeshPart* meshpart;
AdeptOneSim* adeptone;
SpherePart * spherepart;
AseaIRB2000Sim *aseaIRB2000Sim;
};
WheeledBaseSim* wheeledbasesim;
ComposedEntity* composedentity;
SolidEntity* solidentity;
PositionableEntity* positionableentity;
World* world;
RobotSim* robotsim;
LaserSensorSim* lasersensorsim;
LaserSensor3DSim* lasersensor3dsim;
Joint* joint;
};
struct MRServer
{
union
{
LaserSensorServer *laserSensor;
LaserSensor3DServer *laserSensor3D;
WheeledBaseServer *wheeledBase;
CameraServer *camera;
KinectServer *kinect;
VoiceTTSServer *voiceTTS;
QuadrotorServer *quadrotor;
};
int Clients;
int Port;
wxString Address;
};
struct MRClient
{
union
{
LaserSensorClient *laserSensor;
LaserSensor3DClient *laserSensor3D;
WheeledBaseClient *wheeledBase;
CameraClient *camera;
KinectClient *kinect;
VoiceTTSClient *voiceTTS;
QuadrotorClient *quadrotor;
};
wxString Host;
wxString Address;
int Port;
};
struct ContextualMenu
{
bool menu_positionable;
bool menu_solid;
bool menu_composed;
bool menu_wheeledbased;
bool menu_robotsim;
bool menu_world;
bool menu_meshpart;
bool menu_connection;
bool menu_laser;
bool menu_design;
bool menu_simplejoint;
bool menu_facesetpart;
bool menu_prismaticpart;
};
class SimulatedWorld;
class NodeTree : public wxTreeItemData
{
public:
NodeTree(PositionableEntity* pos,SimulatedWorld *simu);
NodeTree(SimulatedWorld *simu);
TypeNode getTipo(){return tipo;}
void setTipo(TypeNode type){tipo=type;}
void setName(wxString _name){name=_name;}
wxString getNameTree(){return name;}
SimulatedWorld * getSimu(){return simuWorld;}
int typeConnection; //0 Nothing //1 Server //2 Client
Bitmap bit;
BitmapSelect bitsel;
MRPointer pointer;
MRServer server;
MRClient client;
ContextualMenu menus;
TypeNode tipo;
private:
wxString name;
SimulatedWorld *simuWorld;
};
#endif // __APOLO__NODE_TREE__H