I am trying to use TEve as an event-display. I’ve stumbled over the following problems:
What I want to do finally is, I’d like to draw subdetectors which are “extruded” polygons or circles outside and/or inside. Where I want to be able to change the number of edges of the polygon.
For pure cylinders it’s easy, there is the MakeTube functionality in TGeoManager. For the polygonal shape I found the TGeoXtru shape. To start with I created an TGeoExtru and display this with the TEveManager (code is attached, myGeoEve.C). Interestingly, the planes of the extruded volume are only drawn if one looks at them “from the outside”, not if one looks at them from the inside (missing_edges.png). I tried to overcome this by defining 5 sections for the TGeoXtru instead of only two where I basically extrude into one direction first, and then with a slightly smaller scaling factor I’m extruding backwards again (can be seen by commenting in the additional xtru->DefineSection commands).
When doing this I get some strange visibility effects in my “full geometry” (see red_part_visible.png and red_part_strangely_hidden.png), … they show the same geometry with just a slight change of the camera position.
What do I do wrong?
An additional question: I’d like to be able to turn on and off the different parts of the detector from the menu in TEveManager. How can I make the TEveManager aware of the different subdetectors I have drawn with the TGeoManager?
I found the bug, … I “closed” the polygon (last vertex== first vertex). This caused this error.
But I am still interested in solving the last question of how to make TEveManager aware of the different subdetectors I have drawn with the TGeoManager.
The reason why things disappear is that we only draw front facing polygons in GL. I think TGeoXtru should actually be closed and the “endcap” disks should be drawn.
Maybe Andrei can advise you a different shape to use.
How about composing you shape for a set of TGeoBBox-es?
To view components, double-click on Scenes, then open Geometry-scene … there you’ll see representation of your objects.