Changes accompanying migration to usage of ZTrans in TPCSectorViz.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Oct 2006 17:00:14 +0000 (17:00 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Oct 2006 17:00:14 +0000 (17:00 +0000)
EVE/Alieve/TPCLoader.cxx
EVE/Alieve/TPCSector2D.cxx
EVE/Alieve/TPCSector3D.cxx
EVE/alice-macros/tpc_digits.C
EVE/test-macros/tpc_sector_raw_test.C

index c38c15c92d987f1095e4557a0ed1ee9fcab04414..4283ea83503aa0b6ddc676768fce6a62ca11dda8 100644 (file)
@@ -189,7 +189,7 @@ void TPCLoader::UpdateSectors()
           s->SetThreshold(fInitThreshold);
         }
 
-       s->SetTrans(kTRUE);
+       s->SetAutoTrans(kTRUE);
        s->SetFrameColor(36);
 
        gReve->AddRenderElement(this, s);
@@ -219,7 +219,7 @@ void TPCLoader::CreateSectors3D()
       if(fSec2Ds[i] != 0)
        s->CopyVizParams(*fSec2Ds[i]);
 
-      s->SetTrans(kTRUE);
+      s->SetAutoTrans(kTRUE);
       s->SetFrameColor(36);
 
       gReve->AddRenderElement(this, s);
index de6c9bcf2e8579716dd4aee1b0b9dca00a442efb..9344d23d2cc16f5b5d463b10087b0d7392211967 100644 (file)
@@ -81,68 +81,13 @@ void TPCSector2D::Paint(Option_t* )
   buffer.fID           = this;
   buffer.fColor        = 1;
   buffer.fTransparency = 0;
-  buffer.fLocalFrame   = fTrans; 
-  if (fTrans)
-    memcpy(buffer.fLocalMaster, fMatrix, 16*sizeof(Double_t));
+  fHMTrans.SetBuffer3D(buffer);
   buffer.SetSectionsValid(TBuffer3D::kCore);
    
   Int_t reqSections = gPad->GetViewer3D()->AddObject(buffer);
   if (reqSections == TBuffer3D::kNone) {
-    // printf("TPCSector2D::Paint viewer was happy with Core buff3d.\n");
     return;
   }
 
-  printf("TPCSector2D::Paint only GL supported.\n");
-  return;
-
-  /*
-    if (reqSections & TBuffer3D::kRawSizes) {
-    Int_t nbPnts = fQuads.size()*4;
-    Int_t nbSegs = nbPnts;
-    if (!buffer.SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, fQuads.size(), fQuads.size()*6)) {
-    return;
-    }
-    buffer.SetSectionsValid(TBuffer3D::kRawSizes); 
-    }
-
-    if ((reqSections & TBuffer3D::kRaw) && buffer.SectionsValid(TBuffer3D::kRawSizes)) {
-    // Points
-    Int_t pidx = 0;
-    for (std::vector<Quad>::iterator i=fQuads.begin(); i!=fQuads.end(); ++i) {
-    for (Int_t k = 0; k < 12; k++ ){
-    buffer.fPnts[pidx] = (*i).vertices[k]; 
-    pidx++;
-    }
-    }
-
-    // Segments
-    Int_t sidx = 0;
-    for (Int_t q = 0; q < fQuads.size(); ++q) {
-    for (Int_t s = 0; s < 4; ++s ) {
-    buffer.fSegs[3*sidx ] = 4; 
-    buffer.fSegs[3*sidx+1] = sidx;
-    if (s == 3)
-    buffer.fSegs[3*sidx+2] = q*4;
-    else
-    buffer.fSegs[3*sidx+2] = sidx + 1;
-    sidx ++;
-    }
-    }
-
-    // Polygons
-    for (Int_t q = 0; q < fQuads.size(); ++q) {
-    buffer.fPols[6*q] = fQuads[q].color;   
-    buffer.fPols[6*q +1] = 4;
-    buffer.fPols[6*q +2] = 4*q +0;
-    buffer.fPols[6*q +3] = 4*q +1;
-    buffer.fPols[6*q +4] = 4*q +2;
-    buffer.fPols[6*q +5] = 4*q +3;
-    }
-
-    buffer.SetSectionsValid(TBuffer3D::kRaw);
-    buffer.fColor = 5;
-    }
-   
-  */
-  // gPad->GetViewer3D()->AddObject(buffer);
+  Error("TPCSector2D::Paint", "only direct OpenGL rendering supported.");
 }
