Logo ROOT   6.08/07
Reference Guide
hierarchical_scene.C File Reference

Detailed Description

eve_hierarchical_scene.png
const Int_t Ns = 7;
void add_blobs(TEveElement* p, Float_t rad, Float_t height, Float_t size,
Int_t level)
{
if (level <= 0) return;
for (Int_t i = 0; i < Ns; ++i)
{
TEveGeoShape* x = new TEveGeoShape("SS");
x->SetShape(new TGeoSphere(0, size));
Double_t phi = TMath::TwoPi() * i / Ns;
rad*TMath::Sin(phi),
height);
p->AddElement(x);
add_blobs(x, 0.8 * rad, 0.8 * height, 0.8 * size, level - 1);
}
}
void hierarchical_scene()
{
gRandom = new TRandom3(0);
TEveScene *s = gEve->SpawnNewScene("Hierachical Scene", "OoogaDooga");
add_blobs(s, 6, 4, 0.5, 4);
}
Author
Matevz Tadel

Definition in file hierarchical_scene.C.