ROOT
v6-30
Reference Guide
Loading...
Searching...
No Matches
text.C File Reference
Tutorials
»
Event display tutorials
Detailed Description
Demonstrates usage of class
TEveText
- 2D & 3D text in GL.
TEveText
*
text
()
{
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
t =
new
TEveText
(
"DADA"
);
t->PtrMainTrans()->RotateLF(1, 3,
TMath::PiOver2
());
t->SetMainColor(
kOrange
-2);
t->SetFontSize(64);
t->SetFontMode(
TGLFont::kExtrude
);
t->SetLighting(
kTRUE
);
gEve
->
AddElement
(t);
// TEveText does not know its bounding box before first rendering.
gEve
->
FullRedraw3D
(
kTRUE
);
gEve
->
GetDefaultGLViewer
()->
ResetCurrentCamera
();
gEve
->
GetDefaultGLViewer
()->
RequestDraw
(
TGLRnrCtx::kLODHigh
);
return
t;
}
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
gEve
R__EXTERN TEveManager * gEve
Definition
TEveManager.h:243
text
Option_t Option_t TPoint TPoint const char text
Definition
TGWin32VirtualXProxy.cxx:68
kSigSegmentationViolation
@ kSigSegmentationViolation
Definition
TSysEvtHandler.h:109
gSystem
R__EXTERN TSystem * gSystem
Definition
TSystem.h:560
TEveManager::AddElement
void AddElement(TEveElement *element, TEveElement *parent=nullptr)
Add an element.
Definition
TEveManager.cxx:527
TEveManager::GetDefaultGLViewer
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
Definition
TEveManager.cxx:265
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
TEveManager::FullRedraw3D
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
Definition
TEveManager.cxx:427
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
TGLFont::kExtrude
@ kExtrude
Definition
TGLFontManager.h:30
TGLRnrCtx::kLODHigh
@ kLODHigh
Definition
TGLRnrCtx.h:67
TGLViewer::RequestDraw
void RequestDraw(Short_t LOD=TGLRnrCtx::kLODMed)
Post request for redraw of viewer at level of detail 'LOD' Request is directed via cross thread gVirt...
Definition
TGLViewer.cxx:438
TGLViewer::ResetCurrentCamera
void ResetCurrentCamera()
Resets position/rotation of current camera to default values.
Definition
TGLViewer.cxx:358
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:580
TMath::PiOver2
constexpr Double_t PiOver2()
Definition
TMath.h:51
Author
Alja Mrak-Tadel
Definition in file
text.C
.
tutorials
eve
text.C
ROOT v6-30 - Reference Guide Generated on Fri Aug 9 2024 10:45:42 (GVA Time) using Doxygen 1.9.8