Logo ROOT  
Reference Guide
No Matches
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
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
@ kRed
Definition Rtypes.h:66
@ kGreen
Definition Rtypes.h:66
R__EXTERN TEveManager * gEve
Description of TEveCompound.
void SetMainColor(Color_t color) override
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=nullptr)
Add an element.
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.
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=nullptr)
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
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.