Skip to content

Commit dcbc20d

Browse files
committed
more ranger rendering tweaks
1 parent 27b6867 commit dcbc20d

File tree

1 file changed

+3
-51
lines changed

1 file changed

+3
-51
lines changed

libstage/model_ranger.cc

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,7 @@ void ModelRanger::Sensor::Visualize(ModelRanger::Vis *vis, ModelRanger *rgr) con
277277
const double sample_fov = fov / sample_count;
278278

279279
if (vis->showTransducers) {
280-
// draw the sensor body as a rectangle in a darker version of the body color
281-
//Color col( rgr->color );
282-
// col.r /= 3.0;
283-
// col.g /= 3.0;
284-
// col.b /= 3.0;
285-
rgr->PushColor(color);
286-
280+
rgr->PushColor(color);
287281
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
288282
glRectf(-size.x / 2.0, -size.y / 2.0, size.x / 2.0, size.y / 2.0);
289283
rgr->PopColor();
@@ -356,7 +350,7 @@ void ModelRanger::Sensor::Visualize(ModelRanger::Vis *vis, ModelRanger *rgr) con
356350
glDepthMask(GL_FALSE);
357351
glPolygonMode(GL_FRONT, GL_FILL);
358352
Color c = color;
359-
c.a = 0.35; // some alpha
353+
c.a = 0.1; // some alpha
360354
rgr->PushColor(c);
361355

362356
glBegin( GL_POLYGON );
@@ -373,23 +367,6 @@ void ModelRanger::Sensor::Visualize(ModelRanger::Vis *vis, ModelRanger *rgr) con
373367
}
374368

375369
if (vis->showStrikes) {
376-
// TODO - paint the stike point in a color based on intensity
377-
// // if the sample is unusually bright, draw a
378-
// little blob
379-
// if( intensities[s] > 0.0 )
380-
// {
381-
// // this happens rarely so we can
382-
// do
383-
// it in immediate mode
384-
// glBegin( GL_POINTS );
385-
// glVertex2f( pts[2*s+2],
386-
// pts[2*s+3]
387-
// );
388-
// glEnd();
389-
// }
390-
391-
// draw the beam strike points
392-
// c.a = 0.8;
393370
rgr->PushColor(Color::blue); // solid color
394371
glPointSize(2);
395372

@@ -400,32 +377,7 @@ void ModelRanger::Sensor::Visualize(ModelRanger::Vis *vis, ModelRanger *rgr) con
400377

401378
rgr->PopColor();
402379
}
403-
404-
// if( vis->showBeams ) {
405-
// Color c = color;
406-
407-
// // darker version of the same color
408-
// c.r /= 2.0;
409-
// c.g /= 2.0;
410-
// c.b /= 2.0;
411-
// c.a = 1.0;
412-
413-
// rgr->PushColor( c );
414-
// glBegin( GL_LINES );
415-
416-
// for( size_t s(0); s<sample_count; s++ ) {
417-
// glVertex2f( 0,0 );
418-
// double ray_angle( sample_count == 1 ? 0 : (s * (fov /
419-
// (sample_count-1))) - fov/2.0 );
420-
// glVertex2f( ranges[s] * cos(ray_angle),
421-
// ranges[s] * sin(ray_angle) );
422-
// }
423-
// glEnd();
424-
425-
// rgr->PopColor();
426-
// }
427-
428-
//rgr->PopColor();
380+
429381
glPopMatrix();
430382
}
431383

0 commit comments

Comments
 (0)