libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
scene.hpp
1 #ifndef ENVIRONNEMENT_HPP
2 #define ENVIRONNEMENT_HPP
3 
4 #include "API/Device/robot.hpp"
5 #include "facts.hpp"
6 
7 #ifndef _ENVIRONMENT_H
8 struct env;
9 #endif
10 
11 extern std::string global_ActiveRobotName;
12 class FactsManager;
13 
22 class Scene
23 {
24 public:
29  Scene(env* environnment);
30 
34  ~Scene();
35 
40  std::string getName();
41 
42 
46  void createAgents();
47 
51  void createObjects();
52 
57  {
58  return m_facts_manager;
59  }
60 
65  void setActiveRobot(std::string name);
66 
72 
76  Robot* getRobot(unsigned int i) { return m_Robot[i]; }
77 
81  unsigned int getRobotId(std::string str);
82 
86  Robot* getRobotByName(std::string name);
87 
91  Robot* getRobotByNameContaining(std::string name);
92 
96  std::vector<Robot*> getAllRobotWithNameContaining(std::string str);
97 
98  Robot* getRobot(p3d_rob *rob);
99 
104  void insertRobot(Robot* R);
105 
110  unsigned int getNumberOfRobots() { return m_Robot.size(); }
111 
115  double getDMax();
116 
120  std::vector<double> getBounds();
121 
122 
126  void drawSurfaces();
127 
128 private:
129  std::vector<Robot*> m_Robot;
130  std::string m_Name;
132  env* m_Scene;
133 
134  FactsManager * m_facts_manager;
135 
136 };
137 
138 #endif
Robot * getRobotByName(std::string name)
Get robot by name.
Definition: scene.cpp:140
Robot * getRobot(unsigned int i)
Returns the robot by id.
Definition: scene.hpp:76
void insertRobot(Robot *R)
insert un nouveau Robot au vecteur des Robot
Definition: scene.cpp:199
unsigned int getNumberOfRobots()
Returns the number of Robots in the Scene.
Definition: scene.hpp:110
FactsManager * getFactsManager()
Definition: scene.hpp:56
void createAgents()
create agents and attach them to their robots
Definition: scene.cpp:75
~Scene()
Destructeur de la classe.
Definition: scene.cpp:65
Scene(env *environnment)
Constructeur de la classe.
Definition: scene.cpp:24
void createObjects()
create objectRob class and attach them to the robot
Definition: scene.cpp:98
Robot * getRobotByNameContaining(std::string name)
Get robot by name containing.
Definition: scene.cpp:155
std::vector< double > getBounds()
Returns boundries of scene.
Definition: scene.cpp:209
std::vector< Robot * > getAllRobotWithNameContaining(std::string str)
Get all robot with name containing.
Definition: scene.cpp:171
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
void setActiveRobot(std::string name)
modifie le Robot actif
Definition: scene.cpp:110
Class that represents a Scene, Described by a p3d file.
Definition: scene.hpp:22
Robot * getActiveRobot()
obtient le Robot actif
Definition: scene.cpp:117
void drawSurfaces()
Draw surfaces of all the objects.
Definition: scene.cpp:222
double getDMax()
Returns the scene resolution step DMax.
Definition: scene.cpp:204
Definition: facts.hpp:34
unsigned int getRobotId(std::string str)
Returns the robot ID.
Definition: scene.cpp:122
std::string getName()
obtient le nom de l'Scene
Definition: scene.cpp:70