#include <TGLRnrCtx.h>
#include <TGLSelectRecord.h>
-
//______________________________________________________________________________
-// AliEveTPCSector3DGL
//
+// GL renderer for AliEveTPCSector3D.
ClassImp(AliEveTPCSector3DGL)
fSector(0), fBoxRnr(0),
fRTS(0)
{
+ // Constructor.
+
// fDLCache = false; // Disable display list.
}
AliEveTPCSector3DGL::~AliEveTPCSector3DGL()
{
+ // Destructor.
+
delete fBoxRnr;
}
Bool_t AliEveTPCSector3DGL::SetModel(TObject* obj, const Option_t* /*opt*/)
{
+ // Set model object.
+
if(SetModelCheckClass(obj, AliEveTPCSector3D::Class())) {
fSector = (AliEveTPCSector3D*) fExternalObj;
if(fBoxRnr == 0) {
void AliEveTPCSector3DGL::SetBBox()
{
+ // Set bounding-box.
+
SetAxisAlignedBBox(((AliEveTPCSector3D*)fExternalObj)->AssertBBox());
}
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;
}
glPushAttrib(GL_CURRENT_BIT | GL_POINT_BIT | GL_ENABLE_BIT);
glDisable(GL_LIGHTING);
- UChar_t col[4];
if(hasData && fSector->fPointSetOn)
{
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());
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);
}
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);