]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveDet/AliEveTPCSector3DGL.cxx
consistent naming
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTPCSector3DGL.cxx
index 487073543f0a079d252dbbd239185366f2cbe2f0..94782cece261f24bdaac33434d39c77fd9ee32b9 100644 (file)
 #include <TGLRnrCtx.h>
 #include <TGLSelectRecord.h>
 
-
 //______________________________________________________________________________
-// AliEveTPCSector3DGL
 //
+// GL renderer for AliEveTPCSector3D.
 
 ClassImp(AliEveTPCSector3DGL)
 
@@ -28,11 +27,15 @@ AliEveTPCSector3DGL::AliEveTPCSector3DGL() :
   fSector(0), fBoxRnr(0),
   fRTS(0)
 {
+  // Constructor.
+
   // fDLCache = false; // Disable display list.
 }
 
 AliEveTPCSector3DGL::~AliEveTPCSector3DGL()
 {
+  // Destructor.
+
   delete fBoxRnr;
 }
 
@@ -55,6 +58,8 @@ Short_t AliEveTPCSector3DGL::QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD
 
 Bool_t AliEveTPCSector3DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 {
+  // Set model object.
+
   if(SetModelCheckClass(obj, AliEveTPCSector3D::Class())) {
     fSector = (AliEveTPCSector3D*) fExternalObj;
     if(fBoxRnr == 0) {
@@ -68,6 +73,8 @@ Bool_t AliEveTPCSector3DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
 
 void AliEveTPCSector3DGL::SetBBox()
 {
+  // Set bounding-box.
+
   SetAxisAlignedBBox(((AliEveTPCSector3D*)fExternalObj)->AssertBBox());
 }
 
@@ -75,10 +82,12 @@ void AliEveTPCSector3DGL::SetBBox()
 
 void AliEveTPCSector3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
 {
+  // Render object.
+
   // printf("AliEveTPCSector3DGL::DirectDraw Style %d, LOD %d\n", rnrCtx.Style(), rnrCtx.LOD());
 
   if(fRTS < fSector->fRTS) {
-    fSector->UpdateBoxes();
+    fSector->UpdateBoxesAndPoints();
     fRTS = fSector->fRTS;
   }
 
@@ -94,7 +103,6 @@ void AliEveTPCSector3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
 
   glPushAttrib(GL_CURRENT_BIT | GL_POINT_BIT | GL_ENABLE_BIT);
   glDisable(GL_LIGHTING);
-  UChar_t col[4];
 
   if(hasData && fSector->fPointSetOn)
   {
@@ -111,8 +119,7 @@ void AliEveTPCSector3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
       TEvePointSet* ps = psa.GetBin(b);
       if(ps->Size() > 0)
       {
-       TEveUtil::TEveUtil::ColorFromIdx(ps->GetMarkerColor(), col);
-       glColor4ubv(col);
+       TGLUtil::Color(ps->GetMarkerColor());
 
         if (rnrCtx.SecSelection()) glLoadName(b + 1);
        glVertexPointer(3, GL_FLOAT, 0, ps->GetP());
@@ -125,8 +132,7 @@ void AliEveTPCSector3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
 
   if(fSector->fRnrFrame && ! rnrCtx.SecSelection())
   {
-    TEveUtil::TEveUtil::ColorFromIdx(fSector->fFrameColor, col);
-    glColor4ubv(col);
+    TGLUtil::Color(fSector->fFrameColor);
 
     if(fSector->fRnrInn)
       DrawSegmentFrame(AliEveTPCSectorData::GetInnSeg(),  0, 2);
@@ -140,8 +146,10 @@ void AliEveTPCSector3DGL::DirectDraw(TGLRnrCtx & rnrCtx) const
 }
 
 void AliEveTPCSector3DGL::DrawSegmentFrame(const AliEveTPCSectorData::SegmentInfo& s,
-                                     Int_t botExtraPads, Int_t topExtraPads) const
+                                           Int_t botExtraPads, Int_t topExtraPads) const
 {
+  // Draw frame of given segment.
+
   Float_t xl, xh, yl, yh, zl, zh;
   xl = 0.5*s.GetPadWidth()*(AliEveTPCSectorData::GetNPadsInRow(s.GetFirstRow()) + botExtraPads);
   xh = 0.5*s.GetPadWidth()*(AliEveTPCSectorData::GetNPadsInRow(s.GetLastRow())  + topExtraPads);