------------------------------------------------------------------------------
| 1924 | |
| 1925 | //------------------------------------------------------------------------------ |
| 1926 | int vtkPolygon::TriangulateLocalIds(int vtkNotUsed(index), vtkIdList* ptIds) |
| 1927 | { |
| 1928 | this->SuccessfulTriangulation = 1; |
| 1929 | int success = this->EarCutTriangulation(ptIds); |
| 1930 | if (!success) // Indicate possible failure |
| 1931 | { |
| 1932 | // Non-planar quads can cause the ear cut triangulation algorithm to fail. |
| 1933 | // If that happens, use vtkQuad specifically to triangulate the quad. |
| 1934 | if (this->PointIds->GetNumberOfIds() == 4) |
| 1935 | { |
| 1936 | vtkNew<vtkQuad> quad; |
| 1937 | quad->DeepCopy(this); |
| 1938 | quad->TriangulateLocalIds(0, ptIds); |
| 1939 | } |
| 1940 | else |
| 1941 | { |
| 1942 | vtkDebugMacro(<< "Possible triangulation failure"); |
| 1943 | } |
| 1944 | } |
| 1945 | return this->SuccessfulTriangulation; |
| 1946 | } |
| 1947 | |
| 1948 | //------------------------------------------------------------------------------ |
| 1949 | // Samples at three points to compute derivatives in local r-s coordinate |
no test coverage detected