model_draw.cc
Go to the documentation of this file.
1 #include "stage.hh"
2 #include "worldfile.hh"
3 #include "canvas.hh"
4 #include "texture_manager.hh"
5 using namespace Stg;
6 
7 // speech bubble colors
8 static const Color BUBBLE_FILL( 1.0, 0.8, 0.8 );// light blue/grey
9 static const Color BUBBLE_BORDER( 0,0,0 ); // black
10 static const Color BUBBLE_TEXT( 0,0,0 ); // black
11 
13 {
14  glPushMatrix();
15 
16  glTranslatef( pose.x, pose.y, pose.z+0.01 ); // tiny Z offset raises rect above grid
17 
18  Pose gp = GetGlobalPose();
19 
20  char buf[64];
21  snprintf( buf, 63, "%s [%.2f %.2f %.2f %.2f]",
22  Token(), gp.x, gp.y, gp.z, rtod(gp.a) );
23 
24  PushColor( 0,0,0,1 ); // text color black
25  Gl::draw_string( 0.5,0.5,0.5, buf );
26 
27  glRotatef( rtod(pose.a), 0,0,1 );
28 
30 
31  double dx = geom.size.x / 2.0 * 1.6;
32  double dy = geom.size.y / 2.0 * 1.6;
33 
34  PopColor();
35 
36  PushColor( 0,1,0,0.4 ); // highlight color blue
37  glRectf( -dx, -dy, dx, dy );
38  PopColor();
39 
40  PushColor( 0,1,0,0.8 ); // highlight color blue
41  glLineWidth( 1 );
42  glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
43  glRectf( -dx, -dy, dx, dy );
44  glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
45  PopColor();
46 
47 
48  // testing
49 
50  // highlight all fiducial robots within a certain range
51 
52  // Gl::pose_inverse_shift( gp );
53 
54  // double rng = 10.0;
55 
56  // Model left( gp.x - rng, gp.y, world );
57  // Model right( gp.x + rng, gp.y, world );
58  // Model down( gp.x, gp.y - rng, world );
59  // Model up( gp.x, gp.y + rng, world );
60 
61  // std::set<Model*>::iterator xmin = world->models_with_fiducials_byx.lower_bound( &left );
62  // std::set<Model*>::iterator xmax = world->models_with_fiducials_byx.upper_bound( &right );
63 
64  // std::set<Model*>::iterator ymin = world->models_with_fiducials_byy.lower_bound( &down );
65  // std::set<Model*>::iterator ymax = world->models_with_fiducials_byy.upper_bound( &up );
66 
67 
68  // PushColor( Color(1,0,0,0.5) );
69 
70 
71  // std::vector<Model*> candidates;
72  // std::set<Model*> horiz, vert;
73 
74  // while( xmin != xmax )
75  // {
76  // //candidates.insert( *xmin );
77  // horiz.insert( *xmin);
78 
79  // Pose op = (*xmin)->GetGlobalPose();
80  // glRectf( op.x - 5, op.y - 5, op.x + 5, op.y + 5 );
81 
82  // xmin++;
83  // }
84 
85  // PopColor();
86 
87  // PushColor( Color(0,0,1,0.5) );
88 
89  // while( ymin != ymax )
90  // {
91  // vert.insert( *ymin );
92 
93  // // candidates.insert( *ymin );
94 
95  // Pose op = (*ymin)->GetGlobalPose();
96  // glRectf( op.x - 5, op.y - 5, op.x + 5, op.y + 5 );
97  // ymin++;
98  // }
99 
100  // PopColor();
101 
102  // PushColor( Color(0,1,0,0.5) );
103 
104  // std::set_intersection( horiz.begin(), horiz.end(),
105  // vert.begin(), vert.end(),
106  // std::inserter( candidates, candidates.end() ) );
107 
108  // //printf( "cand sz %lu\n", candidates.size() );
109 
110  // glTranslatef( 0,0,1.0 );
111 
112  // FOR_EACH( it, candidates )
113  // {
114  // Pose op = (*it)->GetGlobalPose();
115  // glRectf( op.x - 5, op.y - 5, op.x + 5, op.y + 5 );
116  // }
117 
118  // PopColor();
119 
120 
121  glPopMatrix();
122 
123 }
124 
125 
127 {
128  double darkness = 0;
129  double fade = 0.5 / (double)(trail_length+1);
130 
131  PushColor( 0,0,0,1 ); // dummy push just saving the color
132 
133  // this loop could be faster, but optimzing vis is not a priority
134  for( unsigned int i=0; i<trail_length; i++ )
135  {
136  // find correct offset inside ring buffer
137  TrailItem& checkpoint =
138  trail[ (i + trail_index) % trail_length ];
139 
140  // ignore invalid items
141  if( checkpoint.time == 0 )
142  continue;
143 
144  glPushMatrix();
145  Pose pz = checkpoint.pose;
146 
147  Gl::pose_shift( pz );
149 
150  darkness += fade;
151  Color c = checkpoint.color;
152  c.a = darkness;
153  glColor4f( c.r, c.g, c.b, c.a );
154 
156 
157  glPopMatrix();
158  }
159 
160  PopColor();
161 }
162 
164 {
165  double timescale = 0.0000001;
166 
167  FOR_EACH( it, trail )
168  {
169  TrailItem& checkpoint = *it;
170 
171  glPushMatrix();
172  Pose pz = checkpoint.pose;
173  pz.z = (world->sim_time - checkpoint.time) * timescale;
174 
175  Gl::pose_shift( pz );
177 
178  DrawBlocks();
179 
180  glPopMatrix();
181  }
182 }
183 
185 {
186  double dx = 0.2;
187  double dy = 0.07;
188  double timescale = 1e-7;
189 
190  PushColor( 0,0,0,1 ); // dummy push
191 
192  FOR_EACH( it, trail )
193  {
194  TrailItem& checkpoint = *it;
195 
196  glPushMatrix();
197  Pose pz = checkpoint.pose;
198  // set the height proportional to age
199  pz.z = (world->sim_time - checkpoint.time) * timescale;
200 
201  Gl::pose_shift( pz );
203 
204  Color& c = checkpoint.color;
205  glColor4f( c.r, c.g, c.b, c.a );
206 
207  glBegin( GL_TRIANGLES );
208  glVertex3f( 0, -dy, 0);
209  glVertex3f( dx, 0, 0 );
210  glVertex3f( 0, +dy, 0 );
211  glEnd();
212 
213  glPopMatrix();
214  }
215 
216  PopColor();
217 }
218 
220 {
221  DrawPose( GetGlobalPose() );
222 
223  FOR_EACH( it, children )
224  (*it)->DrawOriginTree();
225 }
226 
227 
229 {
230  PushLocalCoords();
231 
232  FOR_EACH( it, children )
233  (*it)->DrawBlocksTree();
234 
235  DrawBlocks();
236  PopCoords();
237 }
238 
240 {
241  PushColor( 0,0,0,1 );
242  glPointSize( 4 );
243 
244  glBegin( GL_POINTS );
245  glVertex3f( pose.x, pose.y, pose.z );
246  glEnd();
247 
248  PopColor();
249 }
250 
252 {
253  blockgroup.CallDisplayList( this );
254 }
255 
257 {
258  PushLocalCoords();
259 
260  FOR_EACH( it, children )
261  (*it)->DrawBoundingBoxTree();
262 
263  DrawBoundingBox();
264  PopCoords();
265 }
266 
268 {
270 
271  PushColor( color );
272 
273  glBegin( GL_QUAD_STRIP );
274 
275  glVertex3f( -geom.size.x/2.0, -geom.size.y/2.0, geom.size.z );
276  glVertex3f( -geom.size.x/2.0, -geom.size.y/2.0, 0 );
277 
278  glVertex3f( +geom.size.x/2.0, -geom.size.y/2.0, geom.size.z );
279  glVertex3f( +geom.size.x/2.0, -geom.size.y/2.0, 0 );
280 
281  glVertex3f( +geom.size.x/2.0, +geom.size.y/2.0, geom.size.z );
282  glVertex3f( +geom.size.x/2.0, +geom.size.y/2.0, 0 );
283 
284  glVertex3f( +geom.size.x/2.0, +geom.size.y/2.0, geom.size.z );
285  glVertex3f( +geom.size.x/2.0, +geom.size.y/2.0, 0 );
286 
287  glVertex3f( -geom.size.x/2.0, +geom.size.y/2.0, geom.size.z );
288  glVertex3f( -geom.size.x/2.0, +geom.size.y/2.0, 0 );
289 
290  glVertex3f( -geom.size.x/2.0, -geom.size.y/2.0, geom.size.z );
291  glVertex3f( -geom.size.x/2.0, -geom.size.y/2.0, 0 );
292 
293  glEnd();
294 
295  glBegin( GL_LINES );
296  glVertex2f( -0.02, 0 );
297  glVertex2f( +0.02, 0 );
298 
299  glVertex2f( 0, -0.02 );
300  glVertex2f( 0, +0.02 );
301  glEnd();
302 
303  PopColor();
304 }
305 
306 // move into this model's local coordinate frame
308 {
309  glPushMatrix();
310 
311  if( parent && parent->stack_children )
312  glTranslatef( 0,0, parent->geom.size.z );
313 
314  Gl::pose_shift( pose );
315 }
316 
318 {
319  glPopMatrix();
320 }
321 
322 void Model::AddVisualizer( Visualizer* cv, bool on_by_default )
323 {
324  if( !cv )
325  return;
326 
327  // If there's no GUI, ignore this request
328  if( ! world_gui )
329  return;
330 
331  //save visual instance
332  cv_list.push_back( cv );
333 
334  //register option for all instances which share the same name
335  Canvas* canvas = world_gui->GetCanvas();
336  std::map< std::string, Option* >::iterator i = canvas->_custom_options.find( cv->GetMenuName() );
337  if( i == canvas->_custom_options.end() ) {
338  Option* op = new Option( cv->GetMenuName(),
339  cv->GetWorldfileName(),
340  "",
341  on_by_default,
342  world_gui );
343  canvas->_custom_options[ cv->GetMenuName() ] = op;
344  RegisterOption( op );
345  }
346 }
347 
349 {
350  if( cv )
351  EraseAll( cv, cv_list );
352 
353  //TODO unregister option - tricky because there might still be instances attached to different models which have the same name
354 }
355 
356 
358 {
359  PushLocalCoords();
360  DrawStatus( cam );
361  FOR_EACH( it, children )
362  (*it)->DrawStatusTree( cam );
363  PopCoords();
364 }
365 
367 {
368  if( power_pack || !say_string.empty() )
369  {
370  float pitch = - cam->pitch();
371  float yaw = - cam->yaw();
372 
373  Pose gpz = GetGlobalPose();
374 
375  float robotAngle = -rtod(gpz.a);
376  glPushMatrix();
377 
378  // move above the robot
379  glTranslatef( 0, 0, 0.5 );
380 
381  // rotate to face screen
382  glRotatef( robotAngle - yaw, 0,0,1 );
383  glRotatef( -pitch, 1,0,0 );
384 
385  // if( power_pack )
386  //power_pack->Visualize( cam );
387 
388  if( !say_string.empty() )
389  {
390  glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
391 
392  //get raster positition, add gl_width, then project back to world coords
393  glRasterPos3f( 0, 0, 0 );
394  GLfloat pos[ 4 ];
395  glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
396 
397  GLboolean valid;
398  glGetBooleanv( GL_CURRENT_RASTER_POSITION_VALID, &valid );
399 
400  if( valid )
401  {
402  //fl_font( FL_HELVETICA, 12 );
403  float w = gl_width( this->say_string.c_str() ); // scaled text width
404  float h = gl_height(); // scaled text height
405 
406  GLdouble wx, wy, wz;
407  GLint viewport[4];
408  glGetIntegerv(GL_VIEWPORT, viewport);
409 
410  GLdouble modelview[16];
411  glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
412 
413  GLdouble projection[16];
414  glGetDoublev(GL_PROJECTION_MATRIX, projection);
415 
416  //get width and height in world coords
417  gluUnProject( pos[0] + w, pos[1], pos[2], modelview, projection, viewport, &wx, &wy, &wz );
418  w = wx;
419  gluUnProject( pos[0], pos[1] + h, pos[2], modelview, projection, viewport, &wx, &wy, &wz );
420  h = wy;
421 
422  // calculate speech bubble margin
423  const float m = h/10;
424 
425  // draw inside of bubble
427  glPushAttrib( GL_POLYGON_BIT | GL_LINE_BIT );
428  glPolygonMode( GL_FRONT, GL_FILL );
429  glEnable( GL_POLYGON_OFFSET_FILL );
430  glPolygonOffset( 1.0, 1.0 );
431  Gl::draw_octagon( w, h, m );
432  glDisable( GL_POLYGON_OFFSET_FILL );
433  PopColor();
434 
435  // draw outline of bubble
437  glLineWidth( 1 );
438  glEnable( GL_LINE_SMOOTH );
439  glPolygonMode( GL_FRONT, GL_LINE );
440  Gl::draw_octagon( w, h, m );
441  glPopAttrib();
442  PopColor();
443 
445  // draw text inside the bubble
446  Gl::draw_string( m, 2.5*m, 0, this->say_string.c_str() );
447  PopColor();
448  }
449  }
450  glPopMatrix();
451  }
452 
453  if( stall )
454  {
455  DrawImage( TextureManager::getInstance()._stall_texture_id, cam, 0.85 );
456  }
457 
458  // extern GLuint glowTex;
459  // extern GLuint checkTex;
460 
461  // if( parent == NULL )
462  // {
463  // glBlendFunc(GL_SRC_COLOR, GL_ONE );
464  // DrawImage( glowTex, cam, 1.0 );
465  // glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
466  // }
467 }
468 
469 void Model::DrawImage( uint32_t texture_id, Camera* cam, float alpha,
470  double width, double height )
471 {
472  (void)alpha; // avoid warning about unused var
473 
474  float yaw, pitch;
475  pitch = - cam->pitch();
476  yaw = - cam->yaw();
477 
478  float robotAngle = -rtod( GetGlobalPose().a);
479 
480  glPolygonMode( GL_FRONT, GL_FILL );
481 
482  glEnable(GL_TEXTURE_2D);
483  glBindTexture( GL_TEXTURE_2D, texture_id );
484 
485  glColor4f( 1.0, 1.0, 1.0, 1.0 );
486  glPushMatrix();
487 
488  //position image above the robot
489  // TODO
490  glTranslatef( 0.0, 0.0, ModelHeight() + 0.3 );
491 
492  // rotate to face screen
493  glRotatef( robotAngle - yaw, 0,0,1 );
494  glRotatef( -pitch - 90, 1,0,0 );
495 
496  //draw a square, with the textured image
497  glBegin(GL_QUADS);
498  glTexCoord2f(0.0f, 0.0f); glVertex3f(-0.25f, 0, -0.25f );
499  glTexCoord2f(width, 0.0f); glVertex3f( 0.25f, 0, -0.25f );
500  glTexCoord2f(width, height); glVertex3f( 0.25f, 0, 0.25f );
501  glTexCoord2f(0.0f, height); glVertex3f(-0.25f, 0, 0.25f );
502  glEnd();
503 
504  glBindTexture( GL_TEXTURE_2D, 0 );
505  glDisable(GL_TEXTURE_2D);
506 
507  // glPolygonMode( GL_FRONT, GL_LINE );
508  // glColor3f( 0,0,1 );
509  // glBegin(GL_QUADS);
510  // glVertex3f(-0.25f, 0, -0.25f );
511  // glVertex3f( 0.25f, 0, -0.25f );
512  // glVertex3f( 0.25f, 0, 0.25f );
513  // glVertex3f(-0.25f, 0, 0.25f );
514  // glEnd();
515 
516  glPopMatrix();
517 }
518 
519 
520 //static GLUquadric* quadric = NULL;
521 
523 {
524  if( flag_list.size() < 1 )
525  return;
526 
527  Pose gp = GetGlobalPose();
528  GLfloat z = 1.0;
529 
530  for( std::list<Flag*>::reverse_iterator it( flag_list.rbegin());
531  it != flag_list.rend();
532  it++ )
533  {
534  double sz = (*it)->GetSize();
535  double d = sz/2.0;
536 
537  (*it)->GetColor().GLSet();
538 
539  glVertex3f( gp.x+d, gp.y+0, gp.z+0 +z);
540  glVertex3f( gp.x+0, gp.y+d, gp.z+0 +z);
541  glVertex3f( gp.x+0, gp.y+0, gp.z+d +z);
542 
543  glVertex3f( gp.x+d, gp.y+0, gp.z+0 +z);
544  glVertex3f( gp.x+0, gp.y+d, gp.z+0 +z);
545  glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
546 
547 
548  glVertex3f( gp.x-d, gp.y+0, gp.z+0 +z);
549  glVertex3f( gp.x+0, gp.y-d, gp.z+0 +z);
550  glVertex3f( gp.x+0, gp.y+0, gp.z+d +z);
551 
552  glVertex3f( gp.x-d, gp.y+0, gp.z+0 +z);
553  glVertex3f( gp.x+0, gp.y+d, gp.z+0 +z);
554  glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
555 
556  glVertex3f( gp.x+d, gp.y+0, gp.z+0 +z);
557  glVertex3f( gp.x+0, gp.y-d, gp.z+0 +z);
558  glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
559 
560 
561  // for wire-frame we only need half of the 8 triangles
562 
563  //glVertex3f( gp.x+d, gp.y+0, gp.z+0 +z);
564  //glVertex3f( gp.x+0, gp.y+d, gp.z+0 +z);
565  //glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
566 
567  //glVertex3f( gp.x-d, gp.y+0, gp.z+0 +z);
568  //glVertex3f( gp.x+0, gp.y-d, gp.z+0 +z);
569  //glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
570 
571  // and two more...
572 
573  z += sz;
574  }
575 }
576 
577 
578 // void Model::DrawBlinkenlights()
579 // {
580 // PushLocalCoords();
581 
582 // GLUquadric* quadric = gluNewQuadric();
583 // //glTranslatef(0,0,1); // jump up
584 // //Pose gpose = GetGlobalPose();
585 // //glRotatef( 180 + rtod(-gpose.a),0,0,1 );
586 
587 // for( unsigned int i=0; i<blinkenlights->len; i++ )
588 // {
589 // blinkenlight_t* b =
590 // (blinkenlight_t*)g_ptr_array_index( blinkenlights, i );
591 // assert(b);
592 
593 // glTranslatef( b->pose.x, b->pose.y, b->pose.z );
594 
595 // PushColor( b->color );
596 
597 // if( b->enabled )
598 // gluQuadricDrawStyle( quadric, GLU_FILL );
599 // else
600 // gluQuadricDrawStyle( quadric, GLU_LINE );
601 
602 // gluSphere( quadric, b->size/2.0, 8,8 );
603 
604 // PopColor();
605 // }
606 
607 // gluDeleteQuadric( quadric );
608 
609 // PopCoords();
610 // }
611 
612 void Model::DrawPicker( void )
613 {
614  //PRINT_DEBUG1( "Drawing %s", token );
615  PushLocalCoords();
616 
617  // draw the boxes
619 
620  // recursively draw the tree below this model
621  FOR_EACH( it, children )
622  (*it)->DrawPicker();
623 
624  PopCoords();
625 }
626 
628 {
629  (void)cam; // avoid warning about unused var
630 }
631 
633 {
634  PushLocalCoords();
635 
636  if( subs > 0 )
637  {
638  DataVisualize( cam ); // virtual function overridden by some model types
639 
640  FOR_EACH( it, cv_list )
641  {
642  Visualizer* vis = *it;
643  if( world_gui->GetCanvas()->_custom_options[ vis->GetMenuName() ]->isEnabled() )
644  vis->Visualize( this, cam );
645  }
646  }
647 
648  // and draw the children
649  FOR_EACH( it, children )
650  (*it)->DataVisualizeTree( cam );
651 
652  PopCoords();
653 }
654 
655 void Model::DrawGrid( void )
656 {
657  if ( gui.grid )
658  {
659  PushLocalCoords();
660 
661  bounds3d_t vol;
662  vol.x.min = -geom.size.x/2.0;
663  vol.x.max = geom.size.x/2.0;
664  vol.y.min = -geom.size.y/2.0;
665  vol.y.max = geom.size.y/2.0;
666  vol.z.min = 0;
667  vol.z.max = geom.size.z;
668 
669  PushColor( 0,0,1,0.4 );
670  Gl::draw_grid(vol);
671  PopColor();
672  PopCoords();
673  }
674 }
virtual void PushColor(Color col)
Definition: stage.hh:2189
int subs
the number of subscriptions to this model
Definition: stage.hh:1959
Canvas * GetCanvas(void) const
Definition: stage.hh:1592
const std::string & GetWorldfileName()
Definition: stage.hh:562
Bounds y
volume extent along y axis, initially zero
Definition: stage.hh:453
virtual void DrawBlocks()
Definition: model_draw.cc:251
std::list< Visualizer * > cv_list
Definition: stage.hh:1872
double a
Definition: stage.hh:200
const std::string & GetMenuName()
Definition: stage.hh:561
bool stack_children
whether child models should be stacked on top of this model or not
Definition: stage.hh:1956
void DrawOriginTree()
Definition: model_draw.cc:219
double max
largest value in range, initially zero
Definition: stage.hh:435
The Stage library uses its own namespace.
Definition: canvas.hh:8
static const Color BUBBLE_TEXT(0, 0, 0)
void CallDisplayList(Model *mod)
Definition: blockgroup.cc:239
meters_t x
Definition: stage.hh:228
void DrawTrailArrows()
Definition: model_draw.cc:184
virtual void DrawPicker()
Definition: model_draw.cc:612
void DrawStatusTree(Camera *cam)
Definition: model_draw.cc:357
PowerPack * power_pack
Definition: stage.hh:1919
virtual void DrawSelected(void)
Definition: model_draw.cc:12
void DrawImage(uint32_t texture_id, Camera *cam, float alpha, double width=1.0, double height=1.0)
Definition: model_draw.cc:469
Geom geom
Definition: stage.hh:1883
static TextureManager & getInstance(void)
void EraseAll(T thing, C &cont)
Definition: stage.hh:621
double min
smallest value in range, initially zero
Definition: stage.hh:433
Size size
extent
Definition: stage.hh:395
double yaw(void) const
Definition: stage.hh:1378
virtual void PopColor()
Definition: stage.hh:2191
std::vector< TrailItem > trail
Definition: stage.hh:1982
void DataVisualizeTree(Camera *cam)
Definition: model_draw.cc:632
virtual void Visualize(Model *mod, Camera *cam)=0
void DrawFootPrint(const Geom &geom)
Definition: blockgroup.cc:130
meters_t z
location in 3 axes
Definition: stage.hh:251
meters_t y
Definition: stage.hh:251
void DrawBoundingBoxTree()
Definition: model_draw.cc:256
std::map< std::string, Option * > _custom_options
Definition: canvas.hh:109
void RemoveVisualizer(Visualizer *custom_visual)
Definition: model_draw.cc:348
WorldGui * world_gui
Definition: stage.hh:2018
void RegisterOption(Option *opt)
Definition: model.cc:996
static unsigned int trail_length
Definition: stage.hh:1990
usec_t sim_time
the current sim time in this world in microseconds
Definition: stage.hh:907
double r
Definition: stage.hh:200
void DrawTrailFootprint()
Definition: model_draw.cc:126
Pose GetGlobalPose() const
Definition: model.cc:1379
double rtod(double r)
Definition: stage.hh:148
Pose pose
position
Definition: stage.hh:394
void draw_grid(bounds3d_t vol)
Definition: gl.cc:141
void PushLocalCoords()
Definition: model_draw.cc:307
void DrawTrailBlocks()
Definition: model_draw.cc:163
meters_t y
Definition: stage.hh:228
void pose_shift(const Pose &pose)
Definition: gl.cc:13
void AddVisualizer(Visualizer *custom_visual, bool on_by_default)
Definition: model_draw.cc:322
meters_t z
Definition: stage.hh:228
double b
Definition: stage.hh:200
void draw_string(float x, float y, float z, const char *string)
Definition: gl.cc:65
bool stall
Set to true iff the model collided with something else.
Definition: stage.hh:1958
double g
Definition: stage.hh:200
Bounds x
volume extent along x axis, intially zero
Definition: stage.hh:451
unsigned int trail_index
Definition: stage.hh:1985
std::vector< Model * > children
Definition: stage.hh:689
class Stg::Model::Visibility vis
void DrawGrid()
Definition: model_draw.cc:655
double pitch(void) const
Definition: stage.hh:1379
BlockGroup blockgroup
Definition: stage.hh:1773
Bounds z
volume extent along z axis, initially zero
Definition: stage.hh:455
Pose pose
Definition: stage.hh:1916
void DrawFlagList()
Definition: model_draw.cc:522
virtual void DataVisualize(Camera *cam)
Definition: model_draw.cc:627
World * world
Definition: stage.hh:2017
std::string say_string
if non-empty, this string is displayed in the GUI
Definition: stage.hh:1954
void DrawBlocksTree()
Definition: model_draw.cc:228
std::list< Flag * > flag_list
Definition: stage.hh:1875
void DrawBoundingBox()
Definition: model_draw.cc:267
void DrawSolid(const Geom &geom)
Definition: blockgroup.cc:112
void DrawPose(Pose pose)
Definition: model_draw.cc:239
#define FOR_EACH(I, C)
Definition: stage.hh:616
void draw_octagon(float w, float h, float m)
Definition: gl.cc:90
class Stg::Model::GuiState gui
radians_t a
rotation about the z axis.
Definition: stage.hh:252
Color color
Definition: stage.hh:1859
static const Color BUBBLE_FILL(1.0, 0.8, 0.8)
virtual void DrawStatus(Camera *cam)
Definition: model_draw.cc:366
void PopCoords()
Definition: model_draw.cc:317
static const Color BUBBLE_BORDER(0, 0, 0)
meters_t x
Definition: stage.hh:251
const char * Token() const
Definition: stage.hh:715
meters_t ModelHeight() const
Definition: model.cc:761
Model * parent
Definition: stage.hh:1912


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Jun 10 2019 15:06:09