Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
geom_lhcb.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve
3 /// Shows LHCB geometry.
4 ///
5 /// \image html eve_geom_lhcb.png
6 /// \macro_code
7 ///
8 /// \author Matevz Tadel
9 
10 void geom_lhcb()
11 {
12  TEveManager::Create();
13 
14  TFile::SetCacheFileDir(".");
15  gGeoManager = gEve->GetGeometry("http://root.cern.ch/files/lhcbfull.root");
16  gGeoManager->DefaultColors();
17 
18  auto tn = new TEveGeoTopNode(gGeoManager, gGeoManager->GetTopNode());
19  tn->SetVisLevel(4);
20  gEve->AddGlobalElement(tn);
21 
22  gEve->FullRedraw3D(kTRUE);
23 
24  // EClipType not exported to CINT (see TGLUtil.h):
25  // 0 - no clip, 1 - clip plane, 2 - clip box
26  auto v = gEve->GetDefaultGLViewer();
27  v->GetClipSet()->SetClipType(TGLClip::EType(1));
28  v->ColorSet().Background().SetColor(kMagenta+4);
29  v->SetGuideState(TGLUtil::kAxesEdge, kTRUE, kFALSE, 0);
30  v->RefreshPadEditor(v);
31 
32  v->CurrentCamera().RotateRad(-1.2, 0.5);
33  v->DoDraw();
34 }