Demonstrates usage of 'cone' mode in TEveBoxSet class.
{
lines->SetLineWidth(2);
cones->SetPalette(pal);
for (
Int_t i=0; i<num; ++i) {
height =
r.Uniform(5, 15);
dir *= height;
pos.
Set(
r.Uniform(-
a,
a),
r.Uniform(-
a,
a),
r.Uniform(-
a,
a));
cones->AddCone(pos, dir,
rad);
cones->DigitValue(
r.Uniform(0, 500));
lines->AddLine(pos.
fX, pos.
fY, pos.
fZ, end.
fX, end.
fY, end.
fZ);
}
if (
r.Integer(2)>0) cones->SetDrawConeCap(
kTRUE);
cones->RefitPlex();
return cones;
}
{
lines->SetLineWidth(2);
cones->SetPickable(
kTRUE);
for (
Int_t i=0; i<num; ++i) {
height =
r.Uniform(5, 15);
dir *= height;
pos.
Set(
r.Uniform(-
a,
a),
r.Uniform(-
a,
a),
r.Uniform(-
a,
a));
cones->AddEllipticCone(pos, dir,
rad, 0.5*
rad,
r.Uniform(0,360));
cones->DigitColor(
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255));
lines->AddLine(pos.
fX, pos.
fY, pos.
fZ, end.
fX, end.
fY, end.
fZ);
}
if (
r.Integer(2)>0) cones->SetDrawConeCap(
kTRUE);
cones->RefitPlex();
return cones;
}
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
- Author
- Alja Mrak-Tadel
Definition in file boxset_cones.C.