qtopengl_spiri.cpp
Go to the documentation of this file.
1 
7 #include "qtopengl_spiri.h"
8 #include "spiri_entity.h"
9 #include <argos3/core/simulator/entity/embodied_entity.h>
10 #include <argos3/plugins/simulator/visualizations/qt-opengl/qtopengl_obj_model.h>
11 #include <argos3/plugins/simulator/visualizations/qt-opengl/qtopengl_widget.h>
12 
13 namespace argos {
14 
15  /****************************************/
16  /****************************************/
17 
19  public:
20  void ApplyTo(CQTOpenGLWidget& c_visualization,
21  CSpiriEntity& c_entity) {
22  static CQTOpenGLObjModel m_cSpiriModel("spiri.obj");
23  c_visualization.DrawRays(c_entity.GetControllableEntity());
24  c_visualization.DrawEntity(c_entity.GetEmbodiedEntity());
25  m_cSpiriModel.Draw();
26  }
27  };
28 
29  /****************************************/
30  /****************************************/
31 
33  public:
34  void ApplyTo(CQTOpenGLWidget& c_visualization,
35  CSpiriEntity& c_entity) {
36  c_visualization.DrawBoundingBox(c_entity.GetEmbodiedEntity());
37  }
38  };
39 
41 
43 
44  /****************************************/
45  /****************************************/
46 
47 }
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
REGISTER_QTOPENGL_ENTITY_OPERATION(CQTOpenGLOperationDrawNormal, CQTOpenGLOperationDrawEPuckNormal, CEPuckEntity)
void ApplyTo(CQTOpenGLWidget &c_visualization, CSpiriEntity &c_entity)
void ApplyTo(CQTOpenGLWidget &c_visualization, CSpiriEntity &c_entity)
CEmbodiedEntity & GetEmbodiedEntity()
Definition: spiri_entity.h:51
CControllableEntity & GetControllableEntity()
Definition: spiri_entity.h:47
void DrawRays(CControllableEntity &c_entity)
Draws a ray.
void DrawEntity(CPositionalEntity &c_entity)
Draws a positional entity.
void DrawBoundingBox(CEmbodiedEntity &c_entity)
Draws the bounding box of an embodied entity.