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

Method InsertCamera

Interaction/Widgets/vtkCameraPathRepresentation.cxx:98–119  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

96
97//------------------------------------------------------------------------------
98void vtkCameraPathRepresentation::InsertCamera(vtkCamera* camera, int index)
99{
100 if (index < 0 || (size_t)index > this->CameraHandles.size() || camera == nullptr)
101 {
102 vtkErrorMacro(<< "ERROR: Invalid index or nullptr camera\n");
103 return;
104 }
105
106 vtkSmartPointer<vtkCameraHandleSource> camHandle = vtkSmartPointer<vtkCameraHandleSource>::New();
107 camHandle->SetDirectional(this->Directional);
108 camHandle->SetCamera(camera);
109 this->CameraHandles.insert(this->CameraHandles.begin() + index, camHandle);
110
111 vtkSmartPointer<vtkActor> handleActor = vtkSmartPointer<vtkActor>::New();
112 this->HandleActors.insert(this->HandleActors.begin() + index, handleActor);
113
114 vtkNew<vtkPolyDataMapper> handleMapper;
115 handleMapper->SetInputConnection(camHandle->GetOutputPort());
116 handleActor->SetMapper(handleMapper);
117 handleActor->SetProperty(this->HandleProperty);
118 this->HandlePicker->AddPickList(handleActor);
119}
120
121//------------------------------------------------------------------------------
122void vtkCameraPathRepresentation::DeleteCameraAt(int index)

Callers 3

AddCameraAtMethod · 0.95
CreateDefaultHandlesMethod · 0.95
ReconfigureHandlesMethod · 0.95

Calls 11

NewFunction · 0.50
sizeMethod · 0.45
SetDirectionalMethod · 0.45
SetCameraMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45
SetMapperMethod · 0.45
SetPropertyMethod · 0.45
AddPickListMethod · 0.45

Tested by

no test coverage detected