Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches

Detailed Description

Demonstrates usage of class TEveText - 2D & 3D text in GL.

{
gSystem->IgnoreSignal(kSigSegmentationViolation, true);
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;
}
#define a(i)
Definition RSha256.hxx:99
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
@ kOrange
Definition Rtypes.h:68
externTEveManager * gEve
@ kSigSegmentationViolation
externTSystem * gSystem
Definition TSystem.h:582
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
TEveElement class used for displaying FreeType GL fonts.
Definition TEveText.h:25
TText * text
constexpr Double_t PiOver2()
Definition TMath.h:54
Author
Alja Mrak-Tadel

Definition in file text.C.