| 723 | } |
| 724 | |
| 725 | void mitk::BaseRenderer::SetCurrentWorldGeometry(const mitk::BaseGeometry* geometry) |
| 726 | { |
| 727 | if (m_CurrentWorldGeometry == geometry) |
| 728 | { |
| 729 | return; |
| 730 | } |
| 731 | |
| 732 | m_CurrentWorldGeometry = geometry; |
| 733 | if (geometry == nullptr) |
| 734 | { |
| 735 | m_Bounds[0] = 0; |
| 736 | m_Bounds[1] = 0; |
| 737 | m_Bounds[2] = 0; |
| 738 | m_Bounds[3] = 0; |
| 739 | m_Bounds[4] = 0; |
| 740 | m_Bounds[5] = 0; |
| 741 | m_EmptyWorldGeometry = true; |
| 742 | return; |
| 743 | } |
| 744 | |
| 745 | BoundingBox::Pointer boundingBox = m_CurrentWorldGeometry->CalculateBoundingBoxRelativeToTransform(nullptr); |
| 746 | const BoundingBox::BoundsArrayType& worldBounds = boundingBox->GetBounds(); |
| 747 | m_Bounds[0] = worldBounds[0]; |
| 748 | m_Bounds[1] = worldBounds[1]; |
| 749 | m_Bounds[2] = worldBounds[2]; |
| 750 | m_Bounds[3] = worldBounds[3]; |
| 751 | m_Bounds[4] = worldBounds[4]; |
| 752 | m_Bounds[5] = worldBounds[5]; |
| 753 | |
| 754 | if (boundingBox->GetDiagonalLength2() <= mitk::eps) |
| 755 | { |
| 756 | m_EmptyWorldGeometry = true; |
| 757 | } |
| 758 | else |
| 759 | { |
| 760 | m_EmptyWorldGeometry = false; |
| 761 | } |
| 762 | } |
| 763 | |
| 764 | void mitk::BaseRenderer::PrintSelf(std::ostream &os, itk::Indent indent) const |
| 765 | { |
nothing calls this directly
no test coverage detected