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

Method ExecuteCameraUpdateEvent

Interaction/Widgets/vtkOrientationMarkerWidget.cxx:332–354  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

330
331//------------------------------------------------------------------------------
332void vtkOrientationMarkerWidget::ExecuteCameraUpdateEvent(
333 vtkObject* vtkNotUsed(o), unsigned long vtkNotUsed(event), void* vtkNotUsed(calldata))
334{
335 if (!this->CurrentRenderer)
336 {
337 return;
338 }
339
340 vtkCamera* cam = this->CurrentRenderer->GetActiveCamera();
341 double pos[3], fp[3], viewup[3];
342 cam->GetPosition(pos);
343 cam->GetFocalPoint(fp);
344 cam->GetViewUp(viewup);
345
346 cam = this->Renderer->GetActiveCamera();
347 cam->SetPosition(pos);
348 cam->SetFocalPoint(fp);
349 cam->SetViewUp(viewup);
350 this->Renderer->ResetCamera();
351 cam->Zoom(this->Zoom);
352
353 this->UpdateOutline();
354}
355
356//------------------------------------------------------------------------------
357int vtkOrientationMarkerWidget::ComputeStateBasedOnPosition(int X, int Y, int* pos1, int* pos2)

Callers 1

ExecuteMethod · 0.80

Calls 9

UpdateOutlineMethod · 0.95
GetActiveCameraMethod · 0.80
GetViewUpMethod · 0.80
SetViewUpMethod · 0.80
GetPositionMethod · 0.45
SetPositionMethod · 0.45
SetFocalPointMethod · 0.45
ResetCameraMethod · 0.45
ZoomMethod · 0.45

Tested by

no test coverage detected