14 using namespace TMath;
18 lines->SetLineWidth(2);
23 cones->SetPalette(pal);
28 Float_t theta, phi, height, rad;
29 for (
Int_t i = 0; i < num; ++i) {
32 height =
r.Uniform(5, 15);
33 rad =
r.Uniform(3, 5);
36 pos.Set(
r.Uniform(-
a,
a),
r.Uniform(-
a,
a),
r.Uniform(-
a,
a));
38 cones->AddCone(pos, dir, rad);
39 cones->DigitValue(
r.Uniform(0, 500));
48 cones->SetDrawConeCap(
kTRUE);
54 gEve->AddElement(cones);
55 gEve->AddElement(lines);
66 using namespace TMath;
72 lines->SetLineWidth(2);
76 auto cones =
new TEveBoxSet(
"EllipticConeSet");
79 cones->SetPickable(
kTRUE);
83 Float_t theta, phi, height, rad;
84 for (
Int_t i = 0; i < num; ++i) {
87 height =
r.Uniform(5, 15);
88 rad =
r.Uniform(3, 5);
91 pos.Set(
r.Uniform(-
a,
a),
r.Uniform(-
a,
a),
r.Uniform(-
a,
a));
93 cones->AddEllipticCone(pos, dir, rad, 0.5 * rad,
r.Uniform(0, 360));
94 cones->DigitColor(
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255));
102 if (
r.Integer(2) > 0)
103 cones->SetDrawConeCap(
kTRUE);
109 gEve->AddElement(cones);
110 gEve->AddElement(lines);
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
float Float_t
Float 4 bytes (float).
TEveVectorT< Float_t > TEveVector
Collection of 3D primitives (fixed-size boxes, boxes of different sizes, or arbitrary sexto-epipeds,...
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
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.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.