ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
triangleset.C File Reference

Demonstrates usage of class TEveTriangleSet. More...

Go to the source code of this file.

Detailed Description

Demonstrates usage of class TEveTriangleSet.

eve_triangleset.png
#include "TCanvas.h"
#include "TStyle.h"
#include "TFile.h"
#include "TStopwatch.h"
#include "TError.h"
TEveTriangleSet *ts1=0, *ts2=0, *ts3=0;
void triangleset()
{
{
ts1 = TEveTriangleSet::ReadTrivialFile("broken_torus.tring");
ts1->SetName("RandomColors");
ts1->SetMainColor(0);
Double_t scale[3] = { 0.5, 0.5, 0.5 };
m.SetScale(scale);
ts1->SetTransMatrix(m);
}
{
ts2 = TEveTriangleSet::ReadTrivialFile("broken_torus.tring");
ts2->SetName("SmallBlue");
ts2->GenerateTriangleNormals();
ts2->SetMainColor(4);
m.RotateY(90);
Double_t scale[3] = { 0.8, 0.8, 1.2 };
m.SetScale(scale);
ts2->SetTransMatrix(m);
}
{
ts3 = TEveTriangleSet::ReadTrivialFile("broken_torus.tring");
ts3->SetName("Spectrum");
ts3->GenerateTriangleNormals();
ts3->GenerateZNormalColors(50, -50, 50, kTRUE, kTRUE);
ts3->SetMainColor(0);
m.RotateZ(90);
Double_t scale[3] = { 1.3, 1.0, 1.6 };
m.SetScale(scale);
ts3->SetTransMatrix(m);
}
}
Author
Matevz Tadel

Definition in file triangleset.C.