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

Method ResetCamera

Rendering/Parallel/vtkParallelRenderManager.cxx:718–750  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

716
717//------------------------------------------------------------------------------
718void vtkParallelRenderManager::ResetCamera(vtkRenderer* ren)
719{
720 vtkDebugMacro("ResetCamera");
721
722 double bounds[6];
723
724 if (this->Lock)
725 {
726 // Can't query other processes in the middle of a render.
727 // Just grab local value instead.
728 this->LocalComputeVisiblePropBounds(ren, bounds);
729 ren->ResetCamera(bounds);
730 return;
731 }
732
733 this->Lock = 1;
734
735 this->ComputeVisiblePropBounds(ren, bounds);
736 // Keep from setting camera from some outrageous value.
737 if (!vtkMath::AreBoundsInitialized(bounds))
738 {
739 // See if the not pickable values are better.
740 ren->ComputeVisiblePropBounds(bounds);
741 if (!vtkMath::AreBoundsInitialized(bounds))
742 {
743 this->Lock = 0;
744 return;
745 }
746 }
747 ren->ResetCamera(bounds);
748
749 this->Lock = 0;
750}
751
752//------------------------------------------------------------------------------
753void vtkParallelRenderManager::ResetCameraClippingRange(vtkRenderer* ren)

Callers 4

StartRenderMethod · 0.95
ResetAllCamerasMethod · 0.95
ExecuteMethod · 0.45
CreatePipelineMethod · 0.45

Calls 3

AreBoundsInitializedFunction · 0.85

Tested by 2

ExecuteMethod · 0.36
CreatePipelineMethod · 0.36