ROOT
v6-20
Reference Guide
arrow.C File Reference
Tutorials
»
Event display tutorials
Detailed Description
Demonstrates usage of
TEveArrow
class.
void
arrow
()
{
gSystem
->
IgnoreSignal
(
kSigSegmentationViolation
,
true
);
TEveManager::Create
();
auto
marker =
new
TEvePointSet
(8);
marker->SetName(
"Origin marker"
);
marker->SetMarkerColor(6);
marker->SetMarkerStyle(3);
Float_t
a
= 10;
marker->SetPoint(0,
a
, +
a
, +
a
);
marker->SetPoint(1,
a
, -
a
, +
a
);
marker->SetPoint(2, -
a
, -
a
, +
a
);
marker->SetPoint(3, -
a
, +
a
, +
a
);
marker->SetPoint(4, +
a
, +
a
, -
a
);
marker->SetPoint(5, +
a
, -
a
, -
a
);
marker->SetPoint(6, -
a
, +
a
, -
a
);
marker->SetPoint(7, -
a
, -
a
, -
a
);
gEve
->
AddElement
(marker);
auto
a1 =
new
TEveArrow
(1., 1., 10., 10., 4., 0.);
a1->SetMainColor(
kBlue
);
a1->SetTubeR(0.02);
a1->SetPickable(
kTRUE
);
gEve
->
AddElement
(a1);
auto
t1
=
new
TEveText
(
"blue"
);
t1
->SetFontSize(20);
TEveVector
tv = a1->GetVector()*0.5f+a1->GetOrigin();
t1
->RefMainTrans().SetPos(tv.
Arr
());
a1->AddElement(
t1
);
auto
a2 =
new
TEveArrow
(20., 1., 10., 3., 0., 4.);
a2->SetMainColor(
kGreen
);
a2->SetPickable(
kTRUE
);
gEve
->
AddElement
(a2);
auto
a3 =
new
TEveArrow
(1., 10., 10., 0., 20., 0.);
a3->SetMainColor(
kOrange
);
a3->SetPickable(
kTRUE
);
gEve
->
AddElement
(a3);
gEve
->
FullRedraw3D
(
kTRUE
);
}
Float_t
float Float_t
Definition:
RtypesCore.h:53
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:87
kOrange
@ kOrange
Definition:
Rtypes.h:65
kGreen
@ kGreen
Definition:
Rtypes.h:64
kBlue
@ kBlue
Definition:
Rtypes.h:64
gEve
R__EXTERN TEveManager * gEve
Definition:
TEveManager.h:243
kSigSegmentationViolation
@ kSigSegmentationViolation
Definition:
TSysEvtHandler.h:109
gSystem
R__EXTERN TSystem * gSystem
Definition:
TSystem.h:560
TEveArrow
Class used for display of a thick arrow.
Definition:
TEveArrow.h:25
TEveManager::AddElement
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
Definition:
TEveManager.cxx:530
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:895
TEveManager::FullRedraw3D
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
Definition:
TEveManager.cxx:430
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< Float_t >
TEveVectorT::Arr
const TT * Arr() const
Definition:
TEveVector.h:57
TSystem::IgnoreSignal
virtual void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
Definition:
TSystem.cxx:603
arrow
TArrow * arrow
Definition:
entrylist_figure1.C:41
a
auto * a
Definition:
textangle.C:12
t1
auto * t1
Definition:
textangle.C:20
Author
Alja Mrak-Tadel
Definition in file
arrow.C
.
tutorials
eve
arrow.C
ROOT v6-20 - Reference Guide Generated on Fri Apr 1 2022 00:24:30 (GVA Time) using Doxygen 1.9.4