------------------------------------------------------------------------------
| 193 | |
| 194 | //------------------------------------------------------------------------------ |
| 195 | bool vtkAMRResampleFilter::FoundDonor(double q[3], vtkUniformGrid*& donorGrid, int& cellIdx) |
| 196 | { |
| 197 | assert("pre: donor grid is nullptr" && (donorGrid != nullptr)); |
| 198 | double gbounds[6]; |
| 199 | // Lets do a trivial spatial check |
| 200 | this->NumberOfBlocksTested++; |
| 201 | donorGrid->GetBounds(gbounds); |
| 202 | if ((q[0] < gbounds[0]) || (q[0] > gbounds[1]) || (q[1] < gbounds[2]) || (q[1] > gbounds[3]) || |
| 203 | (q[2] < gbounds[4]) || (q[2] > gbounds[5])) |
| 204 | { |
| 205 | return false; |
| 206 | } |
| 207 | int ijk[3]; |
| 208 | double pcoords[3]; |
| 209 | int status = donorGrid->ComputeStructuredCoordinates(q, ijk, pcoords); |
| 210 | if (status == 1) |
| 211 | { |
| 212 | cellIdx = vtkStructuredData::ComputeCellId(donorGrid->GetDimensions(), ijk); |
| 213 | return true; |
| 214 | } |
| 215 | return false; |
| 216 | } |
| 217 | |
| 218 | //------------------------------------------------------------------------------ |
| 219 | void vtkAMRResampleFilter::InitializeFields(vtkFieldData* f, vtkIdType size, vtkCellData* src) |
no test coverage detected