-
Notifications
You must be signed in to change notification settings - Fork 5
/
simulatedWorld.h
84 lines (58 loc) · 1.91 KB
/
simulatedWorld.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
#ifndef __APOLO__SIMULATED_WORLD__H
#define __APOLO__SIMULATED_WORLD__H
#include "mrcore.h"
#include "faceWindow.h"
#include "initialProperties.h"
#include "objectSelection.h"
#include "childView.h"
#include "tree.h"
#include <wx/wx.h>
#include <wx/treectrl.h>
#include <wx/msw/msgdlg.h>
class MainWindow;
class SimulatedWorld
{
public:
SimulatedWorld(World *world);
~SimulatedWorld();
ObjectSelection *sel;
wxTreeItemId getTreeItem(){return mainNode;}
string getName(){return name;}
void setName(string _name){ name=_name; childView->SetTitle(_name);}
void setObjConnected(bool con){objConnected=con;}
bool IsObjectConnected(){return objConnected;}
void AddObject(wxWindowID id);
SimpleJoint* AddJoint();
void DeleteObject(wxTreeItemId itemId);
World *getWorld(){return m_world;}
ChildView* getChild(){return childView;}
void SetCopiedDesign(vector<Vector2D> Copy);
vector<Vector2D> GetCopiedDesign(){return CopiedDesign;}
void CleanClipboard(){CopiedDesign.clear();};
//Link methods
void SetEntityToLink(PositionableEntity* pos){EntityToLink=pos;}
PositionableEntity* GetEntityToLink(){return EntityToLink;}
void InsertId(wxTreeItemId id){ItemsId.push_back(id);}
void InsertItem(PositionableEntity* item){Items.push_back(item);}
vector<wxTreeItemId> getItemsId(){return ItemsId;}
vector<PositionableEntity*> getItems(){return Items;}
bool checkAddedItem(PositionableEntity* pos);
void InitializeItemsVectors();
bool checkLink(PositionableEntity* linker,PositionableEntity* linked);
Tree* getTree(){return tree;}
static MainWindow *mainWin;
static Tree *tree;
private:
bool objConnected;
wxTreeItemId mainNode;
string name;
ChildView* childView;
World* m_world;
vector<Vector2D> CopiedDesign;
PositionableEntity* EntityToLink;
wxTreeItemId IdToLink;
vector<wxTreeItemId> ItemsId;
vector<PositionableEntity*> Items;
wxMessageDialog* CompOption;
};
#endif //__APOLO__SIMULATED_WORLD__H