Merge branch 'use_center_coords_sol_scene' into 'master'

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

See merge request ngsolve/netgen!510
This commit is contained in:
Lackner, Christopher 2022-07-13 11:10:26 +02:00
commit 93842302b4

View File

@ -795,12 +795,24 @@ namespace netgen
static double oldrad = 0;
mesh->GetBox (pmin, pmax, -1);
if(vispar.use_center_coords && zoomall == 2)
{
center.X() = vispar.centerx;
center.Y() = vispar.centery;
center.Z() = vispar.centerz;
}
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);
if(rad == 0) rad = 1e-6;
glEnable (GL_NORMALIZE);
if (rad > 1.5 * oldrad ||
if (rad > 1.2 * oldrad ||
mesh->GetMajorTimeStamp() > surfeltimestamp ||
zoomall)
{