------------------------------------------------------------------------------
| 441 | |
| 442 | //------------------------------------------------------------------------------ |
| 443 | void vtkCameraPathRepresentation::InitializeHandles(vtkPoints* points) |
| 444 | { |
| 445 | if (!points) |
| 446 | { |
| 447 | vtkErrorMacro(<< "ERROR: Invalid or nullptr points\n"); |
| 448 | return; |
| 449 | } |
| 450 | |
| 451 | int npts = points->GetNumberOfPoints(); |
| 452 | if (npts < 2) |
| 453 | { |
| 454 | return; |
| 455 | } |
| 456 | |
| 457 | double p0[3]; |
| 458 | double p1[3]; |
| 459 | |
| 460 | points->GetPoint(0, p0); |
| 461 | points->GetPoint(npts - 1, p1); |
| 462 | |
| 463 | if (vtkMath::Distance2BetweenPoints(p0, p1) == 0.0) |
| 464 | { |
| 465 | --npts; |
| 466 | this->Closed = 1; |
| 467 | this->ParametricSpline->ClosedOn(); |
| 468 | } |
| 469 | |
| 470 | this->SetNumberOfHandles(npts); |
| 471 | for (int i = 0; i < npts; ++i) |
| 472 | { |
| 473 | this->SetHandlePosition(i, points->GetPoint(i)); |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | //------------------------------------------------------------------------------ |
| 478 | void vtkCameraPathRepresentation::SizeHandles() |
nothing calls this directly
no test coverage detected