https://github.com/root-project/root
Revision bd13c26481b2e4cbbc783eee6cf30dcd9c47cf47 authored by Sergey Linev on 18 June 2015, 07:45:21 UTC, committed by Bertrand Bellenot on 18 June 2015, 13:25:00 UTC
Signed-off-by: Bertrand Bellenot <bertrand.bellenot@cern.ch>
1 parent d7e6577
Raw File
Tip revision: bd13c26481b2e4cbbc783eee6cf30dcd9c47cf47 authored by Sergey Linev on 18 June 2015, 07:45:21 UTC
jsroot: change date tag in version string
Tip revision: bd13c26
geom_alias.C
// @(#)root/eve:$Id$
// Author: Matevz Tadel

// Demonstates usage of geometry aliases - merge ALICE ITS with ATLAS MUON.

void geom_alias()
{
   TEveManager::Create();

   gEve->RegisterGeometryAlias("ALICE", "http://root.cern.ch/files/alice.root");
   gEve->RegisterGeometryAlias("ATLAS", "http://root.cern.ch/files/atlas.root");


   gGeoManager = gEve->GetGeometryByAlias("ALICE");

   TGeoNode* node1 = gGeoManager->GetTopVolume()->FindNode("ITSV_1");
   TEveGeoTopNode* its = new TEveGeoTopNode(gGeoManager, node1);
   gEve->AddGlobalElement(its);


   gGeoManager = gEve->GetGeometryByAlias("ATLAS");

   TGeoNode* node2 = gGeoManager->GetTopVolume()->FindNode("OUTE_1");
   TEveGeoTopNode* atlas = new TEveGeoTopNode(gGeoManager, node2);
   gEve->AddGlobalElement(atlas);


   gEve->FullRedraw3D(kTRUE);

   // EClipType not exported to CINT (see TGLUtil.h):
   // 0 - no clip, 1 - clip plane, 2 - clip box
   TGLViewer *v = gEve->GetDefaultGLViewer();
   v->GetClipSet()->SetClipType(2);
   v->RefreshPadEditor(v);

   v->CurrentCamera().RotateRad(-0.5, -2.4);
   v->DoDraw();
}
back to top