Files
test/source
Tamito Kajiyama a20ca0ca32 Better fix for degenerate triangles in imported mesh data.
This commit replaces the solution in revision 44534.

It is recalled that a degenerate triangle is a triangle such that
1) A and B are in the same position in the 3D space; or
2) the distance between point P and line segment AB is zero.

Unlike the previous solution, the present fix is capable of
any mesh topology involving any number of degenerate triangles.

Degenerated triangles are removed in two steps.  First,
degenerate triangles in the second form are transformed into
the first form by moving P to the position of either A or B
that is closer to P.  This modification affects all triangles
sharing the vertex P.  Then, all degenerate triangles in the
first form are removed by just ignoring them.

Obviously, the present solution has a disadvantage that
resulting strokes may appear incorrect.  This drawback is
justified by the fact that the present solution is robust and
easy to implement.  Users are expected to fix incorrect
strokes (if any) by manual removal of degenerate triangles
from mesh data.
2012-02-29 01:11:37 +00:00
..
2011-05-09 08:15:38 +00:00