//----------------------------------------------------------------------------- void ZonePlugin::redraw (const float currentTime, const float elapsedTime) { AbstractPlugin* parent = getParentPlugin(); ZonePlugin* parentZone = dynamic_cast<ZonePlugin*>(parent); // the root zone if( parentZone == NULL ) { // right now do not call the base class // as we want to see the children ... BaseClass::redrawChildren( currentTime, elapsedTime ); if( isVisible() == false ) { return; } // draw "zone area" // zoneUtility( ); } else { // draw "zone area" if( isVisible() == true ) { zoneUtility( ); } BaseClass::redraw( currentTime, elapsedTime ); if( isVisible() == false ) { return; } // textual annotation AbstractPlugin* contentPlugin = getPlugin(0); size_t population = 0; if( contentPlugin != NULL ) { osAVGroup vehicles = contentPlugin->allVehicles(); population = vehicles.size(); } std::ostringstream annote; annote << std::setprecision (2) << std::setiosflags (std::ios::fixed); annote << "Zone: " << getZoneId() << std::endl << "pos(" << position() << ")" << std::endl; annote << "Population: " << population << std::endl << std::ends; draw2dTextAt3dLocation (annote, position(), gGreen, drawGetWindowWidth(), drawGetWindowHeight()); } }