------------------------------------------------------------------------------
| 836 | |
| 837 | //------------------------------------------------------------------------------ |
| 838 | bool vtkCompositePolyDataMapper::RecursiveHasTranslucentGeometry( |
| 839 | vtkDataObject* dobj, unsigned int& flat_index) |
| 840 | { |
| 841 | vtkCompositeDataDisplayAttributes* cda = this->GetCompositeDataDisplayAttributes(); |
| 842 | bool overrides_opacity = (cda && cda->HasBlockOpacity(dobj)); |
| 843 | if (overrides_opacity) |
| 844 | { |
| 845 | if (cda->GetBlockOpacity(dobj) < 1.0) |
| 846 | { |
| 847 | return true; |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | // Advance flat-index. After this point, flat_index no longer points to this |
| 852 | // block. |
| 853 | flat_index++; |
| 854 | |
| 855 | if (auto dObjTree = vtkDataObjectTree::SafeDownCast(dobj)) |
| 856 | { |
| 857 | using Opts = vtk::DataObjectTreeOptions; |
| 858 | for (vtkDataObject* child : vtk::Range(dObjTree, Opts::None)) |
| 859 | { |
| 860 | if (!child) |
| 861 | { |
| 862 | ++flat_index; |
| 863 | } |
| 864 | else |
| 865 | { |
| 866 | if (this->RecursiveHasTranslucentGeometry(child, flat_index)) |
| 867 | { |
| 868 | return true; |
| 869 | } |
| 870 | } |
| 871 | } |
| 872 | return false; |
| 873 | } |
| 874 | else |
| 875 | { |
| 876 | bool overrides_visibility = (cda && cda->HasBlockVisibility(dobj)); |
| 877 | if (overrides_visibility) |
| 878 | { |
| 879 | if (!cda->GetBlockVisibility(dobj)) |
| 880 | { |
| 881 | return false; |
| 882 | } |
| 883 | } |
| 884 | int scalarMode = this->ScalarMode; |
| 885 | int arrayAccessMode = this->ArrayAccessMode; |
| 886 | int arrayComponent = this->ArrayComponent; |
| 887 | int arrayId = this->ArrayId; |
| 888 | std::string arrayName = this->ArrayName; |
| 889 | bool scalarVisibility = this->ScalarVisibility; |
| 890 | int colorMode = this->ColorMode; |
| 891 | vtkScalarsToColors* lut = this->GetLookupTable(); |
| 892 | |
| 893 | bool overrides_scalar_mode = (cda && cda->HasBlockArrayAccessMode(dobj)); |
| 894 | if (overrides_scalar_mode) |
| 895 | { |
no test coverage detected