------------------------------------------------------------------------------
| 303 | |
| 304 | //------------------------------------------------------------------------------ |
| 305 | void vtkTupleInterpolator::InterpolateTuple(double t, double tuple[]) |
| 306 | { |
| 307 | if (this->NumberOfComponents <= 0) |
| 308 | { |
| 309 | return; |
| 310 | } |
| 311 | |
| 312 | int i; |
| 313 | if (this->InterpolationType == INTERPOLATION_TYPE_LINEAR) |
| 314 | { |
| 315 | double* range = this->Linear[0]->GetRange(); |
| 316 | t = std::clamp(t, range[0], range[1]); |
| 317 | for (i = 0; i < this->NumberOfComponents; i++) |
| 318 | { |
| 319 | tuple[i] = this->Linear[i]->GetValue(t); |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | else // this->InterpolationType == INTERPOLATION_TYPE_SPLINE |
| 324 | { |
| 325 | for (i = 0; i < this->NumberOfComponents; i++) |
| 326 | { |
| 327 | tuple[i] = this->Spline[i]->Evaluate(t); |
| 328 | } |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | //------------------------------------------------------------------------------ |
| 333 | void vtkTupleInterpolator::PrintSelf(ostream& os, vtkIndent indent) |