| 117 | } |
| 118 | |
| 119 | int vtkInterpolatingSubdivisionFilter::FindEdge(vtkPolyData* mesh, vtkIdType cellId, vtkIdType p1, |
| 120 | vtkIdType p2, vtkIntArray* edgeData, vtkIdList* cellIds) |
| 121 | |
| 122 | { |
| 123 | int edgeId = 0; |
| 124 | int currentCellId = 0; |
| 125 | int i; |
| 126 | int numEdges; |
| 127 | vtkIdType tp1, tp2; |
| 128 | vtkCell* cell; |
| 129 | |
| 130 | // get all the cells that use the edge (except for cellId) |
| 131 | mesh->GetCellEdgeNeighbors(cellId, p1, p2, cellIds); |
| 132 | |
| 133 | // find the edge that has the point we are looking for |
| 134 | for (i = 0; i < cellIds->GetNumberOfIds(); i++) |
| 135 | { |
| 136 | currentCellId = cellIds->GetId(i); |
| 137 | cell = mesh->GetCell(currentCellId); |
| 138 | numEdges = cell->GetNumberOfEdges(); |
| 139 | tp1 = cell->GetPointId(2); |
| 140 | tp2 = cell->GetPointId(0); |
| 141 | for (edgeId = 0; edgeId < numEdges; edgeId++) |
| 142 | { |
| 143 | if ((tp1 == p1 && tp2 == p2) || (tp2 == p1 && tp1 == p2)) |
| 144 | { |
| 145 | // found the edge, return the stored value |
| 146 | return (int)edgeData->GetComponent(currentCellId, edgeId); |
| 147 | } |
| 148 | tp1 = tp2; |
| 149 | tp2 = cell->GetPointId(edgeId + 1); |
| 150 | } |
| 151 | } |
| 152 | vtkErrorMacro("Edge should have been found... but couldn't find it!!"); |
| 153 | return 0; |
| 154 | } |
| 155 | |
| 156 | vtkIdType vtkInterpolatingSubdivisionFilter::InterpolatePosition( |
| 157 | vtkPoints* inputPts, vtkPoints* outputPts, vtkIdList* stencil, double* weights) |
nothing calls this directly
no test coverage detected