MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateConfiguration

Method UpdateConfiguration

Interaction/Widgets/vtkCameraPathRepresentation.cxx:312–349  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

310
311//------------------------------------------------------------------------------
312void 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//------------------------------------------------------------------------------
352int vtkCameraPathRepresentation::InsertHandleOnLine(double* pos)

Callers 2

AddCameraAtMethod · 0.95
DeleteCameraAtMethod · 0.95

Calls 9

RebuildRepresentationMethod · 0.95
CleanRepresentationMethod · 0.80
HighlightHandleMethod · 0.45
SetDataTypeMethod · 0.45
SetNumberOfPointsMethod · 0.45
SetPointsMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45

Tested by

no test coverage detected