------------------------------------------------------------------------------
| 716 | |
| 717 | //------------------------------------------------------------------------------ |
| 718 | void 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 | //------------------------------------------------------------------------------ |
| 753 | void vtkParallelRenderManager::ResetCameraClippingRange(vtkRenderer* ren) |