26 #if defined(__CINT__) && !defined(__MAKECINT__)
33 macroName = rootSysPath;
36 macroName +=
"tutorials/gl/";
39 macroName +=
"glvox2.C++";
60 if (*x > -1.5 && *x < -0.5)
63 if (*x < -0.5 && *x < 0.)
66 if (*x > 0 && *x < 0.5)
81 const Double_t xMin = -1., xMax = 1., xStep = (xMax - xMin) / (nX - 1);
84 const Double_t yMin = -1., yMax = 1., yStep = (yMax - yMin) / (nY - 1);
87 const Double_t zMin = -1., zMax = 1., zStep = (zMax - zMin) / (nZ - 1);
89 TH3F *hist =
new TH3F(
"glvoxel",
"glvoxel", nX, -1., 1., nY, -1., 1., nZ, -1., 1.);
92 for (
UInt_t i = 0; i < nZ; ++i) {
95 for (
UInt_t j = 0; j < nY; ++j) {
98 for (
UInt_t k = 0; k < nX; ++k) {
101 const Double_t val = 1. - (x * x + y * y + z *
z);
110 TF1 * tf =
new TF1(
"TransferFunction", my_transfer_function);
TList * GetListOfFunctions() const
3-D histogram with a float per channel (see TH1 documentation)}
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content.
R__EXTERN TStyle * gStyle
const char * Data() const
virtual const char * Getenv(const char *env)
Get environment variable.
void SetCanvasPreferGL(Bool_t prefer=kTRUE)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void Add(TObject *obj)
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.