Implemented Blender-style vertex smoothing. See Blender's file
editmesh_mods.c, at function
"static int smooth_vertex(bContext *C, wmOperator *op)" What it does: 1.
For each unique edge, compute the average of both vertices and store it in
a Point3f. Also increment a counter for each vertex indicating that it has
been part of an averaging operation. If the vertex is again part of an
averaging operation, just add the new average to the existing one. 2. For
each unique vertex, computer a factor as 0.5/count, where count is the
number of times that the vertex has been part of an averaging operation.
Then set the value of the vertex to 0.5 times the original coordinates,
plus the factor times the cumulative average coordinates. The result is
beautifully smoothed meshes that don't shrink noticeably. All kudos to
Blender's authors. Thanks for sharing with GPL license.
protected static void smooth2(List<Point3f> triangles,