本文整理汇总了C++中TGeoVolume::FindNode方法的典型用法代码示例。如果您正苦于以下问题:C++ TGeoVolume::FindNode方法的具体用法?C++ TGeoVolume::FindNode怎么用?C++ TGeoVolume::FindNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGeoVolume
的用法示例。
在下文中一共展示了TGeoVolume::FindNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: geom_cms
void geom_cms()
{
TEveManager::Create();
TFile::SetCacheFileDir(".");
gGeoManager = gEve->GetGeometry("http://root.cern.ch/files/cms.root");
gGeoManager->DefaultColors();
TGeoVolume* top = gGeoManager->GetTopVolume()->FindNode("CMSE_1")->GetVolume();
TEveGeoTopNode* trk = new TEveGeoTopNode(gGeoManager, top->FindNode("TRAK_1"));
trk->SetVisLevel(6);
gEve->AddGlobalElement(trk);
TEveGeoTopNode* calo = new TEveGeoTopNode(gGeoManager, top->FindNode("CALO_1"));
calo->SetVisLevel(3);
gEve->AddGlobalElement(calo);
TEveGeoTopNode* muon = new TEveGeoTopNode(gGeoManager, top->FindNode("MUON_1"));
muon->SetVisLevel(4);
gEve->AddGlobalElement(muon);
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(TGLClip::EType(1));
v->ColorSet().Background().SetColor(kMagenta+4);
v->SetGuideState(TGLUtil::kAxesEdge, kTRUE, kFALSE, 0);
v->RefreshPadEditor(v);
v->CurrentCamera().RotateRad(-1.2, 0.5);
v->DoDraw();
}
示例2: geom_cms_stereo
void geom_cms_stereo()
{
TEveManager::Create();
TFile::SetCacheFileDir(".");
gGeoManager = gEve->GetGeometry("http://root.cern.ch/files/cms.root");
gGeoManager->DefaultColors();
TGeoVolume* top = gGeoManager->GetTopVolume()->FindNode("CMSE_1")->GetVolume();
TEveGeoTopNode* trk = new TEveGeoTopNode(gGeoManager, top->FindNode("TRAK_1"));
trk->SetVisLevel(6);
gEve->AddGlobalElement(trk);
TEveGeoTopNode* calo = new TEveGeoTopNode(gGeoManager, top->FindNode("CALO_1"));
calo->SetVisLevel(3);
gEve->AddGlobalElement(calo);
TEveGeoTopNode* muon = new TEveGeoTopNode(gGeoManager, top->FindNode("MUON_1"));
muon->SetVisLevel(4);
gEve->AddGlobalElement(muon);
// --- Stereo ---
TEveWindowSlot* slot = 0;
slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
TEveViewer* sv = new TEveViewer("Stereo GL", "Stereoscopic view");
sv->SpawnGLViewer(gEve->GetEditor(), kTRUE);
sv->AddScene(gEve->GetGlobalScene());
slot->ReplaceWindow(sv);
gEve->GetViewers()->AddElement(sv);
gEve->GetBrowser()->GetTabRight()->SetTab(1);
// --- Redraw ---
gEve->FullRedraw3D(kTRUE);
gEve->EditElement(sv);
// --- Fix editor ---
// EClipType not exported to CINT (see TGLUtil.h):
// 0 - no clip, 1 - clip plane, 2 - clip box
TGLViewer *v = gEve->GetDefaultGLViewer();
v->GetClipSet()->SetClipType(TGLClip::EType(1));
v->ColorSet().Background().SetColor(kMagenta+4);
v->SetGuideState(TGLUtil::kAxesEdge, kTRUE, kFALSE, 0);
v->RefreshPadEditor(v);
v->CurrentCamera().RotateRad(-1.2, 0.5);
v->DoDraw();
}