Prevent selection of geometry objects in Eve

In my Eve based event display I would like to arrange it so that geometry objects are not selected when picking them so that “event” objects can be selected even when they are covered by geometrical objects ( i.e. parts of the detector)

I tried:

calling ExpandIntoListTreesRecursively();

and
SetPickable(kFALSE) recursively on all items in the geometry starting from the TEveGeoTopNode object.

This does not have any effect.

Any ideas anyone?

Hi,

SetPickable() should work, there is also TEveElement::SetPickableRecursively() … hmmh, unless this is a TGeo geometry imported via TEveGeoTopNode? But then selection should not work at all … I’m somewhat puzzled.

Anyway, the best way to prevent a subset of objects from being selected is to:

  1. put them into a separate scene
  2. call eve_scene->GetGLScene()->SetSelctable(kFALSE);
    and also add the scene to the viewer for rendering.

Ah, now I see what you mean … the geometry objects are opaque an dpicking doesn’t “penetrate them” … the scene method will also work in this case. However, SetPickable(kFALSE) would also work if the geometry objects are slightly transparent, geom_el->SetMainTransparency(1).

Best,
Matevz

Hi Matevz,
This worked:

gEve->GetGlobalScene()->GetGLScene()->SetSelectable(kFALSE);

thanks!

Alex