| 117 | } |
| 118 | |
| 119 | void vtkImplicitFunction::EvaluateFunction(vtkDataArray* input, vtkDataArray* output) |
| 120 | { |
| 121 | // defend against uninitialized output datasets. |
| 122 | output->SetNumberOfComponents(1); |
| 123 | output->SetNumberOfTuples(input->GetNumberOfTuples()); |
| 124 | |
| 125 | FunctionWorker<SimpleFunction> worker(SimpleFunction(this)); |
| 126 | using Dispatcher = vtkArrayDispatch::Dispatch2ByArray<vtkArrayDispatch::AllPointArrays, |
| 127 | vtkArrayDispatch::AOSPointArrays>; |
| 128 | if (!Dispatcher::Execute(input, output, worker)) |
| 129 | { |
| 130 | worker(input, output); // Use vtkDataArray API if dispatch fails. |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // Evaluate function at position x-y-z and return value. Point x[3] is |
| 135 | // transformed through transform (if provided). |
no test coverage detected