19 ClassImp(TEveCompound);
24 TEveCompound::TEveCompound(
const char* n,
const char* t, Bool_t doColor, Bool_t doTransparency) :
25 TEveElementList (n, t, doColor, doTransparency),
40 void TEveCompound::SetMainColor(Color_t color)
42 Color_t old_color = GetMainColor();
44 TEveElement::SetMainColor(color);
46 Bool_t color_all = TestCSCBits(kCSCBApplyMainColorToAllChildren);
47 Bool_t color_matching = TestCSCBits(kCSCBApplyMainColorToMatchingChildren);
49 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
51 if (color_all || (color_matching && (*i)->GetMainColor() == old_color) ||
52 ((*i)->GetCompound() ==
this && (*i)->GetMainColor() == old_color))
54 (*i)->SetMainColor(color);
69 void TEveCompound::SetMainTransparency(Char_t t)
71 Char_t old_t = GetMainTransparency();
73 TEveElement::SetMainTransparency(t);
75 Bool_t chg_all = TestCSCBits(kCSCBApplyMainTransparencyToAllChildren);
76 Bool_t chg_matching = TestCSCBits(kCSCBApplyMainTransparencyToMatchingChildren);
78 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
80 if (chg_all || (chg_matching && (*i)->GetMainTransparency() == old_t) ||
81 ((*i)->GetCompound() ==
this && (*i)->GetMainTransparency() == old_t))
83 (*i)->SetMainTransparency(t);
94 void TEveCompound::AddElement(TEveElement* el)
96 TEveElementList::AddElement(el);
97 if (IsCompoundOpen() && el->GetCompound() == 0)
98 el->SetCompound(
this);
104 void TEveCompound::RemoveElementLocal(TEveElement* el)
106 if (el->GetCompound() ==
this)
109 TEveElementList::RemoveElementLocal(el);
115 void TEveCompound::RemoveElementsLocal()
117 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
119 if ((*i)->GetCompound() ==
this)
120 (*i)->SetCompound(0);
123 TEveElementList::RemoveElementsLocal();
135 void TEveCompound::FillImpliedSelectedSet(Set_t& impSelSet)
137 Bool_t select_all = TestCSCBits(kCSCBImplySelectAllChildren);
139 for (List_i i = fChildren.begin(); i != fChildren.end(); ++i)
141 if (select_all || (*i)->GetCompound() ==
this)
143 if (impSelSet.insert(*i).second)
144 (*i)->FillImpliedSelectedSet(impSelSet);
148 TEveElementList::FillImpliedSelectedSet(impSelSet);
154 TClass* TEveCompound::ProjectedClass(
const TEveProjection*)
const
156 return TEveCompoundProjected::Class();
165 ClassImp(TEveCompoundProjected);
170 TEveCompoundProjected::TEveCompoundProjected() :
183 void TEveCompoundProjected::SetMainColor(Color_t color)
185 TEveElement::SetMainColor(color);