------------------------------------------------------------------------------
| 310 | |
| 311 | //------------------------------------------------------------------------------ |
| 312 | void vtkCameraPathRepresentation::UpdateConfiguration(int npts) |
| 313 | { |
| 314 | if (this->NumberOfHandles == npts) |
| 315 | { |
| 316 | return; |
| 317 | } |
| 318 | |
| 319 | if (npts < 0) |
| 320 | { |
| 321 | return; |
| 322 | } |
| 323 | |
| 324 | if (npts == 0) |
| 325 | { |
| 326 | this->NumberOfHandles = 0; |
| 327 | this->CleanRepresentation(); |
| 328 | return; |
| 329 | } |
| 330 | |
| 331 | // Ensure no handle is highlighted |
| 332 | this->HighlightHandle(nullptr); |
| 333 | |
| 334 | // in case there was no spline before, reallocate it |
| 335 | if (!this->GetParametricSpline()) |
| 336 | { |
| 337 | vtkNew<vtkPoints> points; |
| 338 | points->SetDataType(VTK_DOUBLE); |
| 339 | points->SetNumberOfPoints(npts); |
| 340 | vtkNew<vtkParametricSpline> spline; |
| 341 | spline->SetPoints(points); |
| 342 | this->SetParametricSplineInternal(spline); |
| 343 | this->LineMapper->SetInputConnection(this->ParametricFunctionSource->GetOutputPort()); |
| 344 | } |
| 345 | |
| 346 | this->NumberOfHandles = npts; |
| 347 | |
| 348 | this->RebuildRepresentation(); |
| 349 | } |
| 350 | |
| 351 | //------------------------------------------------------------------------------ |
| 352 | int vtkCameraPathRepresentation::InsertHandleOnLine(double* pos) |
no test coverage detected