------------------------------------------------------------------------------
| 1698 | |
| 1699 | //------------------------------------------------------------------------------ |
| 1700 | int vtkSLACReader::InterpolateMidpointData( |
| 1701 | vtkMultiBlockDataSet* output, vtkSLACReader::MidpointIdMap& map) |
| 1702 | { |
| 1703 | // Get the point information from the output data (where it was placed |
| 1704 | // earlier). |
| 1705 | vtkPoints* points = |
| 1706 | vtkPoints::SafeDownCast(output->GetInformation()->Get(vtkSLACReader::POINTS())); |
| 1707 | vtkPointData* pd = |
| 1708 | vtkPointData::SafeDownCast(output->GetInformation()->Get(vtkSLACReader::POINT_DATA())); |
| 1709 | if (!pd) |
| 1710 | { |
| 1711 | vtkWarningMacro(<< "Missing point data."); |
| 1712 | return 0; |
| 1713 | } |
| 1714 | |
| 1715 | // Set up the point data for adding new points and interpolating their values. |
| 1716 | pd->InterpolateAllocate(pd, points->GetNumberOfPoints()); |
| 1717 | |
| 1718 | EdgeEndpoints edge; |
| 1719 | vtkIdType midpoint; |
| 1720 | for (map.InitTraversal(); map.GetNextMidpoint(edge, midpoint);) |
| 1721 | { |
| 1722 | pd->InterpolateEdge(pd, midpoint, edge.GetMinEndPoint(), edge.GetMaxEndPoint(), 0.5); |
| 1723 | } |
| 1724 | |
| 1725 | return 1; |
| 1726 | } |
| 1727 | |
| 1728 | //------------------------------------------------------------------------------ |
| 1729 | int vtkSLACReader::MeshUpToDate() |
no test coverage detected