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

Method RecursiveHasTranslucentGeometry

Rendering/Core/vtkCompositePolyDataMapper.cxx:838–962  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

836
837//------------------------------------------------------------------------------
838bool 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 {

Callers 1

Calls 15

GetGhostArrayFunction · 0.85
HasBlockArrayIdMethod · 0.80
HasBlockArrayNameMethod · 0.80
HasBlockColorModeMethod · 0.80
GetBlockColorModeMethod · 0.80
HasBlockLookupTableMethod · 0.80
GetBlockLookupTableMethod · 0.80

Tested by

no test coverage detected