track.C: Makes some tracks with three different magnetic field types. | Event Display | view3ds.C: Loading and display of basic 3DS models. |
// @(#)root/eve:$Id: triangleset.C 26876 2008-12-12 14:45:40Z matevz $ // Author: Matevz Tadel // Demonstrates usage of class TEveTriangleSet. #include "TCanvas.h" #include "TStyle.h" #include "TFile.h" #include "TStopwatch.h" #include "TError.h" class TEveTriangleSet; TEveTriangleSet *ts1=0, *ts2=0, *ts3=0; void triangleset() { TEveManager::Create(); { ts1 = TEveTriangleSet::ReadTrivialFile("broken_torus.tring"); ts1->SetName("RandomColors"); ts1->GenerateTriangleNormals(); ts1->GenerateRandomColors(); ts1->SetMainColor(0); TGeoHMatrix m; Double_t scale[3] = { 0.5, 0.5, 0.5 }; m.SetScale(scale); ts1->SetTransMatrix(m); gEve->AddElement(ts1); } { ts2 = TEveTriangleSet::ReadTrivialFile("broken_torus.tring"); ts2->SetName("SmallBlue"); ts2->GenerateTriangleNormals(); ts2->SetMainColor(4); TGeoHMatrix m; m.RotateY(90); Double_t scale[3] = { 0.8, 0.8, 1.2 }; m.SetScale(scale); ts2->SetTransMatrix(m); gEve->AddElement(ts2); } { ts3 = TEveTriangleSet::ReadTrivialFile("broken_torus.tring"); ts3->SetName("Spectrum"); ts3->GenerateTriangleNormals(); gStyle->SetPalette(1, 0); ts3->GenerateZNormalColors(50, -50, 50, kTRUE, kTRUE); ts3->SetMainColor(0); TGeoHMatrix m; m.RotateZ(90); Double_t scale[3] = { 1.3, 1.0, 1.6 }; m.SetScale(scale); ts3->SetTransMatrix(m); gEve->AddElement(ts3); } gEve->Redraw3D(kTRUE); } triangleset.C:1 triangleset.C:2 triangleset.C:3 triangleset.C:4 triangleset.C:5 triangleset.C:6 triangleset.C:7 triangleset.C:8 triangleset.C:9 triangleset.C:10 triangleset.C:11 triangleset.C:12 triangleset.C:13 triangleset.C:14 triangleset.C:15 triangleset.C:16 triangleset.C:17 triangleset.C:18 triangleset.C:19 triangleset.C:20 triangleset.C:21 triangleset.C:22 triangleset.C:23 triangleset.C:24 triangleset.C:25 triangleset.C:26 triangleset.C:27 triangleset.C:28 triangleset.C:29 triangleset.C:30 triangleset.C:31 triangleset.C:32 triangleset.C:33 triangleset.C:34 triangleset.C:35 triangleset.C:36 triangleset.C:37 triangleset.C:38 triangleset.C:39 triangleset.C:40 triangleset.C:41 triangleset.C:42 triangleset.C:43 triangleset.C:44 triangleset.C:45 triangleset.C:46 triangleset.C:47 triangleset.C:48 triangleset.C:49 triangleset.C:50 triangleset.C:51 triangleset.C:52 triangleset.C:53 triangleset.C:54 triangleset.C:55 triangleset.C:56 triangleset.C:57 triangleset.C:58 triangleset.C:59 triangleset.C:60 triangleset.C:61 |
|