From Cvetan: new macro to load ITS clusters.
[u/mrichter/AliRoot.git] / EVE / test-macros / triangleset.C
CommitLineData
db086703 1#include "TCanvas.h"
2#include "TStyle.h"
3#include "TFile.h"
4#include "TStopwatch.h"
5#include "TError.h"
6
7namespace Reve{
8class TTriangleSet;
9}
10
11Reve::TriangleSet *ts1=0, *ts2=0, *ts3=0;
12
13void triangleset()
14{
15 {
16 ts1 = Reve::TriangleSet::ReadTrivialFile("broken_torus.tring");
17 ts1->SetName("RandomColors");
18 ts1->GenerateTriangleNormals();
19 ts1->GenerateRandomColors();
20 ts1->SetColor(0);
21 gReve->AddRenderElement(ts1);
22 }
23 {
24 ts2 = Reve::TriangleSet::ReadTrivialFile("broken_torus.tring");
25 ts2->SetName("SmallBlue");
26 ts2->GenerateTriangleNormals();
27 ts2->SetColor(4);
28 TGeoHMatrix m;
29 m.RotateY(90);
30 Double_t scale[3] = { 0.8, 0.8, 1.2 };
31 m.SetScale(scale);
32 ts2->SetTransMatrix(m);
33 gReve->AddRenderElement(ts2);
34 }
35 {
36 ts3 = Reve::TriangleSet::ReadTrivialFile("broken_torus.tring");
37 ts3->SetName("Spectrum");
38 ts3->GenerateTriangleNormals();
39 gStyle->SetPalette(1, 0);
40 ts3->GenerateZNormalColors(50, -50, 50, kTRUE, kTRUE);
41 ts3->SetColor(0);
42 TGeoHMatrix m;
43 m.RotateZ(90);
44 Double_t scale[3] = { 1.3, 1.0, 1.6 };
45 m.SetScale(scale);
46 ts3->SetTransMatrix(m);
47 gReve->AddRenderElement(ts3);
48 }
49
50 gReve->Redraw3D(kTRUE);
51}