use center coords and set center on dbl click also in solution scene

This commit is contained in:
Christopher Lackner 2022-07-12 11:34:42 +02:00
parent 0402ca07cd
commit ea071bed4f

View File

@ -795,12 +795,25 @@ namespace netgen
static double oldrad = 0; static double oldrad = 0;
mesh->GetBox (pmin, pmax, -1); mesh->GetBox (pmin, pmax, -1);
center = Center (pmin, pmax); if(vispar.use_center_coords && zoomall == 2)
{
center.X() = vispar.centerx;
center.Y() = vispar.centery;
center.Z() = vispar.centerz;
cout << "use center coords, center = " << center.X() << ", " << center.Y() << ", " << center.Z() << endl;
}
else if(selpoint >= 1 && zoomall == 2)
center = mesh->Point(selpoint);
else if(vispar.centerpoint >= 1 && zoomall == 2)
center = mesh->Point(vispar.centerpoint);
else
center = Center (pmin, pmax);
rad = 0.5 * Dist (pmin, pmax); rad = 0.5 * Dist (pmin, pmax);
if(rad == 0) rad = 1e-6;
glEnable (GL_NORMALIZE); glEnable (GL_NORMALIZE);
if (rad > 1.5 * oldrad || if (rad > 1.2 * oldrad ||
mesh->GetMajorTimeStamp() > surfeltimestamp || mesh->GetMajorTimeStamp() > surfeltimestamp ||
zoomall) zoomall)
{ {