glViewerLOD.C: To set the Level Of Details when rendering geometry shapes | OpenGL examples | gldemos.C: Menu for running GL demos. |
void glbox() { // Display a 3D histogram using GL (box option). //Author: Timur Pocheptsov gStyle->SetCanvasPreferGL(kTRUE); TCanvas *c = new TCanvas("glc","TH3 Drawing", 100, 10, 850, 400); TPaveLabel *title = new TPaveLabel(0.04, 0.86, 0.96, 0.98, "\"glbox\" and \"glbox1\" options for TH3."); title->SetFillColor(32); title->Draw(); TPad *boxPad = new TPad("box", "box", 0.02, 0.02, 0.48, 0.82); TPad *box1Pad = new TPad("box1", "box1", 0.52, 0.02, 0.98, 0.82); boxPad->Draw(); box1Pad->Draw(); TH3F *h31 = new TH3F("h31", "h31", 10, -1, 1, 10, -1, 1, 10, -1, 1); h31->FillRandom("gaus"); h31->SetFillColor(2); boxPad->cd(); h31->Draw("glbox"); TH3F *h32 = new TH3F("h32", "h32", 10, -2, 2, 10, -1, 1, 10, -3, 3); h32->FillRandom("gaus"); h32->SetFillColor(4); box1Pad->cd(); h32->Draw("glbox1"); } glbox.C:1 glbox.C:2 glbox.C:3 glbox.C:4 glbox.C:5 glbox.C:6 glbox.C:7 glbox.C:8 glbox.C:9 glbox.C:10 glbox.C:11 glbox.C:12 glbox.C:13 glbox.C:14 glbox.C:15 glbox.C:16 glbox.C:17 glbox.C:18 glbox.C:19 glbox.C:20 glbox.C:21 glbox.C:22 glbox.C:23 glbox.C:24 glbox.C:25 glbox.C:26 glbox.C:27 glbox.C:28 glbox.C:29 |
|