15 using namespace TMath;
19 lines->SetLineWidth(2);
24 cones->SetPalette(pal);
30 for (
Int_t i=0; i<num; ++i) {
33 height =
r.Uniform(5, 15);
34 rad =
r.Uniform(3, 5);
37 pos.
Set(
r.Uniform(-
a,
a),
r.Uniform(-
a,
a),
r.Uniform(-
a,
a));
39 cones->AddCone(pos, dir,
rad);
40 cones->DigitValue(
r.Uniform(0, 500));
44 lines->AddLine(pos.
fX, pos.
fY, pos.
fZ, end.
fX, end.
fY, end.
fZ);
48 if (
r.Integer(2)>0) cones->SetDrawConeCap(
kTRUE);
67 using namespace TMath;
73 lines->SetLineWidth(2);
77 auto cones =
new TEveBoxSet(
"EllipticConeSet");
80 cones->SetPickable(
kTRUE);
85 for (
Int_t i=0; i<num; ++i) {
88 height =
r.Uniform(5, 15);
89 rad =
r.Uniform(3, 5);
92 pos.
Set(
r.Uniform(-
a,
a),
r.Uniform(-
a,
a),
r.Uniform(-
a,
a));
94 cones->AddEllipticCone(pos, dir,
rad, 0.5*
rad,
r.Uniform(0,360));
95 cones->DigitColor(
r.Uniform(20, 255),
r.Uniform(20, 255),
96 r.Uniform(20, 255),
r.Uniform(20, 255));
100 lines->AddLine(pos.
fX, pos.
fY, pos.
fZ, end.
fX, end.
fY, end.
fZ);
104 if (
r.Integer(2)>0) cones->SetDrawConeCap(
kTRUE);
R__EXTERN TEveManager * gEve
Collection of 3D primitives (fixed-size boxes, boxes of different sizes, or arbitrary sexto-epipeds,...
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
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)
A generic, speed-optimised mapping from value to RGBA color supporting different wrapping and range t...
Set of straight lines with optional markers along the lines.
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
void SetPos(Double_t x, Double_t y, Double_t z)
Set position (base-vec 4).
void Set(const Float_t *v)
This is the base class for the ROOT Random number generators.
static constexpr double rad