mirror of
https://github.com/NGSolve/netgen.git
synced 2025-02-14 14:23:08 +05:00
Also shrink identifications in visualization
This commit is contained in:
parent
d1228b6ce9
commit
b14a9e6d2b
@ -876,15 +876,21 @@ namespace netgen
|
|||||||
auto [hash_pts, hash_nr] = hash;
|
auto [hash_pts, hash_nr] = hash;
|
||||||
auto [pi1, pi2] = hash_pts;
|
auto [pi1, pi2] = hash_pts;
|
||||||
// val = pts[2];
|
// val = pts[2];
|
||||||
const Point3d & p1 = mesh->Point(pi1);
|
Point<3> p1 = mesh->Point(pi1);
|
||||||
const Point3d & p2 = mesh->Point(pi2);
|
Point<3> p2 = mesh->Point(pi2);
|
||||||
|
Point<3> c = Center(p1, p2);
|
||||||
|
if (vispar.shrink < 1)
|
||||||
|
{
|
||||||
|
p1 = c + vispar.shrink * (p1 - c);
|
||||||
|
p2 = c + vispar.shrink * (p2 - c);
|
||||||
|
}
|
||||||
|
|
||||||
glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
|
glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
|
||||||
identifiedcol);
|
identifiedcol);
|
||||||
|
|
||||||
glBegin (GL_LINES);
|
glBegin (GL_LINES);
|
||||||
glVertex3f (p1.X(), p1.Y(), p1.Z());
|
glVertex3dv(p1);
|
||||||
glVertex3f (p2.X(), p2.Y(), p2.Z());
|
glVertex3dv(p2);
|
||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user