Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches

Detailed Description

Demonstrates usage of EVE compound objects - class TEveCompound.

#include "TRandom.h"
namespace REX = ROOT::Experimental;
{
auto line = new REX::REveLine;
line->SetMainColor(kGreen);
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()
{
// disable browser cache - all scripts and html files will be loaded every time, useful for development
// gEnv->SetValue("WebGui.HttpMaxAge", 0);
auto eveMng = REX::REveManager::Create();
/*
auto* ml = random_line(rnd, 20, 10);
ml->SetMainColor(kRed);
ml->SetLineStyle(kDashed);
ml->SetLineWidth(3);
eveMng->InsertVizDBEntry("BigLine", ml);
*/
auto cmp = new REX::REveCompound;
cmp->OpenCompound();
cmp->AddElement(random_line(rnd, 20, 10));
cmp->AddElement(random_line(rnd, 20, 10));
auto line = random_line(rnd, 20, 12);
line->SetMainColor(kRed);
// line->ApplyVizTag("BigLine");
cmp->AddElement(line);
cmp->CloseCompound();
eveMng->GetEventScene()->AddElement(cmp);
eveMng->Show();
}
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:72
@ kRed
Definition Rtypes.h:67
@ kGreen
Definition Rtypes.h:67
@ kDashed
Definition TAttLine.h:54
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void SetMainColor(Color_t color) override
SetMainColor for the compound.
REveLine An arbitrary polyline with fixed line and marker attributes.
Definition REveLine.hxx:30
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition TAttLine.h:46
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:47
This is the base class for the ROOT Random number generators.
Definition TRandom.h:28
TLine * line
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
std::string compound(const std::string &name)
Namespace for ROOT features in testing.
Definition TROOT.h:100
Author
Matevz Tadel

Definition in file compound.C.