ARGoS  3
A parallel, multi-engine simulator for swarm robotics
qtopengl_eyebot.cpp
Go to the documentation of this file.
1 
7 #include "qtopengl_eyebot.h"
8 #include "eyebot_entity.h"
9 #include <argos3/core/simulator/entity/embodied_entity.h>
10 #include <argos3/core/utility/math/vector2.h>
11 #include <argos3/core/utility/math/vector3.h>
12 #include <argos3/plugins/simulator/entities/led_equipped_entity.h>
13 #include <argos3/plugins/simulator/visualizations/qt-opengl/qtopengl_widget.h>
14 
15 namespace argos {
16 
17  /****************************************/
18  /****************************************/
19 
20  /* All measures are in meters */
21 
22  /* Legs */
23  static const Real LEG_HEIGHT = 0.166f;
24  static const Real LEG_WIDTH = 0.02f;
25  static const Real LEG_HALF_WIDTH = LEG_WIDTH * 0.5f;
26  static const Real LEG_DEPTH = 0.005f;
27  static const Real LEG_HALF_DEPTH = LEG_DEPTH * 0.5f;
28 
29  /* Ring */
30  static const Real RING_OUTER_RADIUS = 0.25f;
31  static const Real RING_INNER_RADIUS = 0.237f;
32  static const Real RING_HEIGHT = 0.015f;
33  static const Real RING_ELEVATION = LEG_HEIGHT - RING_HEIGHT;
34 
35  /* Led */
36  static const Real LED_HEIGHT = 0.01f;
37  static const Real LED_SIDE = RING_HEIGHT;
38  static const Real LED_HALF_SIDE = LED_SIDE * 0.5f;
39  static const Real LED_SIDE_RING_ELEVATION = RING_ELEVATION + LED_HALF_SIDE;
40  static const Real LED_BOTTOM_RING_ELEVATION = RING_ELEVATION - LED_HEIGHT;
41  static const Real LED_BOTTOM_RING_DISTANCE = RING_OUTER_RADIUS - LEG_HALF_WIDTH;
42 
43  /* Main rod */
44  static const Real ROD_SIDE = 0.07f;
45  static const Real ROD_HALF_SIDE = ROD_SIDE * 0.5f;
46  static const Real ROD_HEIGHT = 0.4f;
47  static const Real ROD_ELEVATION = LEG_HEIGHT;
48 
49  /****************************************/
50  /****************************************/
51 
53  m_unVertices(40),
54  m_fLEDAngleSlice(360.0f / 16.0f) {
55  /* Reserve the needed display lists */
56  m_unLists = glGenLists(4);
57 
58  /* Assign indices for better referencing (later) */
59  m_unLegList = m_unLists;
60  m_unBodyList = m_unLists + 1;
61  m_unSideLEDList = m_unLists + 2;
62  m_unBottomLEDList = m_unLists + 3;
63 
64  /* Create the led display list */
65  glNewList(m_unLegList, GL_COMPILE);
66  MakeLeg();
67  glEndList();
68 
69  /* Create the body display list */
70  glNewList(m_unBodyList, GL_COMPILE);
71  DrawBody();
72  glEndList();
73 
74  /* Create the side LED display list */
75  glNewList(m_unSideLEDList, GL_COMPILE);
76  DrawSideLED();
77  glEndList();
78 
79  /* Create the bottom LED display list */
80  glNewList(m_unBottomLEDList, GL_COMPILE);
81  DrawBottomLED();
82  glEndList();
83  }
84 
85  /****************************************/
86  /****************************************/
87 
89  glDeleteLists(m_unLists, 4);
90  }
91 
92  /****************************************/
93  /****************************************/
94 
97  /* Place the legs */
98  glPushMatrix();
99  glRotatef(45.0f, 0.0f, 0.0f, 1.0f);
100  glTranslatef(RING_OUTER_RADIUS, 0.0f, 0.0f);
101  glCallList(m_unLegList);
102  glPopMatrix();
103  glPushMatrix();
104  glRotatef(135.0f, 0.0f, 0.0f, 1.0f);
105  glTranslatef(RING_OUTER_RADIUS, 0.0f, 0.0f);
106  glCallList(m_unLegList);
107  glPopMatrix();
108  glPushMatrix();
109  glRotatef(225.0f, 0.0f, 0.0f, 1.0f);
110  glTranslatef(RING_OUTER_RADIUS, 0.0f, 0.0f);
111  glCallList(m_unLegList);
112  glPopMatrix();
113  glPushMatrix();
114  glRotatef(315.0f, 0.0f, 0.0f, 1.0f);
115  glTranslatef(RING_OUTER_RADIUS, 0.0f, 0.0f);
116  glCallList(m_unLegList);
117  glPopMatrix();
118  /* Place the body */
119  glCallList(m_unBodyList);
120  /* Place the LEDs */
121  glPushMatrix();
122  CLEDEquippedEntity& cLEDEquippedEntity = c_entity.GetLEDEquippedEntity();
123  glRotatef(m_fLEDAngleSlice * 0.5f, 0.0f, 0.0f, 1.0f);
124  const CColor& cUpColor = cLEDEquippedEntity.GetLED(0).GetColor();
125  const CColor& cLowColor = cLEDEquippedEntity.GetLED(16).GetColor();
126  SetLEDMaterial(cUpColor.GetRed(),
127  cUpColor.GetGreen(),
128  cUpColor.GetBlue());
129  glCallList(m_unSideLEDList);
130  SetLEDMaterial(cLowColor.GetRed(),
131  cLowColor.GetGreen(),
132  cLowColor.GetBlue());
133  glCallList(m_unBottomLEDList);
134  for(UInt32 i = 1; i < 16; i++) {
135  glRotatef(m_fLEDAngleSlice, 0.0f, 0.0f, 1.0f);
136  const CColor& cUpColor = cLEDEquippedEntity.GetLED(i).GetColor();
137  const CColor& cLowColor = cLEDEquippedEntity.GetLED(i+16).GetColor();
138  SetLEDMaterial(cUpColor.GetRed(),
139  cUpColor.GetGreen(),
140  cUpColor.GetBlue());
141  glCallList(m_unSideLEDList);
142  SetLEDMaterial(cLowColor.GetRed(),
143  cLowColor.GetGreen(),
144  cLowColor.GetBlue());
145  glCallList(m_unBottomLEDList);
146  }
147  glRotatef(135.0f, 0.0f, 0.0f, 1.0f);
148  glTranslatef(-0.3*RING_OUTER_RADIUS, 0.0f, 0.0f);
149  const CColor& cBottomLedColor = cLEDEquippedEntity.GetLED(32).GetColor();
150  SetLEDMaterial(cBottomLedColor.GetRed(),
151  cBottomLedColor.GetGreen(),
152  cBottomLedColor.GetBlue());
153  glCallList(m_unBottomLEDList);
154  glPopMatrix();
155  }
156 
157  /****************************************/
158  /****************************************/
159 
160  void CQTOpenGLEyeBot::SetLEDMaterial(GLfloat f_red, GLfloat f_green, GLfloat f_blue) {
161  const GLfloat fEmissionFactor = 10.0f;
162  const GLfloat pfColor[] = { f_red, f_green, f_blue, 1.0f };
163  const GLfloat pfSpecular[] = { 0.0f, 0.0f, 0.0f, 1.0f };
164  const GLfloat pfShininess[] = { 0.0f };
165  const GLfloat pfEmission[] = { f_red * fEmissionFactor, f_green * fEmissionFactor, f_blue * fEmissionFactor, 1.0f };
166  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, pfColor);
167  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, pfSpecular);
168  glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, pfShininess);
169  glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, pfEmission);
170  }
171 
172  /****************************************/
173  /****************************************/
174 
176  const GLfloat pfColor[] = { 0.25f, 0.25f, 0.25f, 1.0f };
177  const GLfloat pfSpecular[] = { 0.9f, 0.9f, 0.9f, 1.0f };
178  const GLfloat pfShininess[] = { 100.0f };
179  const GLfloat pfEmission[] = { 0.0f, 0.0f, 0.0f, 1.0f };
180  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, pfColor);
181  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, pfSpecular);
182  glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, pfShininess);
183  glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, pfEmission);
184  }
185 
186  /****************************************/
187  /****************************************/
188 
190  /* Top face */
191  glBegin(GL_QUADS);
192  glNormal3f(0.0f, 0.0f, 1.0f);
193  glVertex3f(-LEG_HALF_WIDTH, -LEG_HALF_DEPTH, LEG_HEIGHT);
194  glVertex3f( LEG_HALF_WIDTH, -LEG_HALF_DEPTH, LEG_HEIGHT);
195  glVertex3f( LEG_HALF_WIDTH, LEG_HALF_DEPTH, LEG_HEIGHT);
196  glVertex3f(-LEG_HALF_WIDTH, LEG_HALF_DEPTH, LEG_HEIGHT);
197  glEnd();
198  /* Bottom face */
199  glBegin(GL_QUADS);
200  glNormal3f(0.0f, 0.0f, -1.0f);
201  glVertex3f(-LEG_HALF_WIDTH, -LEG_HALF_DEPTH, 0.0f);
202  glVertex3f(-LEG_HALF_WIDTH, LEG_HALF_DEPTH, 0.0f);
203  glVertex3f( LEG_HALF_WIDTH, LEG_HALF_DEPTH, 0.0f);
204  glVertex3f( LEG_HALF_WIDTH, -LEG_HALF_DEPTH, 0.0f);
205  glEnd();
206  /* This part covers the faces (South, East, North, West) */
207  glBegin(GL_QUAD_STRIP);
208  /* Starting vertex */
209  glNormal3f(0.0f, -1.0f, 0.0f);
210  glVertex3f(-LEG_HALF_WIDTH, -LEG_HALF_DEPTH, LEG_HEIGHT);
211  glVertex3f(-LEG_HALF_WIDTH, -LEG_HALF_DEPTH, 0.0f);
212  /* South face */
213  glVertex3f( LEG_HALF_WIDTH, -LEG_HALF_DEPTH, LEG_HEIGHT);
214  glVertex3f( LEG_HALF_WIDTH, -LEG_HALF_DEPTH, 0.0f);
215  /* East face */
216  glNormal3f(1.0f, 0.0f, 0.0f);
217  glVertex3f( LEG_HALF_WIDTH, LEG_HALF_DEPTH, LEG_HEIGHT);
218  glVertex3f( LEG_HALF_WIDTH, LEG_HALF_DEPTH, 0.0f);
219  /* North face */
220  glNormal3f(0.0f, 1.0f, 0.0f);
221  glVertex3f(-LEG_HALF_WIDTH, LEG_HALF_DEPTH, LEG_HEIGHT);
222  glVertex3f(-LEG_HALF_WIDTH, LEG_HALF_DEPTH, 0.0f);
223  /* West face */
224  glNormal3f(-1.0f, 0.0f, 0.0f);
225  glVertex3f(-LEG_HALF_WIDTH, -LEG_HALF_DEPTH, LEG_HEIGHT);
226  glVertex3f(-LEG_HALF_WIDTH, -LEG_HALF_DEPTH, 0.0f);
227  glEnd();
228  }
229 
230  /****************************************/
231  /****************************************/
232 
234  /* Draw it as a tiny pyramid pointing to X
235  (with no base, cause it's not visible anyway) */
236  glBegin(GL_TRIANGLES);
237  /* Top */
238  glVertex3f(LED_HEIGHT + RING_OUTER_RADIUS, 0.0f, LED_SIDE_RING_ELEVATION );
239  glVertex3f( RING_OUTER_RADIUS, LED_HALF_SIDE, LED_SIDE_RING_ELEVATION + LED_HALF_SIDE);
240  glVertex3f( RING_OUTER_RADIUS, -LED_HALF_SIDE, LED_SIDE_RING_ELEVATION + LED_HALF_SIDE);
241  /* Bottom */
242  glVertex3f(LED_HEIGHT + RING_OUTER_RADIUS, 0.0f, LED_SIDE_RING_ELEVATION );
243  glVertex3f( RING_OUTER_RADIUS, -LED_HALF_SIDE, LED_SIDE_RING_ELEVATION - LED_HALF_SIDE);
244  glVertex3f( RING_OUTER_RADIUS, LED_HALF_SIDE, LED_SIDE_RING_ELEVATION - LED_HALF_SIDE);
245  /* Left */
246  glVertex3f(LED_HEIGHT + RING_OUTER_RADIUS, 0.0f, LED_SIDE_RING_ELEVATION );
247  glVertex3f( RING_OUTER_RADIUS, LED_HALF_SIDE, LED_SIDE_RING_ELEVATION - LED_HALF_SIDE);
248  glVertex3f( RING_OUTER_RADIUS, LED_HALF_SIDE, LED_SIDE_RING_ELEVATION + LED_HALF_SIDE);
249  /* Right */
250  glVertex3f(LED_HEIGHT + RING_OUTER_RADIUS, 0.0f, LED_SIDE_RING_ELEVATION );
251  glVertex3f( RING_OUTER_RADIUS, -LED_HALF_SIDE, LED_SIDE_RING_ELEVATION + LED_HALF_SIDE);
252  glVertex3f( RING_OUTER_RADIUS, -LED_HALF_SIDE, LED_SIDE_RING_ELEVATION - LED_HALF_SIDE);
253  glEnd();
254  }
255 
256  /****************************************/
257  /****************************************/
258 
260  /* Draw it as a tiny pyramid pointing to Z downwards
261  (with no base, cause it's not visible anyway) */
262  glBegin(GL_TRIANGLES);
263  /* North */
264  glVertex3f(LED_BOTTOM_RING_DISTANCE, 0.0f, LED_BOTTOM_RING_ELEVATION);
265  glVertex3f(RING_OUTER_RADIUS, LED_HALF_SIDE, RING_ELEVATION);
266  glVertex3f(RING_OUTER_RADIUS, -LED_HALF_SIDE, RING_ELEVATION);
267  /* South */
268  glVertex3f(LED_BOTTOM_RING_DISTANCE, 0.0f, LED_BOTTOM_RING_ELEVATION);
269  glVertex3f(RING_OUTER_RADIUS - LED_SIDE, -LED_HALF_SIDE, RING_ELEVATION);
270  glVertex3f(RING_OUTER_RADIUS - LED_SIDE, LED_HALF_SIDE, RING_ELEVATION);
271  /* West */
272  glVertex3f(LED_BOTTOM_RING_DISTANCE, 0.0f, LED_BOTTOM_RING_ELEVATION);
273  glVertex3f(RING_OUTER_RADIUS - LED_SIDE, LED_HALF_SIDE, RING_ELEVATION);
274  glVertex3f(RING_OUTER_RADIUS , LED_HALF_SIDE, RING_ELEVATION);
275  /* East */
276  glVertex3f(LED_BOTTOM_RING_DISTANCE, 0.0f, LED_BOTTOM_RING_ELEVATION);
277  glVertex3f(RING_OUTER_RADIUS , -LED_HALF_SIDE, RING_ELEVATION);
278  glVertex3f(RING_OUTER_RADIUS - LED_SIDE, -LED_HALF_SIDE, RING_ELEVATION);
279  glEnd();
280  }
281 
282  /****************************************/
283  /****************************************/
284 
286  /* Draw the ring */
287  CVector2 cVertex(RING_OUTER_RADIUS, 0.0f);
288  CRadians cAngle(-CRadians::TWO_PI / m_unVertices);
289  /* Bottom part */
290  glBegin(GL_POLYGON);
291  glNormal3f(0.0f, 0.0f, -1.0f);
292  for(GLuint i = 0; i <= m_unVertices; i++) {
293  glVertex3f(cVertex.GetX(), cVertex.GetY(), RING_ELEVATION);
294  cVertex.Rotate(cAngle);
295  }
296  glEnd();
297  /* Side surface */
298  cAngle = -cAngle;
299  CVector2 cNormal(1.0f, 0.0f);
300  cVertex.Set(RING_OUTER_RADIUS, 0.0f);
301  glBegin(GL_QUAD_STRIP);
302  for(GLuint i = 0; i <= m_unVertices; i++) {
303  glNormal3f(cNormal.GetX(), cNormal.GetY(), 0.0f);
304  glVertex3f(cVertex.GetX(), cVertex.GetY(), RING_ELEVATION + RING_HEIGHT);
305  glVertex3f(cVertex.GetX(), cVertex.GetY(), RING_ELEVATION);
306  cVertex.Rotate(cAngle);
307  cNormal.Rotate(cAngle);
308  }
309  glEnd();
310  /* Top part */
311  glBegin(GL_POLYGON);
312  glNormal3f(0.0f, 0.0f, 1.0f);
313  cVertex.Set(RING_OUTER_RADIUS, 0.0f);
314  for(GLuint i = 0; i <= m_unVertices; i++) {
315  glVertex3f(cVertex.GetX(), cVertex.GetY(), RING_ELEVATION + RING_HEIGHT);
316  cVertex.Rotate(cAngle);
317  }
318  glEnd();
319  /* Draw the rod */
320  /* Top face */
321  glBegin(GL_QUADS);
322  glNormal3f(0.0f, 0.0f, 1.0f);
323  glVertex3f(-ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
324  glVertex3f( ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
325  glVertex3f( ROD_HALF_SIDE, ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
326  glVertex3f(-ROD_HALF_SIDE, ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
327  glEnd();
328  /* This part covers the faces (South, East, North, West) */
329  glBegin(GL_QUAD_STRIP);
330  /* Starting vertex */
331  glNormal3f(0.0f, -1.0f, 0.0f);
332  glVertex3f(-ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
333  glVertex3f(-ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION);
334  /* South face */
335  glVertex3f( ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
336  glVertex3f( ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION);
337  /* East face */
338  glNormal3f(1.0f, 0.0f, 0.0f);
339  glVertex3f( ROD_HALF_SIDE, ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
340  glVertex3f( ROD_HALF_SIDE, ROD_HALF_SIDE, ROD_ELEVATION);
341  /* North face */
342  glNormal3f(0.0f, 1.0f, 0.0f);
343  glVertex3f(-ROD_HALF_SIDE, ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
344  glVertex3f(-ROD_HALF_SIDE, ROD_HALF_SIDE, ROD_ELEVATION);
345  /* West face */
346  glNormal3f(-1.0f, 0.0f, 0.0f);
347  glVertex3f(-ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION+ROD_HEIGHT);
348  glVertex3f(-ROD_HALF_SIDE, -ROD_HALF_SIDE, ROD_ELEVATION);
349  glEnd();
350  }
351 
352  /****************************************/
353  /****************************************/
354 
356  public:
357  void ApplyTo(CQTOpenGLWidget& c_visualization,
358  CEyeBotEntity& c_entity) {
359  static CQTOpenGLEyeBot m_cModel;
360  c_visualization.DrawRays(c_entity.GetControllableEntity());
361  c_visualization.DrawEntity(c_entity.GetEmbodiedEntity());
362  m_cModel.Draw(c_entity);
363  }
364  };
365 
367  public:
368  void ApplyTo(CQTOpenGLWidget& c_visualization,
369  CEyeBotEntity& c_entity) {
370  c_visualization.DrawBoundingBox(c_entity.GetEmbodiedEntity());
371  }
372  };
373 
374  REGISTER_QTOPENGL_ENTITY_OPERATION(CQTOpenGLOperationDrawNormal, CQTOpenGLOperationDrawEyeBotNormal, CEyeBotEntity);
375 
376  REGISTER_QTOPENGL_ENTITY_OPERATION(CQTOpenGLOperationDrawSelected, CQTOpenGLOperationDrawEyeBotSelected, CEyeBotEntity);
377 
378  /****************************************/
379  /****************************************/
380 
381 }
argos::CLEDEntity::GetColor
const CColor & GetColor() const
Returns the current color of the LED.
Definition: led_entity.h:58
argos::CEyeBotEntity::GetEmbodiedEntity
CEmbodiedEntity & GetEmbodiedEntity()
Definition: eyebot_entity.h:55
argos::CLEDEquippedEntity::GetLED
CLEDEntity & GetLED(UInt32 un_index)
Returns an LED by numeric index.
Definition: led_equipped_entity.cpp:166
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CRadians
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
argos::CQTOpenGLEyeBot::DrawSideLED
void DrawSideLED()
A single LED of the side ring.
Definition: qtopengl_eyebot.cpp:233
argos::CQTOpenGLEyeBot
Definition: qtopengl_eyebot.h:24
argos::CQTOpenGLOperationDrawEyeBotSelected::ApplyTo
void ApplyTo(CQTOpenGLWidget &c_visualization, CEyeBotEntity &c_entity)
Definition: qtopengl_eyebot.cpp:368
argos::CQTOpenGLWidget
Definition: qtopengl_widget.h:56
argos::CEyeBotEntity::GetLEDEquippedEntity
CLEDEquippedEntity & GetLEDEquippedEntity()
Definition: eyebot_entity.h:59
argos::CColor::GetBlue
UInt8 GetBlue() const
Returns the blue channel of the color.
Definition: color.h:101
eyebot_entity.h
qtopengl_eyebot.h
argos::CQTOpenGLOperationDrawEyeBotNormal
Definition: qtopengl_eyebot.cpp:355
argos::CQTOpenGLOperationDrawNormal
Definition: qtopengl_widget.h:40
argos::REGISTER_QTOPENGL_ENTITY_OPERATION
REGISTER_QTOPENGL_ENTITY_OPERATION(CQTOpenGLOperationDrawNormal, CQTOpenGLOperationDrawEPuckNormal, CEPuckEntity)
argos::CVector2::Set
void Set(Real f_x, Real f_y)
Sets the vector contents from Cartesian coordinates.
Definition: vector2.h:111
argos::CQTOpenGLOperationDrawEyeBotNormal::ApplyTo
void ApplyTo(CQTOpenGLWidget &c_visualization, CEyeBotEntity &c_entity)
Definition: qtopengl_eyebot.cpp:357
argos::CVector2::GetY
Real GetY() const
Returns the y coordinate of this vector.
Definition: vector2.h:94
argos::CQTOpenGLWidget::DrawEntity
void DrawEntity(CPositionalEntity &c_entity)
Draws a positional entity.
Definition: qtopengl_widget.cpp:468
argos::CColor::GetRed
UInt8 GetRed() const
Returns the red channel of the color.
Definition: color.h:79
argos::CLEDEquippedEntity
A container of CLEDEntity.
Definition: led_equipped_entity.h:36
argos::CQTOpenGLWidget::DrawBoundingBox
void DrawBoundingBox(CEmbodiedEntity &c_entity)
Draws the bounding box of an embodied entity.
Definition: qtopengl_widget.cpp:538
argos::CQTOpenGLEyeBot::SetBodyMaterial
void SetBodyMaterial()
Sets a shiny gray material.
Definition: qtopengl_eyebot.cpp:175
argos::CEyeBotEntity::GetControllableEntity
CControllableEntity & GetControllableEntity()
Definition: eyebot_entity.h:51
argos::CVector2::GetX
Real GetX() const
Returns the x coordinate of this vector.
Definition: vector2.h:78
argos::CVector2
A 2D vector class.
Definition: vector2.h:25
argos::CEyeBotEntity
Definition: eyebot_entity.h:26
argos::CQTOpenGLEyeBot::~CQTOpenGLEyeBot
virtual ~CQTOpenGLEyeBot()
Definition: qtopengl_eyebot.cpp:88
argos::CQTOpenGLEyeBot::DrawBottomLED
void DrawBottomLED()
A single LED of the bottom ring.
Definition: qtopengl_eyebot.cpp:259
UInt32
unsigned int UInt32
32-bit unsigned integer.
Definition: datatypes.h:97
argos::CColor
The basic color type.
Definition: color.h:25
argos::CQTOpenGLOperationDrawEyeBotSelected
Definition: qtopengl_eyebot.cpp:366
argos::CQTOpenGLOperationDrawSelected
Definition: qtopengl_widget.h:45
argos::CQTOpenGLEyeBot::SetLEDMaterial
void SetLEDMaterial(GLfloat f_red, GLfloat f_green, GLfloat f_blue)
Sets a colored LED material.
Definition: qtopengl_eyebot.cpp:160
argos::CQTOpenGLEyeBot::DrawBody
void DrawBody()
The eye-bot body.
Definition: qtopengl_eyebot.cpp:285
argos::CQTOpenGLEyeBot::MakeLeg
void MakeLeg()
An eye-bot leg.
Definition: qtopengl_eyebot.cpp:189
argos::CVector2::Rotate
CVector2 & Rotate(const CRadians &c_angle)
Rotates this vector by the wanted angle.
Definition: vector2.h:169
argos::CQTOpenGLWidget::DrawRays
void DrawRays(CControllableEntity &c_entity)
Draws a ray.
Definition: qtopengl_widget.cpp:504
argos::CRadians::TWO_PI
static const CRadians TWO_PI
Set to PI * 2.
Definition: angles.h:54
Real
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
argos::CQTOpenGLEyeBot::CQTOpenGLEyeBot
CQTOpenGLEyeBot()
Definition: qtopengl_eyebot.cpp:52
argos::CColor::GetGreen
UInt8 GetGreen() const
Returns the green channel of the color.
Definition: color.h:90
argos::CQTOpenGLEyeBot::Draw
virtual void Draw(CEyeBotEntity &c_entity)
Definition: qtopengl_eyebot.cpp:95