# HG changeset patch # User Dmitriy Morozov <morozov@cs.duke.edu> # Date 1150722002 14400 # Node ID 4928fc0f292de894008d7d25c734455cd8c8e19f # Parent f79ae6818a1111e111ac39eec3d75a2f33331375 Wheel flying, different color for wireframe, center scene only for the first model diff -r f79ae6818a11 -r 4928fc0f292d VEFViewer.cpp --- a/VEFViewer.cpp Tue Jun 13 13:53:04 2006 -0400 +++ b/VEFViewer.cpp Mon Jun 19 09:00:02 2006 -0400 @@ -10,6 +10,7 @@ void VEFViewer::init() { setBackgroundColor(QColor(0xAA, 0xAA, 0xAA)); + setWheelBinding(Qt::AltModifier, CAMERA, MOVE_FORWARD); // Lights glEnable(GL_LIGHTING); @@ -51,8 +52,12 @@ setSceneBoundingBox(min, max); setSceneCenter(center); - camera()->centerScene(); - camera()->showEntireScene(); + + if (modelList->count() == 1) + { + camera()->centerScene(); + camera()->showEntireScene(); + } std::cout << "Min: " << min << std::endl; std::cout << "Max: " << max << std::endl; @@ -282,11 +287,16 @@ } // Draw the object - glColor3f(0., .4, .6); if (!isWireframe()) + { + glColor3f(0., .4, .6); glCallList(display_list); + } else + { + glColor3f(1., 0, 0); glCallList(wireframe_display_list); + } } void QFacesLWI::drawWithNames(int offset) const