ROOT logo
// @(#)root/gl:$Id: TGLCylinder.cxx 31664 2009-12-08 15:00:36Z matevz $
// Author:  Timur Pocheptsov  03/08/2004
// NOTE: This code moved from obsoleted TGLSceneObject.h / .cxx - see these
// attic files for previous CVS history

/*************************************************************************
 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TGLCylinder.h"
#include "TGLRnrCtx.h"
#include "TGLIncludes.h"

#include "TBuffer3D.h"
#include "TBuffer3DTypes.h"
#include "TMath.h"

// For debug tracing
#include "TClass.h"
#include "TError.h"

TGLVector3 gLowNormalDefault(0., 0., -1.);
TGLVector3 gHighNormalDefault(0., 0., 1.);

class TGLMesh
{
protected:
   // active LOD (level of detail) - quality
   UInt_t     fLOD;

   Double_t fRmin1, fRmax1, fRmin2, fRmax2;
   Double_t fDz;

   //normals for top and bottom (for cuts)
   TGLVector3 fNlow;
   TGLVector3 fNhigh;

   void GetNormal(const TGLVertex3 &vertex, TGLVector3 &normal)const;
   Double_t GetZcoord(Double_t x, Double_t y, Double_t z)const;
   const TGLVertex3 &MakeVertex(Double_t x, Double_t y, Double_t z)const;

public:
   TGLMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz,
           const TGLVector3 &l = gLowNormalDefault, const TGLVector3 &h = gHighNormalDefault);
   virtual ~TGLMesh() { }
   virtual void Draw() const = 0;
};

//segment contains 3 quad strips:
//one for inner and outer sides, two for top and bottom
class TubeSegMesh : public TGLMesh {
private:
   // Allocate space for highest quality (LOD) meshes
   TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh + 1) * 8 + 8];
   TGLVector3 fNorm[(TGLRnrCtx::kLODHigh + 1) * 8 + 8];

public:
   TubeSegMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz,
               Double_t phi1, Double_t phi2, const TGLVector3 &l = gLowNormalDefault,
               const TGLVector3 &h = gHighNormalDefault);

   void Draw() const;
};

//four quad strips:
//outer, inner, top, bottom
class TubeMesh : public TGLMesh
{
private:
   // Allocate space for highest quality (LOD) meshes
   TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh + 1) * 8];
   TGLVector3 fNorm[(TGLRnrCtx::kLODHigh + 1) * 8];

public:
   TubeMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz,
            const TGLVector3 &l = gLowNormalDefault, const TGLVector3 &h = gHighNormalDefault);

   void Draw() const;
};

//One quad mesh and 2 triangle funs
class TCylinderMesh : public TGLMesh {
private:
   // Allocate space for highest quality (LOD) meshes
   TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh + 1) * 4 + 2];
   TGLVector3 fNorm[(TGLRnrCtx::kLODHigh + 1) * 4 + 2];

public:
   TCylinderMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t dz,
                 const TGLVector3 &l = gLowNormalDefault, const TGLVector3 &h = gHighNormalDefault);

   void Draw() const;
};

//One quad mesh and 2 triangle fans
class TCylinderSegMesh : public TGLMesh
{
private:
   // Allocate space for highest quality (LOD) meshes
   TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh + 1) * 4 + 10];
   TGLVector3 fNorm[(TGLRnrCtx::kLODHigh + 1) * 4 + 10];

public:
   TCylinderSegMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t dz, Double_t phi1, Double_t phi2,
                    const TGLVector3 &l = gLowNormalDefault, const TGLVector3 &h = gHighNormalDefault);
   void Draw() const;
};

TGLMesh::TGLMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz,
                 const TGLVector3 &l, const TGLVector3 &h) :
   fLOD(LOD),
   fRmin1(r1), fRmax1(r2), fRmin2(r3), fRmax2(r4),
   fDz(dz), fNlow(l), fNhigh(h)
{
   // constructor
}

//______________________________________________________________________________
void TGLMesh::GetNormal(const TGLVertex3 &v, TGLVector3 &n)const
{
   // get normal

   if( fDz < 1.e-10 ) {
      n[0] = 0.;
      n[1] = 0.;
      n[2] = 1.;
   }
   Double_t z = (fRmax1 - fRmax2) / (2 * fDz);
   Double_t mag = TMath::Sqrt(v[0] * v[0] + v[1] * v[1] + z * z);
   if( mag > 1.e-10 ) {
      n[0] = v[0] / mag;
      n[1] = v[1] / mag;
      n[2] = z / mag;
   } else {
      n[0] = v[0];
      n[1] = v[1];
      n[2] = z;
   }
}

//______________________________________________________________________________
Double_t TGLMesh::GetZcoord(Double_t x, Double_t y, Double_t z)const
{
   // get Z coordinate
   Double_t newz = 0;
   if (z < 0) newz = -fDz - (x * fNlow[0] + y * fNlow[1]) / fNlow[2];
   else newz = fDz - (x * fNhigh[0] + y * fNhigh[1]) / fNhigh[2];

   return newz;
}

//______________________________________________________________________________
const TGLVertex3 &TGLMesh::MakeVertex(Double_t x, Double_t y, Double_t z)const
{
   // make vertex
   static TGLVertex3 vert(0., 0., 0.);
   vert[0] = x;
   vert[1] = y;
   vert[2] = GetZcoord(x, y, z);

   return vert;
}

//______________________________________________________________________________
TubeSegMesh::TubeSegMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz,
                         Double_t phi1, Double_t phi2,
                         const TGLVector3 &l, const TGLVector3 &h)
                 :TGLMesh(LOD, r1, r2, r3, r4, dz, l, h), fMesh(), fNorm()

{
   // constructor
   const Double_t delta = (phi2 - phi1) / LOD;
   Double_t currAngle = phi1;

   Bool_t even = kTRUE;
   Double_t c = TMath::Cos(currAngle);
   Double_t s = TMath::Sin(currAngle);
   const Int_t topShift = (fLOD + 1) * 4 + 8;
   const Int_t botShift = (fLOD + 1) * 6 + 8;
   Int_t j = 4 * (fLOD + 1) + 2;

   //defining all three strips here, first strip is non-closed here
   for (Int_t i = 0, e = (fLOD + 1) * 2; i < e; ++i) {
      if (even) {
         fMesh[i] = MakeVertex(fRmax2 * c, fRmax2 * s, fDz);
         fMesh[j] = MakeVertex(fRmin2 * c, fRmin2 * s, fDz);
         fMesh[i + topShift] = MakeVertex(fRmin2 * c, fRmin2 * s, fDz);
         fMesh[i + botShift] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         GetNormal(fMesh[j], fNorm[j]);
         fNorm[j].Negate();
         even = kFALSE;
      } else {
         fMesh[i] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         fMesh[j + 1] = MakeVertex(fRmin1 * c, fRmin1 * s, -fDz);
         fMesh[i + topShift] = MakeVertex(fRmax2 * c, fRmax2 * s, fDz);
         fMesh[i + botShift] = MakeVertex(fRmin1 * c, fRmin1 * s, - fDz);
         GetNormal(fMesh[j + 1], fNorm[j + 1]);
         fNorm[j + 1].Negate();
         even = kTRUE;
         currAngle += delta;
         c = TMath::Cos(currAngle);
         s = TMath::Sin(currAngle);
         j -= 2;
      }

      GetNormal(fMesh[i], fNorm[i]);
      fNorm[i + topShift] = fNhigh;
      fNorm[i + botShift] = fNlow;
   }

   //closing first strip
   Int_t ind = 2 * (fLOD + 1);
   TGLVector3 norm(0., 0., 0.);

   fMesh[ind] = fMesh[ind - 2];
   fMesh[ind + 1] = fMesh[ind - 1];
   fMesh[ind + 2] = fMesh[ind + 4];
   fMesh[ind + 3] = fMesh[ind + 5];
   TMath::Normal2Plane(fMesh[ind].CArr(), fMesh[ind + 1].CArr(), fMesh[ind + 2].CArr(),
                       norm.Arr());
   fNorm[ind] = norm;
   fNorm[ind + 1] = norm;
   fNorm[ind + 2] = norm;
   fNorm[ind + 3] = norm;

   ind = topShift - 4;
   fMesh[ind] = fMesh[ind - 2];
   fMesh[ind + 1] = fMesh[ind - 1];
   fMesh[ind + 2] = fMesh[0];
   fMesh[ind + 3] = fMesh[1];
   TMath::Normal2Plane(fMesh[ind].CArr(), fMesh[ind + 1].CArr(), fMesh[ind + 2].CArr(),
                       norm.Arr());
   fNorm[ind] = norm;
   fNorm[ind + 1] = norm;
   fNorm[ind + 2] = norm;
   fNorm[ind + 3] = norm;
}

//______________________________________________________________________________
void TubeSegMesh::Draw() const
{
   //Tube segment is drawn as three quad strips
   //1. enabling vertex arrays
   glEnableClientState(GL_VERTEX_ARRAY);
   glEnableClientState(GL_NORMAL_ARRAY);
   //2. setting arrays
   glVertexPointer(3, GL_DOUBLE, sizeof(TGLVertex3), fMesh[0].CArr());
   glNormalPointer(GL_DOUBLE, sizeof(TGLVector3), fNorm[0].CArr());
   //3. draw first strip
   glDrawArrays(GL_QUAD_STRIP, 0, 4 * (fLOD + 1) + 8);
   //4. draw top and bottom strips
   glDrawArrays(GL_QUAD_STRIP, 4 * (fLOD + 1) + 8, 2 * (fLOD + 1));
   glDrawArrays(GL_QUAD_STRIP, 6 * (fLOD + 1) + 8, 2 * (fLOD + 1));

   glDisableClientState(GL_VERTEX_ARRAY);
   glDisableClientState(GL_NORMAL_ARRAY);
}

//______________________________________________________________________________
TubeMesh::TubeMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t z,
                   const TGLVector3 &l, const TGLVector3 &h)
             :TGLMesh(LOD, r1, r2, r3, r4, z, l, h), fMesh(), fNorm()
{
   // constructor
   const Double_t delta = TMath::TwoPi() / fLOD;
   Double_t currAngle = 0.;

   Bool_t even = kTRUE;
   Double_t c = TMath::Cos(currAngle);
   Double_t s = TMath::Sin(currAngle);

   const Int_t topShift = (fLOD + 1) * 4;
   const Int_t botShift = (fLOD + 1) * 6;
   Int_t j = 4 * (fLOD + 1) - 2;

   //defining all four strips here
   for (Int_t i = 0, e = (fLOD + 1) * 2; i < e; ++i) {
      if (even) {
         fMesh[i] = MakeVertex(fRmax2 * c, fRmax2 * s, fDz);
         fMesh[j] = MakeVertex(fRmin2 * c, fRmin2 * s, fDz);
         fMesh[i + topShift] = MakeVertex(fRmin2 * c, fRmin2 * s, fDz);
         fMesh[i + botShift] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         GetNormal(fMesh[j], fNorm[j]);
         fNorm[j].Negate();
         even = kFALSE;
      } else {
         fMesh[i] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         fMesh[j + 1] = MakeVertex(fRmin1 * c, fRmin1 * s, -fDz);
         fMesh[i + topShift] = MakeVertex(fRmax2 * c, fRmax2 * s, fDz);
         fMesh[i + botShift] = MakeVertex(fRmin1 * c, fRmin1 * s, - fDz);
         GetNormal(fMesh[j + 1], fNorm[j + 1]);
         fNorm[j + 1].Negate();
         even = kTRUE;
         currAngle += delta;
         c = TMath::Cos(currAngle);
         s = TMath::Sin(currAngle);
         j -= 2;
      }

      GetNormal(fMesh[i], fNorm[i]);
      fNorm[i + topShift] = fNhigh;
      fNorm[i + botShift] = fNlow;
   }
}

//______________________________________________________________________________
void TubeMesh::Draw() const
{
   //Tube is drawn as four quad strips
   glEnableClientState(GL_VERTEX_ARRAY);
   glEnableClientState(GL_NORMAL_ARRAY);

   glVertexPointer(3, GL_DOUBLE, sizeof(TGLVertex3), fMesh[0].CArr());
   glNormalPointer(GL_DOUBLE, sizeof(TGLVector3), fNorm[0].CArr());
   //draw outer and inner strips
   glDrawArrays(GL_QUAD_STRIP, 0, 2 * (fLOD + 1));
   glDrawArrays(GL_QUAD_STRIP, 2 * (fLOD + 1), 2 * (fLOD + 1));
   //draw top and bottom strips
   glDrawArrays(GL_QUAD_STRIP, 4 * (fLOD + 1), 2 * (fLOD + 1));
   glDrawArrays(GL_QUAD_STRIP, 6 * (fLOD + 1), 2 * (fLOD + 1));
   //5. disabling vertex arrays
   glDisableClientState(GL_VERTEX_ARRAY);
   glDisableClientState(GL_NORMAL_ARRAY);
}

//______________________________________________________________________________
TCylinderMesh::TCylinderMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t dz,
                             const TGLVector3 &l, const TGLVector3 &h)
                 :TGLMesh(LOD, 0., r1, 0., r2, dz, l, h), fMesh(), fNorm()
{
   // constructor
   const Double_t delta = TMath::TwoPi() / fLOD;
   Double_t currAngle = 0.;

   Bool_t even = kTRUE;
   Double_t c = TMath::Cos(currAngle);
   Double_t s = TMath::Sin(currAngle);

   //central point of top fan
   Int_t topShift = (fLOD + 1) * 2;
   fMesh[topShift][0] = fMesh[topShift][1] = 0., fMesh[topShift][2] = fDz;
   fNorm[topShift] = fNhigh;
   ++topShift;

   //central point of bottom fun
   Int_t botShift = topShift + 2 * (fLOD + 1);
   fMesh[botShift][0] = fMesh[botShift][1] = 0., fMesh[botShift][2] = -fDz;
   fNorm[botShift] = fNlow;
   ++botShift;

   //defining 1 strip and 2 fans
   for (Int_t i = 0, e = (fLOD + 1) * 2, j = 0; i < e; ++i) {
      if (even) {
         fMesh[i] = MakeVertex(fRmax2 * c, fRmax2 * s, fDz);
         fMesh[j + topShift] = MakeVertex(fRmin2 * c, fRmin2 * s, fDz);
         fMesh[j + botShift] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         even = kFALSE;
      } else {
         fMesh[i] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         even = kTRUE;
         currAngle += delta;
         c = TMath::Cos(currAngle);
         s = TMath::Sin(currAngle);
         ++j;
      }

      GetNormal(fMesh[i], fNorm[i]);
      fNorm[i + topShift] = fNhigh;
      fNorm[i + botShift] = fNlow;
   }
}

//______________________________________________________________________________
void TCylinderMesh::Draw() const
{
   // draw cylinder mesh
   glEnableClientState(GL_VERTEX_ARRAY);
   glEnableClientState(GL_NORMAL_ARRAY);

   glVertexPointer(3, GL_DOUBLE, sizeof(TGLVertex3), fMesh[0].CArr());
   glNormalPointer(GL_DOUBLE, sizeof(TGLVector3), fNorm[0].CArr());

   //draw quad strip
   glDrawArrays(GL_QUAD_STRIP, 0, 2 * (fLOD + 1));
   //draw top and bottom funs
   glDrawArrays(GL_TRIANGLE_FAN, 2 * (fLOD + 1), fLOD + 2);
   glDrawArrays(GL_TRIANGLE_FAN, 3 * (fLOD + 1) + 1, fLOD + 2);

   glDisableClientState(GL_VERTEX_ARRAY);
   glDisableClientState(GL_NORMAL_ARRAY);
}

//______________________________________________________________________________
TCylinderSegMesh::TCylinderSegMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t dz, Double_t phi1,
                                    Double_t phi2, const TGLVector3 &l,
                                    const TGLVector3 &h)
                     :TGLMesh(LOD, 0., r1, 0., r2, dz, l, h), fMesh(), fNorm()
{
   //One quad mesh and two fans
   Double_t delta = (phi2 - phi1) / fLOD;
   Double_t currAngle = phi1;

   Bool_t even = kTRUE;
   Double_t c = TMath::Cos(currAngle);
   Double_t s = TMath::Sin(currAngle);

   const TGLVertex3 vTop(0., 0., fDz);
   const TGLVertex3 vBot(0., 0., - fDz);

   //center of top fan
   Int_t topShift = (fLOD + 1) * 2 + 8;
   fMesh[topShift] = vTop;
   fNorm[topShift] = fNhigh;
   ++topShift;

   //center of bottom fan
   Int_t botShift = topShift + fLOD + 1;
   fMesh[botShift] = vBot;
   fNorm[botShift] = fNlow;
   ++botShift;

   //defining strip and two fans
   //strip is not closed here
   Int_t i = 0;
   for (Int_t e = (fLOD + 1) * 2, j = 0; i < e; ++i) {
      if (even) {
         fMesh[i] = MakeVertex(fRmax2 * c, fRmax2 * s, fDz);
         fMesh[j + topShift] = MakeVertex(fRmax2 * c, fRmax2 * s, fDz);
         fMesh[j + botShift] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         even = kFALSE;
         fNorm[j + topShift] = fNhigh;
         fNorm[j + botShift] = fNlow;
      } else {
         fMesh[i] = MakeVertex(fRmax1 * c, fRmax1 * s, - fDz);
         even = kTRUE;
         currAngle += delta;
         c = TMath::Cos(currAngle);
         s = TMath::Sin(currAngle);
         ++j;
      }

      GetNormal(fMesh[i], fNorm[i]);
   }

   //closing first strip
   Int_t ind = 2 * (fLOD + 1);
   TGLVector3 norm(0., 0., 0.);

   fMesh[ind] = fMesh[ind - 2];
   fMesh[ind + 1] = fMesh[ind - 1];
   fMesh[ind + 2] = vTop;
   fMesh[ind + 3] = vBot;
   TMath::Normal2Plane(fMesh[ind].CArr(), fMesh[ind + 1].CArr(), fMesh[ind + 2].CArr(),
                          norm.Arr());
   fNorm[ind] = norm;
   fNorm[ind + 1] = norm;
   fNorm[ind + 2] = norm;
   fNorm[ind + 3] = norm;

   ind += 4;
   fMesh[ind] = vTop;
   fMesh[ind + 1] = vBot;
   fMesh[ind + 2] = fMesh[0];
   fMesh[ind + 3] = fMesh[1];
   TMath::Normal2Plane(fMesh[ind].CArr(), fMesh[ind + 1].CArr(), fMesh[ind + 2].CArr(),
                       norm.Arr());
   fNorm[ind] = norm;
   fNorm[ind + 1] = norm;
   fNorm[ind + 2] = norm;
   fNorm[ind + 3] = norm;
}

//______________________________________________________________________________
void TCylinderSegMesh::Draw() const
{
   //Cylinder segment is drawn as one quad strip and
   //two triangle fans
   //1. enabling vertex arrays
   glEnableClientState(GL_VERTEX_ARRAY);
   glEnableClientState(GL_NORMAL_ARRAY);
   //2. setting arrays
   glVertexPointer(3, GL_DOUBLE, sizeof(TGLVertex3), fMesh[0].CArr());
   glNormalPointer(GL_DOUBLE, sizeof(TGLVector3), fNorm[0].CArr());
   //3. draw quad strip
   glDrawArrays(GL_QUAD_STRIP, 0, 2 * (fLOD + 1) + 8);
   //4. draw top and bottom funs
   glDrawArrays(GL_TRIANGLE_FAN, 2 * (fLOD + 1) + 8, fLOD + 2);
   //      glDrawArrays(GL_TRIANGLE_FAN, 3 * (fLOD + 1) + 9, fLOD + 2);
   //5. disabling vertex arrays
   glDisableClientState(GL_VERTEX_ARRAY);
   glDisableClientState(GL_NORMAL_ARRAY);
}


//==============================================================================
// TGLCylinder
//==============================================================================

//______________________________________________________________________________
//
// Implements a native ROOT-GL cylinder that can be rendered at
// different levels of detail.

ClassImp(TGLCylinder);

//______________________________________________________________________________
TGLCylinder::TGLCylinder(const TBuffer3DTube &buffer) :
   TGLLogicalShape(buffer)
{
   // Copy out relevant parts of buffer - we create and delete mesh
   // parts on demand in DirectDraw() and they are DL cached

   fDLSize = 14;

   fR1 = buffer.fRadiusInner;
   fR2 = buffer.fRadiusOuter;
   fR3 = buffer.fRadiusInner;
   fR4 = buffer.fRadiusOuter;
   fDz = buffer.fHalfLength;

   fLowPlaneNorm = gLowNormalDefault;
   fHighPlaneNorm = gHighNormalDefault;

   switch (buffer.Type())
   {
      default:
      case TBuffer3DTypes::kTube:
      {
         fSegMesh = kFALSE;
         fPhi1 = 0;
         fPhi2 = 360;
         break;
      }

      case TBuffer3DTypes::kTubeSeg:
      case TBuffer3DTypes::kCutTube:
      {
         fSegMesh = kTRUE;

         const TBuffer3DTubeSeg * segBuffer = dynamic_cast<const TBuffer3DTubeSeg *>(&buffer);
         if (!segBuffer) {
            Error("TGLCylinder::TGLCylinder", "cannot cast TBuffer3D");
            return;
         }

         fPhi1 = segBuffer->fPhiMin;
         fPhi2 = segBuffer->fPhiMax;
         if (fPhi2 < fPhi1) fPhi2 += 360.;
         fPhi1 *= TMath::DegToRad();
         fPhi2 *= TMath::DegToRad();

         if (buffer.Type() == TBuffer3DTypes::kCutTube) {
            const TBuffer3DCutTube * cutBuffer = dynamic_cast<const TBuffer3DCutTube *>(&buffer);
            if (!cutBuffer) {
               Error("TGLCylinder::TGLCylinder", "cannot cast TBuffer3D");
               return;
            }

            for (UInt_t i =0; i < 3; i++) {
               fLowPlaneNorm[i] = cutBuffer->fLowPlaneNorm[i];
               fHighPlaneNorm[i] = cutBuffer->fHighPlaneNorm[i];
            }
         }
         break;
      }
   }
}

//______________________________________________________________________________
TGLCylinder::~TGLCylinder()
{
   //destructor
}

//______________________________________________________________________________
UInt_t TGLCylinder::DLOffset(Short_t lod) const
{
   // Return display-list offset for given LOD.
   // Calculation based on what is done in virtual QuantizeShapeLOD below.

   UInt_t  off = 0;
   if      (lod >= 100) off = 0;
   else if (lod <  10)  off = lod / 2;
   else                 off = lod / 10 + 4;
   return off;
}

//______________________________________________________________________________
Short_t TGLCylinder::QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD) const
{
   // Factor in scene/viewer LOD and quantize.

   Int_t lod = ((Int_t)shapeLOD * (Int_t)combiLOD) / 100;

   if (lod >= 100)
   {
      lod = 100;
   }
   else if (lod > 10)
   {  // Round LOD above 10 to nearest 10
      Double_t quant = 0.1 * ((static_cast<Double_t>(lod)) + 0.5);
      lod            = 10  *   static_cast<Int_t>(quant);
   }
   else
   {  // Round LOD below 10 to nearest 2
      Double_t quant = 0.5 * ((static_cast<Double_t>(lod)) + 0.5);
      lod            = 2   *   static_cast<Int_t>(quant);
   }
   return static_cast<Short_t>(lod);
}

//______________________________________________________________________________
void TGLCylinder::DirectDraw(TGLRnrCtx & rnrCtx) const
{
   // Debug tracing
   if (gDebug > 4) {
      Info("TGLCylinder::DirectDraw", "this %d (class %s) LOD %d",
           this, IsA()->GetName(), rnrCtx.ShapeLOD());
   }

   // As we are now support display list caching we can create, draw and
   // delete mesh parts of suitible LOD (quality) here - it will be cached
   // into a display list by base-class TGLLogicalShape::Draw(),
   // against our id and the LOD value. So this will only occur once
   // for a certain cylinder/LOD combination
   std::vector<TGLMesh *> meshParts;

   // Create mesh parts
   if (!fSegMesh) {
      meshParts.push_back(new TubeMesh   (rnrCtx.ShapeLOD(), fR1, fR2, fR3, fR4,
                                          fDz, fLowPlaneNorm, fHighPlaneNorm));
   } else {
      meshParts.push_back(new TubeSegMesh(rnrCtx.ShapeLOD(), fR1, fR2, fR3, fR4,
                                          fDz, fPhi1, fPhi2,
                                          fLowPlaneNorm, fHighPlaneNorm));
   }

   // Draw mesh parts
   for (UInt_t i = 0; i < meshParts.size(); ++i) meshParts[i]->Draw();

   // Delete mesh parts
   for (UInt_t i = 0; i < meshParts.size(); ++i) {
      delete meshParts[i];
      meshParts[i] = 0;//not to have invalid pointer for pseudo-destructor call :)
   }
}
 TGLCylinder.cxx:1
 TGLCylinder.cxx:2
 TGLCylinder.cxx:3
 TGLCylinder.cxx:4
 TGLCylinder.cxx:5
 TGLCylinder.cxx:6
 TGLCylinder.cxx:7
 TGLCylinder.cxx:8
 TGLCylinder.cxx:9
 TGLCylinder.cxx:10
 TGLCylinder.cxx:11
 TGLCylinder.cxx:12
 TGLCylinder.cxx:13
 TGLCylinder.cxx:14
 TGLCylinder.cxx:15
 TGLCylinder.cxx:16
 TGLCylinder.cxx:17
 TGLCylinder.cxx:18
 TGLCylinder.cxx:19
 TGLCylinder.cxx:20
 TGLCylinder.cxx:21
 TGLCylinder.cxx:22
 TGLCylinder.cxx:23
 TGLCylinder.cxx:24
 TGLCylinder.cxx:25
 TGLCylinder.cxx:26
 TGLCylinder.cxx:27
 TGLCylinder.cxx:28
 TGLCylinder.cxx:29
 TGLCylinder.cxx:30
 TGLCylinder.cxx:31
 TGLCylinder.cxx:32
 TGLCylinder.cxx:33
 TGLCylinder.cxx:34
 TGLCylinder.cxx:35
 TGLCylinder.cxx:36
 TGLCylinder.cxx:37
 TGLCylinder.cxx:38
 TGLCylinder.cxx:39
 TGLCylinder.cxx:40
 TGLCylinder.cxx:41
 TGLCylinder.cxx:42
 TGLCylinder.cxx:43
 TGLCylinder.cxx:44
 TGLCylinder.cxx:45
 TGLCylinder.cxx:46
 TGLCylinder.cxx:47
 TGLCylinder.cxx:48
 TGLCylinder.cxx:49
 TGLCylinder.cxx:50
 TGLCylinder.cxx:51
 TGLCylinder.cxx:52
 TGLCylinder.cxx:53
 TGLCylinder.cxx:54
 TGLCylinder.cxx:55
 TGLCylinder.cxx:56
 TGLCylinder.cxx:57
 TGLCylinder.cxx:58
 TGLCylinder.cxx:59
 TGLCylinder.cxx:60
 TGLCylinder.cxx:61
 TGLCylinder.cxx:62
 TGLCylinder.cxx:63
 TGLCylinder.cxx:64
 TGLCylinder.cxx:65
 TGLCylinder.cxx:66
 TGLCylinder.cxx:67
 TGLCylinder.cxx:68
 TGLCylinder.cxx:69
 TGLCylinder.cxx:70
 TGLCylinder.cxx:71
 TGLCylinder.cxx:72
 TGLCylinder.cxx:73
 TGLCylinder.cxx:74
 TGLCylinder.cxx:75
 TGLCylinder.cxx:76
 TGLCylinder.cxx:77
 TGLCylinder.cxx:78
 TGLCylinder.cxx:79
 TGLCylinder.cxx:80
 TGLCylinder.cxx:81
 TGLCylinder.cxx:82
 TGLCylinder.cxx:83
 TGLCylinder.cxx:84
 TGLCylinder.cxx:85
 TGLCylinder.cxx:86
 TGLCylinder.cxx:87
 TGLCylinder.cxx:88
 TGLCylinder.cxx:89
 TGLCylinder.cxx:90
 TGLCylinder.cxx:91
 TGLCylinder.cxx:92
 TGLCylinder.cxx:93
 TGLCylinder.cxx:94
 TGLCylinder.cxx:95
 TGLCylinder.cxx:96
 TGLCylinder.cxx:97
 TGLCylinder.cxx:98
 TGLCylinder.cxx:99
 TGLCylinder.cxx:100
 TGLCylinder.cxx:101
 TGLCylinder.cxx:102
 TGLCylinder.cxx:103
 TGLCylinder.cxx:104
 TGLCylinder.cxx:105
 TGLCylinder.cxx:106
 TGLCylinder.cxx:107
 TGLCylinder.cxx:108
 TGLCylinder.cxx:109
 TGLCylinder.cxx:110
 TGLCylinder.cxx:111
 TGLCylinder.cxx:112
 TGLCylinder.cxx:113
 TGLCylinder.cxx:114
 TGLCylinder.cxx:115
 TGLCylinder.cxx:116
 TGLCylinder.cxx:117
 TGLCylinder.cxx:118
 TGLCylinder.cxx:119
 TGLCylinder.cxx:120
 TGLCylinder.cxx:121
 TGLCylinder.cxx:122
 TGLCylinder.cxx:123
 TGLCylinder.cxx:124
 TGLCylinder.cxx:125
 TGLCylinder.cxx:126
 TGLCylinder.cxx:127
 TGLCylinder.cxx:128
 TGLCylinder.cxx:129
 TGLCylinder.cxx:130
 TGLCylinder.cxx:131
 TGLCylinder.cxx:132
 TGLCylinder.cxx:133
 TGLCylinder.cxx:134
 TGLCylinder.cxx:135
 TGLCylinder.cxx:136
 TGLCylinder.cxx:137
 TGLCylinder.cxx:138
 TGLCylinder.cxx:139
 TGLCylinder.cxx:140
 TGLCylinder.cxx:141
 TGLCylinder.cxx:142
 TGLCylinder.cxx:143
 TGLCylinder.cxx:144
 TGLCylinder.cxx:145
 TGLCylinder.cxx:146
 TGLCylinder.cxx:147
 TGLCylinder.cxx:148
 TGLCylinder.cxx:149
 TGLCylinder.cxx:150
 TGLCylinder.cxx:151
 TGLCylinder.cxx:152
 TGLCylinder.cxx:153
 TGLCylinder.cxx:154
 TGLCylinder.cxx:155
 TGLCylinder.cxx:156
 TGLCylinder.cxx:157
 TGLCylinder.cxx:158
 TGLCylinder.cxx:159
 TGLCylinder.cxx:160
 TGLCylinder.cxx:161
 TGLCylinder.cxx:162
 TGLCylinder.cxx:163
 TGLCylinder.cxx:164
 TGLCylinder.cxx:165
 TGLCylinder.cxx:166
 TGLCylinder.cxx:167
 TGLCylinder.cxx:168
 TGLCylinder.cxx:169
 TGLCylinder.cxx:170
 TGLCylinder.cxx:171
 TGLCylinder.cxx:172
 TGLCylinder.cxx:173
 TGLCylinder.cxx:174
 TGLCylinder.cxx:175
 TGLCylinder.cxx:176
 TGLCylinder.cxx:177
 TGLCylinder.cxx:178
 TGLCylinder.cxx:179
 TGLCylinder.cxx:180
 TGLCylinder.cxx:181
 TGLCylinder.cxx:182
 TGLCylinder.cxx:183
 TGLCylinder.cxx:184
 TGLCylinder.cxx:185
 TGLCylinder.cxx:186
 TGLCylinder.cxx:187
 TGLCylinder.cxx:188
 TGLCylinder.cxx:189
 TGLCylinder.cxx:190
 TGLCylinder.cxx:191
 TGLCylinder.cxx:192
 TGLCylinder.cxx:193
 TGLCylinder.cxx:194
 TGLCylinder.cxx:195
 TGLCylinder.cxx:196
 TGLCylinder.cxx:197
 TGLCylinder.cxx:198
 TGLCylinder.cxx:199
 TGLCylinder.cxx:200
 TGLCylinder.cxx:201
 TGLCylinder.cxx:202
 TGLCylinder.cxx:203
 TGLCylinder.cxx:204
 TGLCylinder.cxx:205
 TGLCylinder.cxx:206
 TGLCylinder.cxx:207
 TGLCylinder.cxx:208
 TGLCylinder.cxx:209
 TGLCylinder.cxx:210
 TGLCylinder.cxx:211
 TGLCylinder.cxx:212
 TGLCylinder.cxx:213
 TGLCylinder.cxx:214
 TGLCylinder.cxx:215
 TGLCylinder.cxx:216
 TGLCylinder.cxx:217
 TGLCylinder.cxx:218
 TGLCylinder.cxx:219
 TGLCylinder.cxx:220
 TGLCylinder.cxx:221
 TGLCylinder.cxx:222
 TGLCylinder.cxx:223
 TGLCylinder.cxx:224
 TGLCylinder.cxx:225
 TGLCylinder.cxx:226
 TGLCylinder.cxx:227
 TGLCylinder.cxx:228
 TGLCylinder.cxx:229
 TGLCylinder.cxx:230
 TGLCylinder.cxx:231
 TGLCylinder.cxx:232
 TGLCylinder.cxx:233
 TGLCylinder.cxx:234
 TGLCylinder.cxx:235
 TGLCylinder.cxx:236
 TGLCylinder.cxx:237
 TGLCylinder.cxx:238
 TGLCylinder.cxx:239
 TGLCylinder.cxx:240
 TGLCylinder.cxx:241
 TGLCylinder.cxx:242
 TGLCylinder.cxx:243
 TGLCylinder.cxx:244
 TGLCylinder.cxx:245
 TGLCylinder.cxx:246
 TGLCylinder.cxx:247
 TGLCylinder.cxx:248
 TGLCylinder.cxx:249
 TGLCylinder.cxx:250
 TGLCylinder.cxx:251
 TGLCylinder.cxx:252
 TGLCylinder.cxx:253
 TGLCylinder.cxx:254
 TGLCylinder.cxx:255
 TGLCylinder.cxx:256
 TGLCylinder.cxx:257
 TGLCylinder.cxx:258
 TGLCylinder.cxx:259
 TGLCylinder.cxx:260
 TGLCylinder.cxx:261
 TGLCylinder.cxx:262
 TGLCylinder.cxx:263
 TGLCylinder.cxx:264
 TGLCylinder.cxx:265
 TGLCylinder.cxx:266
 TGLCylinder.cxx:267
 TGLCylinder.cxx:268
 TGLCylinder.cxx:269
 TGLCylinder.cxx:270
 TGLCylinder.cxx:271
 TGLCylinder.cxx:272
 TGLCylinder.cxx:273
 TGLCylinder.cxx:274
 TGLCylinder.cxx:275
 TGLCylinder.cxx:276
 TGLCylinder.cxx:277
 TGLCylinder.cxx:278
 TGLCylinder.cxx:279
 TGLCylinder.cxx:280
 TGLCylinder.cxx:281
 TGLCylinder.cxx:282
 TGLCylinder.cxx:283
 TGLCylinder.cxx:284
 TGLCylinder.cxx:285
 TGLCylinder.cxx:286
 TGLCylinder.cxx:287
 TGLCylinder.cxx:288
 TGLCylinder.cxx:289
 TGLCylinder.cxx:290
 TGLCylinder.cxx:291
 TGLCylinder.cxx:292
 TGLCylinder.cxx:293
 TGLCylinder.cxx:294
 TGLCylinder.cxx:295
 TGLCylinder.cxx:296
 TGLCylinder.cxx:297
 TGLCylinder.cxx:298
 TGLCylinder.cxx:299
 TGLCylinder.cxx:300
 TGLCylinder.cxx:301
 TGLCylinder.cxx:302
 TGLCylinder.cxx:303
 TGLCylinder.cxx:304
 TGLCylinder.cxx:305
 TGLCylinder.cxx:306
 TGLCylinder.cxx:307
 TGLCylinder.cxx:308
 TGLCylinder.cxx:309
 TGLCylinder.cxx:310
 TGLCylinder.cxx:311
 TGLCylinder.cxx:312
 TGLCylinder.cxx:313
 TGLCylinder.cxx:314
 TGLCylinder.cxx:315
 TGLCylinder.cxx:316
 TGLCylinder.cxx:317
 TGLCylinder.cxx:318
 TGLCylinder.cxx:319
 TGLCylinder.cxx:320
 TGLCylinder.cxx:321
 TGLCylinder.cxx:322
 TGLCylinder.cxx:323
 TGLCylinder.cxx:324
 TGLCylinder.cxx:325
 TGLCylinder.cxx:326
 TGLCylinder.cxx:327
 TGLCylinder.cxx:328
 TGLCylinder.cxx:329
 TGLCylinder.cxx:330
 TGLCylinder.cxx:331
 TGLCylinder.cxx:332
 TGLCylinder.cxx:333
 TGLCylinder.cxx:334
 TGLCylinder.cxx:335
 TGLCylinder.cxx:336
 TGLCylinder.cxx:337
 TGLCylinder.cxx:338
 TGLCylinder.cxx:339
 TGLCylinder.cxx:340
 TGLCylinder.cxx:341
 TGLCylinder.cxx:342
 TGLCylinder.cxx:343
 TGLCylinder.cxx:344
 TGLCylinder.cxx:345
 TGLCylinder.cxx:346
 TGLCylinder.cxx:347
 TGLCylinder.cxx:348
 TGLCylinder.cxx:349
 TGLCylinder.cxx:350
 TGLCylinder.cxx:351
 TGLCylinder.cxx:352
 TGLCylinder.cxx:353
 TGLCylinder.cxx:354
 TGLCylinder.cxx:355
 TGLCylinder.cxx:356
 TGLCylinder.cxx:357
 TGLCylinder.cxx:358
 TGLCylinder.cxx:359
 TGLCylinder.cxx:360
 TGLCylinder.cxx:361
 TGLCylinder.cxx:362
 TGLCylinder.cxx:363
 TGLCylinder.cxx:364
 TGLCylinder.cxx:365
 TGLCylinder.cxx:366
 TGLCylinder.cxx:367
 TGLCylinder.cxx:368
 TGLCylinder.cxx:369
 TGLCylinder.cxx:370
 TGLCylinder.cxx:371
 TGLCylinder.cxx:372
 TGLCylinder.cxx:373
 TGLCylinder.cxx:374
 TGLCylinder.cxx:375
 TGLCylinder.cxx:376
 TGLCylinder.cxx:377
 TGLCylinder.cxx:378
 TGLCylinder.cxx:379
 TGLCylinder.cxx:380
 TGLCylinder.cxx:381
 TGLCylinder.cxx:382
 TGLCylinder.cxx:383
 TGLCylinder.cxx:384
 TGLCylinder.cxx:385
 TGLCylinder.cxx:386
 TGLCylinder.cxx:387
 TGLCylinder.cxx:388
 TGLCylinder.cxx:389
 TGLCylinder.cxx:390
 TGLCylinder.cxx:391
 TGLCylinder.cxx:392
 TGLCylinder.cxx:393
 TGLCylinder.cxx:394
 TGLCylinder.cxx:395
 TGLCylinder.cxx:396
 TGLCylinder.cxx:397
 TGLCylinder.cxx:398
 TGLCylinder.cxx:399
 TGLCylinder.cxx:400
 TGLCylinder.cxx:401
 TGLCylinder.cxx:402
 TGLCylinder.cxx:403
 TGLCylinder.cxx:404
 TGLCylinder.cxx:405
 TGLCylinder.cxx:406
 TGLCylinder.cxx:407
 TGLCylinder.cxx:408
 TGLCylinder.cxx:409
 TGLCylinder.cxx:410
 TGLCylinder.cxx:411
 TGLCylinder.cxx:412
 TGLCylinder.cxx:413
 TGLCylinder.cxx:414
 TGLCylinder.cxx:415
 TGLCylinder.cxx:416
 TGLCylinder.cxx:417
 TGLCylinder.cxx:418
 TGLCylinder.cxx:419
 TGLCylinder.cxx:420
 TGLCylinder.cxx:421
 TGLCylinder.cxx:422
 TGLCylinder.cxx:423
 TGLCylinder.cxx:424
 TGLCylinder.cxx:425
 TGLCylinder.cxx:426
 TGLCylinder.cxx:427
 TGLCylinder.cxx:428
 TGLCylinder.cxx:429
 TGLCylinder.cxx:430
 TGLCylinder.cxx:431
 TGLCylinder.cxx:432
 TGLCylinder.cxx:433
 TGLCylinder.cxx:434
 TGLCylinder.cxx:435
 TGLCylinder.cxx:436
 TGLCylinder.cxx:437
 TGLCylinder.cxx:438
 TGLCylinder.cxx:439
 TGLCylinder.cxx:440
 TGLCylinder.cxx:441
 TGLCylinder.cxx:442
 TGLCylinder.cxx:443
 TGLCylinder.cxx:444
 TGLCylinder.cxx:445
 TGLCylinder.cxx:446
 TGLCylinder.cxx:447
 TGLCylinder.cxx:448
 TGLCylinder.cxx:449
 TGLCylinder.cxx:450
 TGLCylinder.cxx:451
 TGLCylinder.cxx:452
 TGLCylinder.cxx:453
 TGLCylinder.cxx:454
 TGLCylinder.cxx:455
 TGLCylinder.cxx:456
 TGLCylinder.cxx:457
 TGLCylinder.cxx:458
 TGLCylinder.cxx:459
 TGLCylinder.cxx:460
 TGLCylinder.cxx:461
 TGLCylinder.cxx:462
 TGLCylinder.cxx:463
 TGLCylinder.cxx:464
 TGLCylinder.cxx:465
 TGLCylinder.cxx:466
 TGLCylinder.cxx:467
 TGLCylinder.cxx:468
 TGLCylinder.cxx:469
 TGLCylinder.cxx:470
 TGLCylinder.cxx:471
 TGLCylinder.cxx:472
 TGLCylinder.cxx:473
 TGLCylinder.cxx:474
 TGLCylinder.cxx:475
 TGLCylinder.cxx:476
 TGLCylinder.cxx:477
 TGLCylinder.cxx:478
 TGLCylinder.cxx:479
 TGLCylinder.cxx:480
 TGLCylinder.cxx:481
 TGLCylinder.cxx:482
 TGLCylinder.cxx:483
 TGLCylinder.cxx:484
 TGLCylinder.cxx:485
 TGLCylinder.cxx:486
 TGLCylinder.cxx:487
 TGLCylinder.cxx:488
 TGLCylinder.cxx:489
 TGLCylinder.cxx:490
 TGLCylinder.cxx:491
 TGLCylinder.cxx:492
 TGLCylinder.cxx:493
 TGLCylinder.cxx:494
 TGLCylinder.cxx:495
 TGLCylinder.cxx:496
 TGLCylinder.cxx:497
 TGLCylinder.cxx:498
 TGLCylinder.cxx:499
 TGLCylinder.cxx:500
 TGLCylinder.cxx:501
 TGLCylinder.cxx:502
 TGLCylinder.cxx:503
 TGLCylinder.cxx:504
 TGLCylinder.cxx:505
 TGLCylinder.cxx:506
 TGLCylinder.cxx:507
 TGLCylinder.cxx:508
 TGLCylinder.cxx:509
 TGLCylinder.cxx:510
 TGLCylinder.cxx:511
 TGLCylinder.cxx:512
 TGLCylinder.cxx:513
 TGLCylinder.cxx:514
 TGLCylinder.cxx:515
 TGLCylinder.cxx:516
 TGLCylinder.cxx:517
 TGLCylinder.cxx:518
 TGLCylinder.cxx:519
 TGLCylinder.cxx:520
 TGLCylinder.cxx:521
 TGLCylinder.cxx:522
 TGLCylinder.cxx:523
 TGLCylinder.cxx:524
 TGLCylinder.cxx:525
 TGLCylinder.cxx:526
 TGLCylinder.cxx:527
 TGLCylinder.cxx:528
 TGLCylinder.cxx:529
 TGLCylinder.cxx:530
 TGLCylinder.cxx:531
 TGLCylinder.cxx:532
 TGLCylinder.cxx:533
 TGLCylinder.cxx:534
 TGLCylinder.cxx:535
 TGLCylinder.cxx:536
 TGLCylinder.cxx:537
 TGLCylinder.cxx:538
 TGLCylinder.cxx:539
 TGLCylinder.cxx:540
 TGLCylinder.cxx:541
 TGLCylinder.cxx:542
 TGLCylinder.cxx:543
 TGLCylinder.cxx:544
 TGLCylinder.cxx:545
 TGLCylinder.cxx:546
 TGLCylinder.cxx:547
 TGLCylinder.cxx:548
 TGLCylinder.cxx:549
 TGLCylinder.cxx:550
 TGLCylinder.cxx:551
 TGLCylinder.cxx:552
 TGLCylinder.cxx:553
 TGLCylinder.cxx:554
 TGLCylinder.cxx:555
 TGLCylinder.cxx:556
 TGLCylinder.cxx:557
 TGLCylinder.cxx:558
 TGLCylinder.cxx:559
 TGLCylinder.cxx:560
 TGLCylinder.cxx:561
 TGLCylinder.cxx:562
 TGLCylinder.cxx:563
 TGLCylinder.cxx:564
 TGLCylinder.cxx:565
 TGLCylinder.cxx:566
 TGLCylinder.cxx:567
 TGLCylinder.cxx:568
 TGLCylinder.cxx:569
 TGLCylinder.cxx:570
 TGLCylinder.cxx:571
 TGLCylinder.cxx:572
 TGLCylinder.cxx:573
 TGLCylinder.cxx:574
 TGLCylinder.cxx:575
 TGLCylinder.cxx:576
 TGLCylinder.cxx:577
 TGLCylinder.cxx:578
 TGLCylinder.cxx:579
 TGLCylinder.cxx:580
 TGLCylinder.cxx:581
 TGLCylinder.cxx:582
 TGLCylinder.cxx:583
 TGLCylinder.cxx:584
 TGLCylinder.cxx:585
 TGLCylinder.cxx:586
 TGLCylinder.cxx:587
 TGLCylinder.cxx:588
 TGLCylinder.cxx:589
 TGLCylinder.cxx:590
 TGLCylinder.cxx:591
 TGLCylinder.cxx:592
 TGLCylinder.cxx:593
 TGLCylinder.cxx:594
 TGLCylinder.cxx:595
 TGLCylinder.cxx:596
 TGLCylinder.cxx:597
 TGLCylinder.cxx:598
 TGLCylinder.cxx:599
 TGLCylinder.cxx:600
 TGLCylinder.cxx:601
 TGLCylinder.cxx:602
 TGLCylinder.cxx:603
 TGLCylinder.cxx:604
 TGLCylinder.cxx:605
 TGLCylinder.cxx:606
 TGLCylinder.cxx:607
 TGLCylinder.cxx:608
 TGLCylinder.cxx:609
 TGLCylinder.cxx:610
 TGLCylinder.cxx:611
 TGLCylinder.cxx:612
 TGLCylinder.cxx:613
 TGLCylinder.cxx:614
 TGLCylinder.cxx:615
 TGLCylinder.cxx:616
 TGLCylinder.cxx:617
 TGLCylinder.cxx:618
 TGLCylinder.cxx:619
 TGLCylinder.cxx:620
 TGLCylinder.cxx:621
 TGLCylinder.cxx:622
 TGLCylinder.cxx:623
 TGLCylinder.cxx:624
 TGLCylinder.cxx:625
 TGLCylinder.cxx:626
 TGLCylinder.cxx:627
 TGLCylinder.cxx:628
 TGLCylinder.cxx:629
 TGLCylinder.cxx:630
 TGLCylinder.cxx:631
 TGLCylinder.cxx:632
 TGLCylinder.cxx:633
 TGLCylinder.cxx:634
 TGLCylinder.cxx:635
 TGLCylinder.cxx:636
 TGLCylinder.cxx:637
 TGLCylinder.cxx:638
 TGLCylinder.cxx:639
 TGLCylinder.cxx:640
 TGLCylinder.cxx:641
 TGLCylinder.cxx:642
 TGLCylinder.cxx:643
 TGLCylinder.cxx:644
 TGLCylinder.cxx:645
 TGLCylinder.cxx:646
 TGLCylinder.cxx:647
 TGLCylinder.cxx:648
 TGLCylinder.cxx:649
 TGLCylinder.cxx:650