Logo ROOT  
Reference Guide
compound.C File Reference

Detailed Description

Demonstrates usage of EVE compound objects - class TEveCompound.

auto line = new TEveLine;
Float_t x = 0, y = 0, z = 0;
for (Int_t i=0; i<n; ++i) {
line->SetNextPoint(x, y, z);
x += rnd.Uniform(0, delta);
y += rnd.Uniform(0, delta);
z += rnd.Uniform(0, delta);
return line;
void compound()
auto ml = new TEveLine;
gEve->InsertVizDBEntry("BigLine", ml);
auto cmp = new TEveCompound;
TRandom rnd(0);
cmp->AddElement(random_line(rnd, 20, 10));
cmp->AddElement(random_line(rnd, 20, 10));
auto line = random_line(rnd, 20, 12);
// Projected view
auto viewer = gEve->SpawnNewViewer("Projected");
auto scene = gEve->SpawnNewScene("Projected Event");
auto v = viewer->GetGLViewer();
// projections
auto axes = new TEveProjectionAxes(mng);
int Int_t
Definition: RtypesCore.h:45
float Float_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:91
@ kRed
Definition: Rtypes.h:66
@ kGreen
Definition: Rtypes.h:66
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
Description of TEveCompound.
Definition: TEveCompound.h:24
virtual void SetMainColor(Color_t color)
SetMainColor for the compound.
virtual void SetMainColor(Color_t color)
Set main color of the element.
An arbitrary polyline with fixed line and marker attributes.
Definition: TEveLine.h:26
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=0)
Bool_t InsertVizDBEntry(const TString &tag, TEveElement *model, Bool_t replace, Bool_t update)
Insert a new visualization-parameter database entry.
TEveViewer * SpawnNewViewer(const char *name, const char *title="", Bool_t embed=kTRUE)
Create a new GL viewer.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Definition: TEveManager.h:168
TEveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
Axes for non-linear projections.
Manager class for steering of projections and managing projected objects.
@ kCameraOrthoXOY
Definition: TGLViewer.h:62
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Definition: TRandom.cxx:672
TLine * line
void compound()
Definition: compound.C:25
REX::REveLine * random_line(TRandom &rnd, Int_t n, Float_t delta)
Definition: compound.C:9
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16
Matevz Tadel

Definition in file compound.C.