Logo ROOT   6.07/09
Reference Guide
text.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve
3 /// Demonstrates usage of class TEveText - 2D & 3D text in GL.
4 ///
5 /// \image html eve_text.png
6 /// \macro_code
7 ///
8 /// \author Alja Mrak-Tadel
9 
10 TEveText* text()
11 {
13 
15 
16  TEvePointSet* marker = new TEvePointSet(8);
17  marker->SetName("Origin marker");
18  marker->SetMarkerColor(6);
19  marker->SetMarkerStyle(3);
20  Float_t a = 10;
21  marker->SetPoint(0, a, +a, +a);
22  marker->SetPoint(1, a, -a, +a);
23  marker->SetPoint(2, -a, -a, +a);
24  marker->SetPoint(3, -a, +a, +a);
25  marker->SetPoint(4, +a, +a, -a);
26  marker->SetPoint(5, +a, -a, -a);
27  marker->SetPoint(6, -a, +a, -a);
28  marker->SetPoint(7, -a, -a, -a);
29  gEve->AddElement(marker);
30 
31  TEveText* t = new TEveText("DADA");
32  t->PtrMainTrans()->RotateLF(1, 3, TMath::PiOver2());
33  t->SetMainColor(kOrange-2);
34  t->SetFontSize(64);
36  t->SetLighting(kTRUE);
37  gEve->AddElement(t);
38 
39  // TEveText does not know its bounding box before first rendering.
43 
44  return t;
45 }
float Float_t
Definition: RtypesCore.h:53
virtual void SetName(const char *name)
Change (i.e.
void ResetCurrentCamera()
Resets position/rotation of current camera to default values.
Definition: TGLViewer.cxx:356
TArc * a
Definition: textangle.C:12
virtual void SetMarkerStyle(Style_t mstyle=1)
Set marker style, propagate to projecteds.
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
virtual void SetMarkerColor(Color_t col)
Set the marker color.
Definition: TEvePointSet.h:81
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
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:436
R__EXTERN TSystem * gSystem
Definition: TSystem.h:549
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
Definition: TEvePointSet.h:31
virtual void SetMainColor(Color_t color)
Set main color of the element.
void SetPoint(Int_t n, Double_t x, Double_t y, Double_t z)
Set point n to x, y, z.
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
TText * text
void SetFontSize(Int_t size, Bool_t validate=kTRUE)
Set valid font size.
Definition: TEveText.cxx:60
TEveElement class used for displaying FreeType GL fonts.
Definition: TEveText.h:21
void SetFontMode(Int_t mode)
Set FTFont class ID.
Definition: TEveText.cxx:93
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
void RotateLF(Int_t i1, Int_t i2, Double_t amount)
Rotate in local frame. Does optimised version of MultRight.
Definition: TEveTrans.cxx:375
Double_t PiOver2()
Definition: TMath.h:46
void SetLighting(Bool_t isOn)
Definition: TEveText.h:61
virtual TEveTrans * PtrMainTrans(Bool_t create=kTRUE)
Return pointer to main transformation.
const Bool_t kTRUE
Definition: Rtypes.h:91
Definition: Rtypes.h:62
virtual void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
Definition: TSystem.cxx:598