ROOT logo
// @(#)root/eve:$Id: text_test.C 23896 2008-05-18 17:42:32Z matevz $
// Author: Alja Mrak-Tadel

// Demonstrates usage of TEveArrow class.

void arrow()
{
   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);

   TEveArrow* a1 = new TEveArrow(1., 1., 10., 10., 4., 0.);
   a1->SetMainColor(kBlue);
   a1->SetTubeR(0.02);
   a1->SetPickable(kTRUE);
   gEve->AddElement(a1);
   TEveText* t1 = new TEveText("blue");
   t1->SetFontSize(20);
   TEveVector tv = a1->GetVector()*0.5+a1->GetOrigin();
   t1->RefMainTrans().SetPos(tv.Arr());
   gEve->AddElement(t1, a1);

   TEveArrow* a2 = new TEveArrow(20., 1., 10., 3., 0., 4.);
   a2->SetMainColor(kGreen);
   a2->SetPickable(kTRUE);
   gEve->AddElement(a2);

   TEveArrow* a3 = new TEveArrow(1., 10., 10., 0., 20., 0.);
   a3->SetMainColor(kOrange);
   a3->SetPickable(kTRUE);
   gEve->AddElement(a3);

   gEve->FullRedraw3D(kTRUE);
}
 arrow.C:1
 arrow.C:2
 arrow.C:3
 arrow.C:4
 arrow.C:5
 arrow.C:6
 arrow.C:7
 arrow.C:8
 arrow.C:9
 arrow.C:10
 arrow.C:11
 arrow.C:12
 arrow.C:13
 arrow.C:14
 arrow.C:15
 arrow.C:16
 arrow.C:17
 arrow.C:18
 arrow.C:19
 arrow.C:20
 arrow.C:21
 arrow.C:22
 arrow.C:23
 arrow.C:24
 arrow.C:25
 arrow.C:26
 arrow.C:27
 arrow.C:28
 arrow.C:29
 arrow.C:30
 arrow.C:31
 arrow.C:32
 arrow.C:33
 arrow.C:34
 arrow.C:35
 arrow.C:36
 arrow.C:37
 arrow.C:38
 arrow.C:39
 arrow.C:40
 arrow.C:41
 arrow.C:42
 arrow.C:43
 arrow.C:44
 arrow.C:45
 arrow.C:46
 arrow.C:47
 arrow.C:48
 arrow.C:49
 arrow.C:50
thumb