Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
gldemos.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_gl
3/// Menu for running GL demos.
4///
5/// \macro_code
6///
7/// \author Timur Pocheptsov
8
9void gldemos()
10{
11 auto bar = new TControlBar("vertical", "GL painter demo", 20, 20);
12 bar->AddButton("Help on demos", "help()", "Description");
13 TString prefix = TString::Format(".x %s/visualisation/gl/", gROOT->GetTutorialsDir());
14 bar->AddButton("glsurfaces", prefix + "glsurfaces.C", "Surface painter example");
15 bar->AddButton("glrose", prefix + "glrose.C", "Surface in polar system");
16 bar->AddButton("gltf3", prefix + "gltf3.C", "TF3 painter");
17 bar->AddButton("glbox", prefix + "glbox.C", "BOX painter");
18 bar->AddButton("transp", prefix + "transp.C", "Use of transparent colors");
19 bar->AddButton("grad", prefix + "grad.C", "Use of gradient colors");
20 bar->AddButton("glparametric", prefix + "glparametric.C", "Parametric surface");
21 bar->AddButton("radialgradients", prefix + "radialgradients.C", "Radial gradients");
22 bar->AddButton("exit", ".q", "Exit demo");
23 bar->Show();
24}
25
26void help()
27{
28 new TCanvas("chelp", "Help on gldemos", 200, 10, 700, 600);
29
30 TPaveLabel *title = new TPaveLabel(0.04, 0.86, 0.96, 0.98, "These demos show different gl painters.");
31 title->SetFillColor(32);
32 title->Draw();
33
34 TPaveText *hdemo = new TPaveText(0.04, 0.04, 0.96, 0.8);
35 hdemo->SetTextAlign(12);
36 hdemo->SetTextFont(52);
37 hdemo->SetTextColor(kBlue);
38 hdemo->AddText("1. Glsurfaces demo shows glsurf4, glsurf1, glsurf3, glsurf1cyl, glsurfpol, gltf3 options.");
39 hdemo->AddText("2. Glrose demontrates \"glsurf2pol\" drawing option and user-defined palette.");
40 hdemo->AddText("3. Gltf3 demo shows \"gltf3\" option.");
41 hdemo->AddText("4. Glbox demo shows \"glbox\" and \"glbox1\" options for TH3.");
42 hdemo->AddText("5. Glparametric demo shows how to define and display parametric surfaces.");
43 hdemo->AddText("You can zoom any plot: press 'J', 'K', 'j', 'k' keys, or use mouse wheel.");
44 hdemo->AddText("Rotate any plot:");
45 hdemo->AddText(" ---select plot with mouse cursor,");
46 hdemo->AddText(" ---move mouse cursor, pressing and holding left mouse button ");
47 hdemo->AddText("Pan plot:");
48 hdemo->AddText(" ---select with mouse cursor a part of a plot, other than back box planes ,");
49 hdemo->AddText(" ---move mouse cursor, pressing and holding middle mouse button ");
50 hdemo->AddText("Selected part of a plot is higlighted (TF3 higlighting is not implemented yet.)");
51 hdemo->AddText("You can select one of back box planes, press middle mouse button and move cursor-");
52 hdemo->AddText("this will create \"slice\" (TF does not support yet).");
53 hdemo->AddText("After the slice was created, you can project it on a back box");
54 hdemo->AddText(" ---press key 'p' (now implemented only for surf options ).");
55 hdemo->AddText("Left double click removes all slices/projections.");
56
57 hdemo->Draw();
58}
@ kBlue
Definition Rtypes.h:67
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define gROOT
Definition TROOT.h:417
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:40
The Canvas class.
Definition TCanvas.h:23
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition TControlBar.h:26
A Pave (see TPave) with a text centered in the Pave.
Definition TPaveLabel.h:20
void Draw(Option_t *option="") override
Draw this pavelabel with its current attributes.
A Pave (see TPave) with text, lines or/and boxes inside.
Definition TPaveText.h:21
Basic string class.
Definition TString.h:138
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2459