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

Detailed Description

Demonstrates usage of TEveBox class.

#include <ROOT/REveBox.hxx>
using namespace ROOT::Experimental;
REveBox *box(Float_t a = 10, Float_t d = 5, Float_t x = 0, Float_t y = 0, Float_t z = 0)
{
auto b = new REveBox;
b->SetMainColor(kCyan);
b->SetMainTransparency(0);
#define RND_BOX(x) r.Uniform(-(x), (x))
b->SetVertex(0, x - a + RND_BOX(d), y - a + RND_BOX(d), z - a + RND_BOX(d));
b->SetVertex(1, x - a + RND_BOX(d), y + a + RND_BOX(d), z - a + RND_BOX(d));
b->SetVertex(2, x + a + RND_BOX(d), y + a + RND_BOX(d), z - a + RND_BOX(d));
b->SetVertex(3, x + a + RND_BOX(d), y - a + RND_BOX(d), z - a + RND_BOX(d));
b->SetVertex(4, x - a + RND_BOX(d), y - a + RND_BOX(d), z + a + RND_BOX(d));
b->SetVertex(5, x - a + RND_BOX(d), y + a + RND_BOX(d), z + a + RND_BOX(d));
b->SetVertex(6, x + a + RND_BOX(d), y + a + RND_BOX(d), z + a + RND_BOX(d));
b->SetVertex(7, x + a + RND_BOX(d), y - a + RND_BOX(d), z + a + RND_BOX(d));
#undef RND_BOX
gEve->GetEventScene()->AddElement(b);
gEve->Show();
return b;
}
ROOT::R::TRInterface & r
Definition Object.C:4
#define d(i)
Definition RSha256.hxx:102
#define b(i)
Definition RSha256.hxx:100
#define a(i)
Definition RSha256.hxx:99
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
@ kCyan
Definition Rtypes.h:67
externTEveManager * gEve
externTRandom * gRandom
Definition TRandom.h:62
3D box with arbitrary vertices (cuboid).
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
This is the base class for the ROOT Random number generators.
Definition TRandom.h:27
#define RND_BOX(x)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition fillpatterns.C:1
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Namespace for ROOT features in testing.
Definition TROOT.h:100
Author
Matevz Tadel

Definition in file box.C.