qtopengl_prototype.h
Go to the documentation of this file.
1 
8 #ifndef QTOPENGL_PROTOTYPE_H
9 #define QTOPENGL_PROTOTYPE_H
10 
11 namespace argos {
12  class CPrototypeEntity;
13  class CVector3;
14 }
15 
16 #include <argos3/core/utility/math/convex_hull.h>
17 
18 #ifdef __APPLE__
19 #include <gl.h>
20 #else
21 #include <GL/gl.h>
22 #endif
23 
24 namespace argos {
25 
27 
28  public:
29 
31 
32  virtual ~CQTOpenGLPrototype();
33 
34  virtual void DrawEntity(CPrototypeEntity& c_entity);
35 
36  virtual void DrawDevices(CPrototypeEntity& c_entity);
37 
38  private:
39 
40  void MakeBox();
41  void MakeCylinder();
42  void MakeSphere();
43  void MakeLED();
44  void MakePoles();
45  void MakeTag();
46  void MakeTagTexture();
47 
48  void DrawConvexHull(const std::vector<CVector3>& vec_points,
49  const std::vector<CConvexHull::SFace>& vec_faces);
50 
51  private:
52 
53  GLuint m_unBaseList;
54  GLuint m_unBoxList;
55  GLuint m_unCylinderList;
56  GLuint m_unSphereList;
57  GLuint m_unLEDList;
58  GLuint m_unPoleList;
59  GLuint m_unTagList;
60  GLuint m_unVertices;
61  GLuint m_unTagTex;
62 
63  const GLfloat m_fTagTexture[48] = {
64  1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f,
65  0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
66  1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f,
67  0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f,
68  /* shade the bottom corner in debug mode */
69 #ifndef NDEBUG
70  0.5f, 0.5f, 0.5f
71 #else
72  1.0f, 1.0f, 1.0f
73 #endif
74  };
75  };
76 }
77 
78 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
virtual void DrawEntity(CPrototypeEntity &c_entity)
virtual void DrawDevices(CPrototypeEntity &c_entity)