index b986d57301a3670b7170cda3d621e9dc6f17c189..7835eb9b3601f836b7f739d31d0755d73e4c8a8d 100644 (file)
@@ -86,9 +86,7 @@ void TPCSector3D::Paint(Option_t* /*option*/)
   buffer.fID           = this;
   buffer.fColor        = 1;
   buffer.fTransparency = 0;
-  buffer.fLocalFrame   = fTrans; 
-  if (fTrans)
-    memcpy(buffer.fLocalMaster, fMatrix, 16*sizeof(Double_t));
+  fHMTrans.SetBuffer3D(buffer);
   buffer.SetSectionsValid(TBuffer3D::kCore);
    
   Int_t reqSections = gPad->GetViewer3D()->AddObject(buffer);
@@ -96,7 +94,7 @@ void TPCSector3D::Paint(Option_t* /*option*/)
     return;
   }
 
-  printf("TPCSector3D::Paint only GL supported.\n");
+  Error("TPCSector3D::Paint", "only direct OpenGL rendering supported.");
   return;
 }
 
index 4efd5c3c0b77e32aed71a7174d9818748c134ceb..a6f1599eaacd6913d76c5a598f50a06365453e78 100644 (file)
@@ -66,7 +66,7 @@ void tpc_digits(Int_t mode=0)
        s->SetSectorID(i);
        s->SetDataSource(g_tpc_data);
        s->SetFrameColor(col);
-       s->SetTrans(true);
+       s->SetAutoTrans(kTRUE);
        gReve->AddRenderElement(l, s);
       }
     }
@@ -81,7 +81,7 @@ void tpc_digits(Int_t mode=0)
        s->SetSectorID(i);
        s->SetDataSource(g_tpc_data);
        s->SetFrameColor(col);
-       s->SetTrans(true);
+       s->SetAutoTrans(kTRUE);
        gReve->AddRenderElement(l, s);
       }
     }
@@ -112,7 +112,7 @@ void tpc_digits(Int_t mode=0)
        s->SetSectorID(i);
        s->SetDataSource(g_tpc_data);
        s->SetFrameColor(col);
-       s->SetTrans(true);
+       s->SetAutoTrans(kTRUE);
        gReve->AddRenderElement(l, s);
       }
     }
@@ -127,7 +127,7 @@ void tpc_digits(Int_t mode=0)
        s->SetSectorID(i);
        s->SetDataSource(g_tpc_data);
        s->SetFrameColor(col);
-       s->SetTrans(true);
+       s->SetAutoTrans(kTRUE);
        gReve->AddRenderElement(l, s);
       }
     }
index 08d8166e30950472dd3af70fe90bf7ba86ef523b..8a93f77346f8d1f279cf7487899fb678195254f0 100644 (file)
@@ -48,7 +48,7 @@ void tpc_sector_raw_test(const char *file = "", Int_t ievent = 0)
 
   s = new TPCSector2D();
   s->SetSectorID(default_sector);
-  s->SetTrans(kTRUE); // place on proper 3D coordinates
+  s->SetAutoTrans(kTRUE); // place on proper 3D coordinates
   s->SetDataSource(x);
   s->SetFrameColor(36);
   gReve->AddRenderElement(s);
@@ -56,7 +56,7 @@ void tpc_sector_raw_test(const char *file = "", Int_t ievent = 0)
 
   t = new TPCSector3D();
   t->SetSectorID(default_sector);
-  t->SetTrans(kTRUE);
+  t->SetAutoTrans(kTRUE);
   t->SetDataSource(x);
   t->SetMaxTime(1023);
   t->SetDriftVel(2.273);