TGeo classes changing colors + OpenGL questions

From: Diego Faso <faso_at_to.infn.it>
Date: Thu, 20 Jul 2006 11:46:06 +0200 (MET DST)


Hi, I'm using the root-geometry and I need to change the color of some geometric elements. I will refer to the attached example (geom_example.C): I define a volume (CONE) and I use it to build two nodes under the top volume, then when I run the geom_example.C macro I see two separated cones. Now I need to change the color for one cone only and I don't know how to do it. I tried with the following commands:

> gGeoManager->GetTopVolume()->GetNode(0)->GetVolume()->SetLineColor(3)

but the color is changed for both nodes.

Concerning OpenGL I have two questions:
1) is there a way to update the OpenGL view? The only solution I've found

   until now is to re-call "gGeoManager->Draw("ogl")"

2) When I draw a TPolyMarker3D I obtain the expected result in the "c1"

   canvas, but not in the "ROOT's GL viewer": marker style and marker size    seem not to be respected by the "ROOT's GL viewer". This the way I use    to add the polymarker to the geometry shown by my "geom_example.C"    macro:

> TPolyMarker3D *pol = new TPolyMarker3D()
> pol->SetPoint(0,1,1,1)
> pol->SetMarkerStyle(4)
> pol->SetMarkerColor(2)
> pol->Draw()

By the way, is "TPolyMarker3D" the best solution to display points in this case?

Thank you in advance.
Regards
Diego



Here is my system configuration:
OS: Gentoo Base System version 1.6.15
kernel: 2.6.16-gentoo-r9
gcc: version 3.4.6
root version: 5.11/07

Received on Thu Jul 20 2006 - 11:46:15 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET