ROOT
v6-32
Reference Guide
Loading...
Searching...
No Matches
arrow.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_eve
3
/// Demonstrates usage of TEveArrow class.
4
///
5
/// \image html eve_arrow.png
6
/// \macro_code
7
///
8
/// \author Alja Mrak-Tadel
9
10
11
void
arrow
()
12
{
13
gSystem
->IgnoreSignal(
kSigSegmentationViolation
,
true
);
14
15
TEveManager::Create
();
16
17
auto
marker =
new
TEvePointSet
(8);
18
marker->SetName(
"Origin marker"
);
19
marker->SetMarkerColor(6);
20
marker->SetMarkerStyle(3);
21
Float_t
a
= 10;
22
marker->SetPoint(0,
a
, +
a
, +
a
);
23
marker->SetPoint(1,
a
, -
a
, +
a
);
24
marker->SetPoint(2, -
a
, -
a
, +
a
);
25
marker->SetPoint(3, -
a
, +
a
, +
a
);
26
marker->SetPoint(4, +
a
, +
a
, -
a
);
27
marker->SetPoint(5, +
a
, -
a
, -
a
);
28
marker->SetPoint(6, -
a
, +
a
, -
a
);
29
marker->SetPoint(7, -
a
, -
a
, -
a
);
30
gEve
->AddElement(marker);
31
32
auto
a1 =
new
TEveArrow
(1., 1., 10., 10., 4., 0.);
33
a1->SetMainColor(
kBlue
);
34
a1->SetTubeR(0.02);
35
a1->SetPickable(
kTRUE
);
36
gEve
->AddElement(a1);
37
auto
t1
=
new
TEveText
(
"blue"
);
38
t1
->SetFontSize(20);
39
TEveVector
tv = a1->GetVector()*0.5f+a1->GetOrigin();
40
t1
->RefMainTrans().SetPos(tv.
Arr
());
41
a1->AddElement(
t1
);
42
43
auto
a2 =
new
TEveArrow
(20., 1., 10., 3., 0., 4.);
44
a2->SetMainColor(
kGreen
);
45
a2->SetPickable(
kTRUE
);
46
gEve
->AddElement(a2);
47
48
auto
a3 =
new
TEveArrow
(1., 10., 10., 0., 20., 0.);
49
a3->SetMainColor(
kOrange
);
50
a3->SetPickable(
kTRUE
);
51
gEve
->AddElement(a3);
52
53
gEve
->FullRedraw3D(
kTRUE
);
54
}
a
#define a(i)
Definition
RSha256.hxx:99
Float_t
float Float_t
Definition
RtypesCore.h:57
kTRUE
constexpr Bool_t kTRUE
Definition
RtypesCore.h:100
kOrange
@ kOrange
Definition
Rtypes.h:67
kGreen
@ kGreen
Definition
Rtypes.h:66
kBlue
@ kBlue
Definition
Rtypes.h:66
gEve
R__EXTERN TEveManager * gEve
Definition
TEveManager.h:243
TEveVector
TEveVectorT< Float_t > TEveVector
Definition
TEveVector.h:123
kSigSegmentationViolation
@ kSigSegmentationViolation
Definition
TSysEvtHandler.h:109
gSystem
R__EXTERN TSystem * gSystem
Definition
TSystem.h:566
TEveArrow
Class used for display of a thick arrow.
Definition
TEveArrow.h:25
TEveManager::Create
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
Definition
TEveManager.cxx:887
TEvePointSet
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
Definition
TEvePointSet.h:36
TEveText
TEveElement class used for displaying FreeType GL fonts.
Definition
TEveText.h:25
TEveVectorT::Arr
const TT * Arr() const
Definition
TEveVector.h:58
arrow
Definition
RArrowDS.hxx:17
t1
auto * t1
Definition
textangle.C:20
tutorials
eve
arrow.C
ROOT v6-32 - Reference Guide Generated on Sun May 17 2026 02:44:14 (GVA Time) using Doxygen 1.13.2