ROOT logo
// @(#)root/eve:$Id: text_test.C 26876 2008-12-12 14:45:40Z matevz $
// Author: Alja Mrak-Tadel

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


TEveText* text_test()
{
   gSystem->IgnoreSignal(kSigSegmentationViolation, true);

   TEveManager::Create();

   TEvePointSet* 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);

   TEveText* 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;
}
 text_test.C:1
 text_test.C:2
 text_test.C:3
 text_test.C:4
 text_test.C:5
 text_test.C:6
 text_test.C:7
 text_test.C:8
 text_test.C:9
 text_test.C:10
 text_test.C:11
 text_test.C:12
 text_test.C:13
 text_test.C:14
 text_test.C:15
 text_test.C:16
 text_test.C:17
 text_test.C:18
 text_test.C:19
 text_test.C:20
 text_test.C:21
 text_test.C:22
 text_test.C:23
 text_test.C:24
 text_test.C:25
 text_test.C:26
 text_test.C:27
 text_test.C:28
 text_test.C:29
 text_test.C:30
 text_test.C:31
 text_test.C:32
 text_test.C:33
 text_test.C:34
 text_test.C:35
 text_test.C:36
 text_test.C:37
 text_test.C:38
 text_test.C:39
 text_test.C:40
 text_test.C:41
 text_test.C:42
 text_test.C:43