I am looking at some VTK code that may not work correctly. Here is a snippet:
vtkSmartPointer<vtkCamera> cam = vtkSmartPointer<vtkCamera>::New();
cam->SetFocalPoint(0, 0, 0);
cam->SetViewUp(perp[0], perp[1], perp[2]);
cam->SetPosition(first_cam_pos);
cam->SetViewAngle(20);
cam->Modified();
It seems to me that the call is Modified()not needed, so that the call to the four Set functions should automatically signal that the camera has been changed.
In fact, KitKKKK does not use the camera exampleModified() for the camera.
vtkSmartPointer<vtkCamera> camera = vtkSmartPointer<vtkCamera>::New();
camera->SetPosition(0, 0, 20);
camera->SetFocalPoint(0, 0, 0);
vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
renderer->SetActiveCamera(camera);
In other cases, the potentially inoperative VTK code I'm looking for uses Update()for manual updating - not for the camera object, but in another place. Again, I think this is probably not necessary; but clearly Update()and for Modified()some reason .
- , Modified() Update(), ? , , , ? ?
VTK 6.1, , - .