TEve, gEve scene set visibility of objects


I create my detector with TGeo and add it with gEve->AddGlobalElement(…) to TEve.

In another function I’d like to turn off the visibility of the whole detector. How do I access it (the scene)?
I tried several things like for examaple:


… but so far I haven’t been able to find the right command.

then a comment/question:
From the detector I draw, I set some of the subdetectors (TGeoVolume) invisible right from the beginning with:


Indeed they are invisible afterwards and I can turn their visibility on and off when running TEve, but although they are invisible at startup of TEve, their respective checkbox in the object browser on the left hand side is checked. Do I have to call another command for turning on or off the checkboxes?


Hi Peter,

If you add it with gEve->AddGlobalElement(), than you should start with gEve->GetGlobalScene() … and then continue from there.

About the visibility … I changed the way how draw-state of TEveGeoNode is set so the list-tree should be ok now (after a call to gEve->Redraw3D()). These changes are in trunk now.

Note that visibility of a node is detemined both by the node and volume visibilities and that this can not be properly represented by a single check-box in Eve list tree. There are more controls in node-editor below.

Good luck :slight_smile:

Hi Matevz,

I searched for the method to set the visibility of the whole detector (scene), but I didn’t find the right one.
Could you tell me the full command? Thanks!


Hi Peter,

TEveScene is derived from TEveElement, so:
// To force redraw: