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

Method RecursiveHasTranslucentGeometry

Rendering/Core/vtkCompositeCellGridMapper.cxx:591–724  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

589
590//------------------------------------------------------------------------------
591bool vtkCompositeCellGridMapper::RecursiveHasTranslucentGeometry(
592 vtkDataObject* dobj, unsigned int& flat_index)
593{
594 vtkCompositeDataDisplayAttributes* cda = this->GetCompositeDataDisplayAttributes();
595 bool overrides_opacity = (cda && cda->HasBlockOpacity(dobj));
596 if (overrides_opacity)
597 {
598 if (cda->GetBlockOpacity(dobj) < 1.0)
599 {
600 return true;
601 }
602 }
603
604 // Advance flat-index. After this point, flat_index no longer points to this
605 // block.
606 flat_index++;
607
608 if (auto dObjTree = vtkDataObjectTree::SafeDownCast(dobj))
609 {
610 using Opts = vtk::DataObjectTreeOptions;
611 for (vtkDataObject* child : vtk::Range(dObjTree, Opts::None))
612 {
613 if (!child)
614 {
615 ++flat_index;
616 }
617 else
618 {
619 if (this->RecursiveHasTranslucentGeometry(child, flat_index))
620 {
621 return true;
622 }
623 }
624 }
625 return false;
626 }
627 else
628 {
629 bool overrides_visibility = (cda && cda->HasBlockVisibility(dobj));
630 if (overrides_visibility)
631 {
632 if (!cda->GetBlockVisibility(dobj))
633 {
634 return false;
635 }
636 }
637 int scalarMode = this->ScalarMode;
638 int arrayAccessMode = this->ArrayAccessMode;
639 int arrayComponent = this->ArrayComponent;
640 int arrayId = this->ArrayId;
641 std::string arrayName = this->ArrayName;
642 bool scalarVisibility = this->ScalarVisibility;
643 int colorMode = this->ColorMode;
644 vtkScalarsToColors* lut = this->GetLookupTable();
645 (void)scalarMode;
646 (void)arrayAccessMode;
647 (void)arrayComponent;
648 (void)arrayId;

Callers 1

Calls 15

HasBlockArrayIdMethod · 0.80
HasBlockArrayNameMethod · 0.80
HasBlockColorModeMethod · 0.80
GetBlockColorModeMethod · 0.80
HasBlockLookupTableMethod · 0.80
GetBlockLookupTableMethod · 0.80
RangeFunction · 0.50

Tested by

no test coverage detected